Package: quota
Version: 4.00-4
Followup-For: Bug #685356
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Dear Maintainer,

Attached is a patch that adds the upstream fix identified by David
Chinner. I have built with the patch, but haven't tested functionality yet.

  * Added upstream patch to fix issue with repquota for XFS. (Closes:
#685356)
Thanks for considering the patch.

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-29-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

diff -u quota-4.00/debian/changelog quota-4.00/debian/changelog
diff -u quota-4.00/debian/patches/series quota-4.00/debian/patches/series
--- quota-4.00/debian/patches/series
+++ quota-4.00/debian/patches/series
@@ -4,0 +5 @@
+repquota_fix_xfs_reporting.diff
only in patch2:
unchanged:
--- quota-4.00.orig/debian/patches/repquota_fix_xfs_reporting.diff
+++ quota-4.00/debian/patches/repquota_fix_xfs_reporting.diff
@@ -0,0 +1,25 @@
+Author: Jan Kara <j...@suse.cz>
+Description; repquota: Fix reporting for XFS
+
+Conversion to generic quota scanning introduced a bug for XFS where we
+stopped scanning after quotactl reported first error. quotactl for XFS
+however reports ENOENT when it has nothing to report for a particular user
+/ group and we shouldn't stop scanning after that. We tried to test for this
+but the test was wrong. Fix it.
+
+cherry-picked from commit 6ba6546dd167297cb9ed69d0257ee245b0faea47
+
+--- a/quotaio_xfs.c
++++ b/quotaio_xfs.c
+@@ -183,9 +183,9 @@ static int xfs_get_dquot(struct dquot *d
+ 	memset(&d, 0, sizeof(d));
+ 	ret = quotactl(qcmd, dq->dq_h->qh_quotadev, dq->dq_id, (void *)&d);
+ 	if (ret < 0) {
+-		if (ret == -ENOENT)
++		if (errno == ENOENT)
+ 			return 0;
+-		return ret;
++		return -1;
+ 	}
+ 	xfs_kern2utildqblk(&dq->dq_dqb, &d);
+ 	return 0;

Reply via email to