[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f503b139-ba90-40ae-8900-db0ba7789525@huawei.com>
Date: Mon, 18 Aug 2025 16:06:27 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Chao Yu <chao@...nel.org>, <jaegeuk@...nel.org>
CC: <linux-f2fs-devel@...ts.sourceforge.net>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] f2fs: fix to allow removing qf_name
Hi Chao,
On 2025/8/18 10:09, Chao Yu wrote:
> The mount behavior changed after commit d18535132523 ("f2fs: separate the
> options parsing and options checking"), let's fix it.
>
> [Scripts]
> mkfs.f2fs -f /dev/vdb
> mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs
> quotacheck -uc /mnt/f2fs
> umount /mnt/f2fs
> mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold /dev/vdb /mnt/f2fs
> mount|grep f2fs
> mount -t f2fs -o remount,usrjquota=,jqfmt=vfsold /dev/vdb /mnt/f2fs
> mount|grep f2fs
> dmesg
>
> [Before commit]
> mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,...
> mount#2: ...,quota,jqfmt=vfsold,...
> kmsg: no output
>
> [After commit]
> mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,...
> mount#2: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,...
> kmsg: "user quota file already specified"
>
> [After patch]
> mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,...
> mount#2: ...,quota,jqfmt=vfsold,...
> kmsg: "remove qf_name aquota.user"
>
> Fixes: d18535132523 ("f2fs: separate the options parsing and options checking")
> Cc: Hongbo Li <lihongbo22@...wei.com>
> Signed-off-by: Chao Yu <chao@...nel.org>
> ---
> fs/f2fs/super.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 465604fdc5dd..07f6c8cac07a 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1219,8 +1219,11 @@ static int f2fs_check_quota_consistency(struct fs_context *fc,
> goto err_jquota_change;
>
> if (old_qname) {
> - if (new_qname &&
> - strcmp(old_qname, new_qname) == 0) {
> + if (!new_qname) {
Thanks for catching this. Do we also need the patch 1/2 ? It seems this
patch also solve the syzbot problems.
Thanks,
Hongbo
> + f2fs_info(sbi, "remove qf_name %s",
> + old_qname);
> + continue;
> + } else if (strcmp(old_qname, new_qname) == 0) {
> ctx->qname_mask &= ~(1 << i);
> continue;
> }
Powered by blists - more mailing lists