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@xxxxxxxxxxx > http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs