From: "Darrick J. Wong" <djwong@kernel.org>
To: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: The question of Q_XQUOTARM ioctl
Date: Mon, 3 Jan 2022 18:34:56 -0800 [thread overview]
Message-ID: <20220104023456.GE31606@magnolia> (raw)
In-Reply-To: <616F9367.3030801@fujitsu.com>
On Wed, Oct 20, 2021 at 03:56:10AM +0000, xuyang2018.jy@fujitsu.com wrote:
> Hi Darrick
>
> Sorry for bothering you again.
No problem. Sorry I lost this email for 2+ months. :(
> After Christoph Hellwig kernel patch("xfs: remove support for disabling
> quota accounting on a mounted file system"), we can't disable quota
> account feature on a mounted file system.
>
> It causes Q_XQUOTARM ioctl doesn't work well because this ioctl needs
> quota accouting feature is off and it also needs super block has quota
> feature[1].
>
> For quotactl man-pages about Q_XQUOTARM ioctl, it said "Free the disk
> space taken by disk quotas". I guess it free u/g/p inode.
Yes, that's what it's supposed to do.
> If we do normal mount with uquota feature and umount, then we should
> have free the inode(also changes in disk).
>
> I don't know the right intention for Q_XQUOTARM now. Can you give me
> some advise? Or, we should remove Q_XQUOTARM ioctl and
> xfs_qm_scall_trunc_qfile code.
I think xfs_qm_scall_trunc_qfiles probably should be doing:
if (xfs_has_quota(mp) || flags == 0 ||
(flags & ~XFS_QMOPT_QUOTALL)) {
xfs_debug(...);
return -EINVAL;
}
Note the inversion in the has_quota test. That would make it so that
you can truncate the quota files if quota is not on.
> If I understand wrong, please tell me.
>
> ps: Christoph Hellwig kernel patch causes ltp quotactl07 fail, I found
> his patch by this case.
>
> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/xfs/xfs_qm_syscalls.c#n108
Why doesn't xfs/220 fail on the remove command?
Oh, because we patched it to filter that out, even though that's the
wrong thing to do. That test really ought to remount with noquota and
then run xfs_quota -c remove $SCRATCH_DEV
--D
> Best Regards
> Yang Xu
next parent reply other threads:[~2022-01-04 2:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <616F9367.3030801@fujitsu.com>
2022-01-04 2:34 ` Darrick J. Wong [this message]
2022-01-04 7:21 ` The question of Q_XQUOTARM ioctl Christoph Hellwig
2022-01-04 20:46 ` Darrick J. Wong
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=20220104023456.GE31606@magnolia \
--to=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=xuyang2018.jy@fujitsu.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