From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH V2] xfs_quota: don't try to report quotas which aren't there.
Date: Fri, 18 Feb 2011 11:55:08 -0600 [thread overview]
Message-ID: <4D5EB27C.3070306@redhat.com> (raw)
In-Reply-To: <4D5EB09A.3030605@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1152 bytes --]
Red Hat bug #669333 - xfs_quota generates "XFS_GETQUOTA: No such process" errors
shows that if you do this for a filesystem w/o group quota enabled:
# xfs_quota -x -c ' report -h ' /xfsquota"
You'll get this output:
User quota on /xfsquota (/dev/vdb)
Blocks
User ID Used Soft Hard Warn/Grace
---------- ---------------------------------
root 0 0 0 00 [------]
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
...
because we're calling XFS_GETQUOTA for types which aren't enabled.
The below patch fixes it for me, just ignoring types that aren't
there. Thanks to Arkadiusz Miskiewicz for pointing out the simpler
fix. :)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/quota/report.c b/quota/report.c
index 0e005c3..7d391c6 100644
--- a/quota/report.c
+++ b/quota/report.c
@@ -302,7 +302,7 @@ report_mount(
int count;
if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0) {
- if (errno != ENOENT && errno != ENOSYS)
+ if (errno != ENOENT && errno != ENOSYS && errno != ESRCH)
perror("XFS_GETQUOTA");
return 0;
}
[-- Attachment #1.2: Type: text/html, Size: 1697 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-02-18 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 17:47 [PATCH] xfs_quota: don't try to report quotas which aren't there Eric Sandeen
2011-02-18 17:55 ` Eric Sandeen [this message]
2011-02-18 18:02 ` [PATCH V3] " Eric Sandeen
2011-02-20 21:16 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D5EB27C.3070306@redhat.com \
--to=sandeen@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.