* [PATCH] f2fs: allow empty mount string for Opt_usr|grp|projjquota
@ 2026-03-31 17:43 Jaegeuk Kim
2026-04-06 16:07 ` [f2fs-dev] " Daeho Jeong
2026-04-06 16:59 ` [PATCH v2] " Jaegeuk Kim
0 siblings, 2 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2026-03-31 17:43 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim
The fsparam_string_empty() gives an error when mounting without string, since
its type is set to fsparam_flag in VFS. So, let's allow the flag as well.
This addresses xfstests/f2fs/015 and f2fs/021.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/super.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 5330ef981340..aab4345f3ee7 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -337,9 +337,12 @@ static const struct fs_parameter_spec f2fs_param_specs[] = {
fsparam_flag("usrquota", Opt_usrquota),
fsparam_flag("grpquota", Opt_grpquota),
fsparam_flag("prjquota", Opt_prjquota),
- fsparam_string_empty("usrjquota", Opt_usrjquota),
- fsparam_string_empty("grpjquota", Opt_grpjquota),
- fsparam_string_empty("prjjquota", Opt_prjjquota),
+ fsparam_string("usrjquota", Opt_usrjquota),
+ fsparam_flag("usrjquota", Opt_usrjquota),
+ fsparam_string("grpjquota", Opt_grpjquota),
+ fsparam_flag("grpjquota", Opt_grpjquota),
+ fsparam_string("prjjquota", Opt_prjjquota),
+ fsparam_flag("prjjquota", Opt_prjjquota),
fsparam_flag("nat_bits", Opt_nat_bits),
fsparam_enum("jqfmt", Opt_jqfmt, f2fs_param_jqfmt),
fsparam_enum("alloc_mode", Opt_alloc, f2fs_param_alloc_mode),
@@ -980,26 +983,26 @@ static int f2fs_parse_param(struct fs_context *fc, struct fs_parameter *param)
ctx_set_opt(ctx, F2FS_MOUNT_PRJQUOTA);
break;
case Opt_usrjquota:
- if (!*param->string)
- ret = f2fs_unnote_qf_name(fc, USRQUOTA);
- else
+ if (param->type == fs_value_is_string && *param->string)
ret = f2fs_note_qf_name(fc, USRQUOTA, param);
+ else
+ ret = f2fs_unnote_qf_name(fc, USRQUOTA);
if (ret)
return ret;
break;
case Opt_grpjquota:
- if (!*param->string)
- ret = f2fs_unnote_qf_name(fc, GRPQUOTA);
- else
+ if (param->type == fs_value_is_string && *param->string)
ret = f2fs_note_qf_name(fc, GRPQUOTA, param);
+ else
+ ret = f2fs_unnote_qf_name(fc, GRPQUOTA);
if (ret)
return ret;
break;
case Opt_prjjquota:
- if (!*param->string)
- ret = f2fs_unnote_qf_name(fc, PRJQUOTA);
- else
+ if (param->type == fs_value_is_string && *param->string)
ret = f2fs_note_qf_name(fc, PRJQUOTA, param);
+ else
+ ret = f2fs_unnote_qf_name(fc, PRJQUOTA);
if (ret)
return ret;
break;
--
2.53.0.1118.gaef5881109-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [f2fs-dev] [PATCH] f2fs: allow empty mount string for Opt_usr|grp|projjquota
2026-03-31 17:43 [PATCH] f2fs: allow empty mount string for Opt_usr|grp|projjquota Jaegeuk Kim
@ 2026-04-06 16:07 ` Daeho Jeong
2026-04-06 16:59 ` [PATCH v2] " Jaegeuk Kim
1 sibling, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-04-06 16:07 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel
On Tue, Mar 31, 2026 at 10:45 AM Jaegeuk Kim via Linux-f2fs-devel
<linux-f2fs-devel@lists.sourceforge.net> wrote:
>
> The fsparam_string_empty() gives an error when mounting without string, since
> its type is set to fsparam_flag in VFS. So, let's allow the flag as well.
>
> This addresses xfstests/f2fs/015 and f2fs/021.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/super.c | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 5330ef981340..aab4345f3ee7 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -337,9 +337,12 @@ static const struct fs_parameter_spec f2fs_param_specs[] = {
> fsparam_flag("usrquota", Opt_usrquota),
> fsparam_flag("grpquota", Opt_grpquota),
> fsparam_flag("prjquota", Opt_prjquota),
> - fsparam_string_empty("usrjquota", Opt_usrjquota),
> - fsparam_string_empty("grpjquota", Opt_grpjquota),
> - fsparam_string_empty("prjjquota", Opt_prjjquota),
> + fsparam_string("usrjquota", Opt_usrjquota),
> + fsparam_flag("usrjquota", Opt_usrjquota),
> + fsparam_string("grpjquota", Opt_grpjquota),
> + fsparam_flag("grpjquota", Opt_grpjquota),
> + fsparam_string("prjjquota", Opt_prjjquota),
> + fsparam_flag("prjjquota", Opt_prjjquota),
> fsparam_flag("nat_bits", Opt_nat_bits),
> fsparam_enum("jqfmt", Opt_jqfmt, f2fs_param_jqfmt),
> fsparam_enum("alloc_mode", Opt_alloc, f2fs_param_alloc_mode),
> @@ -980,26 +983,26 @@ static int f2fs_parse_param(struct fs_context *fc, struct fs_parameter *param)
> ctx_set_opt(ctx, F2FS_MOUNT_PRJQUOTA);
> break;
> case Opt_usrjquota:
> - if (!*param->string)
> - ret = f2fs_unnote_qf_name(fc, USRQUOTA);
> - else
> + if (param->type == fs_value_is_string && *param->string)
> ret = f2fs_note_qf_name(fc, USRQUOTA, param);
> + else
> + ret = f2fs_unnote_qf_name(fc, USRQUOTA);
> if (ret)
> return ret;
> break;
> case Opt_grpjquota:
> - if (!*param->string)
> - ret = f2fs_unnote_qf_name(fc, GRPQUOTA);
> - else
> + if (param->type == fs_value_is_string && *param->string)
> ret = f2fs_note_qf_name(fc, GRPQUOTA, param);
> + else
> + ret = f2fs_unnote_qf_name(fc, GRPQUOTA);
> if (ret)
> return ret;
> break;
> case Opt_prjjquota:
> - if (!*param->string)
> - ret = f2fs_unnote_qf_name(fc, PRJQUOTA);
> - else
> + if (param->type == fs_value_is_string && *param->string)
> ret = f2fs_note_qf_name(fc, PRJQUOTA, param);
> + else
> + ret = f2fs_unnote_qf_name(fc, PRJQUOTA);
> if (ret)
> return ret;
> break;
> --
> 2.53.0.1118.gaef5881109-goog
>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] f2fs: allow empty mount string for Opt_usr|grp|projjquota
2026-03-31 17:43 [PATCH] f2fs: allow empty mount string for Opt_usr|grp|projjquota Jaegeuk Kim
2026-04-06 16:07 ` [f2fs-dev] " Daeho Jeong
@ 2026-04-06 16:59 ` Jaegeuk Kim
2026-04-06 17:34 ` [f2fs-dev] " Daeho Jeong
1 sibling, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2026-04-06 16:59 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel
Let's check mmap writes onto the large folio.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 2c4880f24b54..652b4534349b 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -82,7 +82,8 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
int err = 0;
vm_fault_t ret;
- if (unlikely(IS_IMMUTABLE(inode)))
+ if (unlikely(IS_IMMUTABLE(inode)) ||
+ mapping_large_folio_support(inode->i_mapping))
return VM_FAULT_SIGBUS;
if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
--
2.53.0.1213.gd9a14994de-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [f2fs-dev] [PATCH v2] f2fs: allow empty mount string for Opt_usr|grp|projjquota
2026-04-06 16:59 ` [PATCH v2] " Jaegeuk Kim
@ 2026-04-06 17:34 ` Daeho Jeong
0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-04-06 17:34 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel
On Mon, Apr 6, 2026 at 10:00 AM Jaegeuk Kim via Linux-f2fs-devel
<linux-f2fs-devel@lists.sourceforge.net> wrote:
>
> Let's check mmap writes onto the large folio.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/file.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 2c4880f24b54..652b4534349b 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -82,7 +82,8 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
> int err = 0;
> vm_fault_t ret;
>
> - if (unlikely(IS_IMMUTABLE(inode)))
> + if (unlikely(IS_IMMUTABLE(inode)) ||
> + mapping_large_folio_support(inode->i_mapping))
> return VM_FAULT_SIGBUS;
>
> if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> --
> 2.53.0.1213.gd9a14994de-goog
>
>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-06 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 17:43 [PATCH] f2fs: allow empty mount string for Opt_usr|grp|projjquota Jaegeuk Kim
2026-04-06 16:07 ` [f2fs-dev] " Daeho Jeong
2026-04-06 16:59 ` [PATCH v2] " Jaegeuk Kim
2026-04-06 17:34 ` [f2fs-dev] " Daeho Jeong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox