Do not fiddle with quota files on XFS and GFS
This commit is contained in:
parent
715fde4c1a
commit
cf20238fdb
@ -0,0 +1,45 @@
|
||||
From 5f7b9d139d64117abc4dcd66d2fbac99c070d7ce Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Thu, 31 Jan 2013 12:58:59 +0100
|
||||
Subject: [PATCH] Do not fiddle with quota files on XFS and GFS
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
XFS and GFS have no quota files. Skip unnecessary examination and
|
||||
rename of these files when running quotacheck.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
quotacheck.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/quotacheck.c b/quotacheck.c
|
||||
index 0d0d4b2..e047825 100644
|
||||
--- a/quotacheck.c
|
||||
+++ b/quotacheck.c
|
||||
@@ -828,6 +828,9 @@ static int dump_to_file(struct mount_entry *mnt, int type)
|
||||
return -1;
|
||||
}
|
||||
debug(FL_DEBUG, _("Data dumped.\n"));
|
||||
+ /* Moving of quota files doesn't apply to GFS2 or XFS */
|
||||
+ if (cfmt == QF_XFS)
|
||||
+ return 0;
|
||||
if (kern_quota_on(mnt, type, cfmt) >= 0) { /* Quota turned on? */
|
||||
char *filename;
|
||||
|
||||
@@ -871,6 +874,10 @@ static int sub_quota_file(struct mount_entry *mnt, int qtype, int ftype)
|
||||
struct dquot *d;
|
||||
qid_t id;
|
||||
|
||||
+ /* GFS2 and XFS do not have quota files. */
|
||||
+ if (cfmt == QF_XFS)
|
||||
+ return 0;
|
||||
+
|
||||
debug(FL_DEBUG, _("Substracting space used by old %s quota file.\n"), _(type2name(ftype)));
|
||||
if (get_qf_name(mnt, ftype, cfmt, 0, &filename) < 0) {
|
||||
debug(FL_VERBOSE, _("Old %s file name could not been determined. Usage will not be subtracted.\n"), _(type2name(ftype)));
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
@ -5,7 +5,7 @@ Name: quota
|
||||
Summary: System administration tools for monitoring users' disk usage
|
||||
Epoch: 1
|
||||
Version: 4.01
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: BSD and GPLv2+
|
||||
URL: http://sourceforge.net/projects/linuxquota/
|
||||
Group: System Environment/Base
|
||||
@ -28,6 +28,8 @@ Patch3: quota-3.13-wrong-ports.patch
|
||||
Patch4: quota-4.01-Make-group-warning-message-more-official.patch
|
||||
# In upstream after 4.01, SF#3571589
|
||||
Patch5: quota-4.01-define_charset_in_mail.patch
|
||||
# In upstream after 4.01, SF#3602786, bug #846296
|
||||
Patch6: quota-4.01-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch
|
||||
|
||||
|
||||
%description
|
||||
@ -105,6 +107,7 @@ Linux/UNIX environment.
|
||||
%patch3 -p1
|
||||
%patch4 -p1 -b .group_warning
|
||||
%patch5 -p1 -b .charset_in_mail
|
||||
%patch6 -p1 -b .gfs_files
|
||||
|
||||
#fix typos/mistakes in localized documentation
|
||||
for pofile in $(find ./po/*.p*)
|
||||
@ -219,6 +222,9 @@ echo ' systemd-sysv-convert --apply quota_nld'
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 05 2013 Petr Pisar <ppisar@redhat.com> - 1:4.01-4
|
||||
- Do not fiddle with quota files on XFS and GFS (bug #846296)
|
||||
|
||||
* Mon Dec 03 2012 Petr Pisar <ppisar@redhat.com> - 1:4.01-3
|
||||
- Define charset in e-mails sent by warnquota (SF#3571589)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user