[quota/f18] Do not fiddle with quota files on XFS and GFS

Petr Pisar ppisar at fedoraproject.org
Tue Feb 5 08:40:37 UTC 2013


commit d0ce2ebbfb7deb549e17361e8d154bb7f0d1f19a
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Feb 5 08:53:15 2013 +0100

    Do not fiddle with quota files on XFS and GFS

 ...ot-fiddle-with-quota-files-on-XFS-and-GFS.patch |   45 ++++++++++++++++++++
 quota.spec                                         |    4 ++
 2 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/quota-4.00-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch b/quota-4.00-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch
new file mode 100644
index 0000000..a2361a8
--- /dev/null
+++ b/quota-4.00-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch
@@ -0,0 +1,45 @@
+From 93a438e7c6873e72289f27224f51e5b422c73cac Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at 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 at redhat.com>
+Signed-off-by: Jan Kara <jack at suse.cz>
+---
+ quotacheck.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/quotacheck.c b/quotacheck.c
+index d8515af..24aaad7 100644
+--- a/quotacheck.c
++++ b/quotacheck.c
+@@ -828,6 +828,9 @@ static int dump_to_file(struct mntent *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->mnt_fsname, type, cfmt) >= 0) {	/* Quota turned on? */
+ 		char *filename;
+ 
+@@ -871,6 +874,10 @@ static int sub_quota_file(struct mntent *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 substracted.\n"), type2name(ftype));
+-- 
+1.8.1.2
+
diff --git a/quota.spec b/quota.spec
index b0335c6..133206c 100644
--- a/quota.spec
+++ b/quota.spec
@@ -42,6 +42,8 @@ Patch10: quota-4.01-quota-Fix-reporting-of-NFS-mountpoints.patch
 Patch11: quota-4.01-Make-group-warning-message-more-official.patch
 # In upstream after 4.01, SF#3571589
 Patch12: quota-4.01-define_charset_in_mail.patch
+# In upstream after 4.01, SF#3602786, bug #846296
+Patch13: quota-4.00-Do-not-fiddle-with-quota-files-on-XFS-and-GFS.patch
 
 
 %description
@@ -126,6 +128,7 @@ Linux/UNIX environment.
 %patch10 -p1 -b .nfs3_pathname
 %patch11 -p1 -b .group_warning
 %patch12 -p1 -b .charset_in_mail
+%patch13 -p1 -b .gfs_files
 
 #fix typos/mistakes in localized documentation
 for pofile in $(find ./po/*.p*)
@@ -254,6 +257,7 @@ echo '  systemd-sysv-convert --apply quota_nld'
 * Tue Feb 05 2013 Petr Pisar <ppisar at redhat.com> - 1:4.00-7
 - Make group warning message more official
 - Define charset in e-mails sent by warnquota (SF#3571589)
+- Do not fiddle with quota files on XFS and GFS (bug #846296)
 
 * Fri Sep 07 2012 Petr Pisar <ppisar at redhat.com> - 1:4.00-6
 - Fix reporting for NFSv3 mount points


More information about the scm-commits mailing list