From: Zorro Lang <zlang@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: sandeen@redhat.com, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_quota: fall back silently if XFS_GETNEXTQUOTA fails
Date: Tue, 2 Aug 2016 21:14:27 +0800 [thread overview]
Message-ID: <20160802131427.GD16413@zlang.usersys.redhat.com> (raw)
In-Reply-To: <20160802122721.GE31492@infradead.org>
On Tue, Aug 02, 2016 at 05:27:21AM -0700, Christoph Hellwig wrote:
> On Tue, Aug 02, 2016 at 02:49:00PM +0800, Zorro Lang wrote:
> > After XFS_GETNEXTQUOTA feature has been merged into linux kernel and
> > xfsprogs, xfs_quota use Q_XGETNEXTQUOTA for report and dump, and
> > fall back to old XFS_GETQUOTA ioctl if XFS_GETNEXTQUOTA fails.
> >
> > But when XFS_GETNEXTQUOTA fails, xfs_quota print a warning as
> > "XFS_GETQUOTA: Invalid argument". That's due to kernel can't
> > recognize XFS_GETNEXTQUOTA ioctl and return EINVAL. At this time,
> > the warning is helpless, xfs_quota just need to fall back.
>
> We'd still want to report other errors, right?
Yes. This patch will make xfs_quota's report and dump command report
nothing if XFS_GETNEXTQUOTA fails and falls back to XFS_GETQUOTA.
But if XFS_GETQUOTA fails, it'll report errors.
As I mentioned in email, we don't report errors if XFS_GETNEXTQUOTA
fails, or we don't report errors if kernel has no XFS_GETNEXTQUOTA
feature? The first one won't report any errors from XFS_GETNEXTQUOTA call,
include kernel has no this feature.
So:
"cmd == XFS_GETQUOTA" or "!(cmd == XFS_GETNEXTQUOTA && errno == EINVAL)"
I think they all make sense. Do you have any suggestions?
Thanks,
Zorro
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-08-02 13:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 6:49 [PATCH] xfs_quota: fall back silently if XFS_GETNEXTQUOTA fails Zorro Lang
2016-08-02 12:27 ` Christoph Hellwig
2016-08-02 13:14 ` Zorro Lang [this message]
2016-08-02 15:54 ` Eric Sandeen
2016-08-02 15:06 ` Eric Sandeen
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=20160802131427.GD16413@zlang.usersys.redhat.com \
--to=zlang@redhat.com \
--cc=hch@infradead.org \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox