Report all quotas on XFS

This commit is contained in:
Petr Písař 2012-07-03 16:31:12 +02:00
parent af764e27e0
commit 7c70fe19d0
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,35 @@
From 6ba6546dd167297cb9ed69d0257ee245b0faea47 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Fri, 8 Jun 2012 11:11:20 +0200
Subject: [PATCH 2/2] 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.
Signed-off-by: Jan Kara <jack@suse.cz>
---
quotaio_xfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
index 2e879e6..903c03e 100644
--- a/quotaio_xfs.c
+++ b/quotaio_xfs.c
@@ -183,9 +183,9 @@ static int xfs_get_dquot(struct dquot *dq)
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;
--
1.7.7.6

View File

@ -34,6 +34,8 @@ Patch6: quota-4.00_pre1-Store-PID-of-quota_nld.patch
Patch7: quota-4.00-Do-not-report-missing-utmp-record-to-syslog.patch
# In upstream after 4.00
Patch8: quota-4.00-edquota-Fix-editting-of-more-users.patch
# Bug #837341, in upstream after 4.00
Patch9: quota-4.00-repquota-Fix-reporting-for-XFS.patch
%description
@ -114,6 +116,7 @@ Linux/UNIX environment.
%patch6 -p1 -b .store_pid
%patch7 -p1 -b .suppress_missing_utmp
%patch8 -p1 -b .edquota_more_users
%patch9 -p1 -b .repqouta_xfs
#fix typos/mistakes in localized documentation
for pofile in $(find ./po/*.p*)
@ -241,6 +244,7 @@ echo ' systemd-sysv-convert --apply quota_nld'
%changelog
* Tue Jul 03 2012 Petr Pisar <ppisar@redhat.com> - 1:4.00-4
- Fix editting more users with edquota
- Report all quotas on XFS (bug #837341)
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.00-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild