* [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion @ 2024-08-12 9:12 Hongbo Li via Linux-f2fs-devel 2024-08-12 9:12 ` [f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options Hongbo Li via Linux-f2fs-devel 2024-08-12 10:43 ` [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel 0 siblings, 2 replies; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-08-12 9:12 UTC (permalink / raw) To: jaegeuk, chao; +Cc: lihongbo22, linux-f2fs-devel Since many filesystems have done the new mount API conversion, we introduce the new mount API conversion in f2fs. The series can be applied on top of the current mainline tree and the work is based on the patches from Lukas Czerner (has done this in ext4[1]). His patch give me a lot of ideas. Here is a high level description of the patchset: 1. Prepare the f2fs mount parameters required by the new mount API and use it for parsing, while still using the old API to get mount options string. Split the parameter parsing and validation of the parse_options helper into two separate helpers. f2fs: Add fs parameter specifications for mount options f2fs: move the option parser into handle_mount_opt f2fs: move option validation into a separate helper 2. Remove the use of sb/sbi structure of f2fs from all the parsing code, because with the new mount API the parsing is going to be done before we even get the super block. In this part, we introduce f2fs_fs_context to hold the temporary options when parsing. For the simple options check, it has to be done during parsing by using f2fs_fs_context structure. For the check which needs sb/sbi, we do this during super block filling. f2fs: Allow sbi to be NULL in f2fs_printk f2fs: Add f2fs_fs_context to record the mount options f2fs: separate the options parsing and options checking 3. Switch the f2fs to use the new mount API for mount and remount. f2fs: introduce fs_context_operation structure f2fs: switch to the new mount api 4. Cleanup the old unused structures and helpers. f2fs: remove unused structure and functions There is still a potential to do some cleanups and perhaps refactoring. However that can be done later after the conversion to the new mount API which is the main purpose of the patchset. [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ Hongbo Li (9): f2fs: Add fs parameter specifications for mount options f2fs: move the option parser into handle_mount_opt f2fs: move option validation into a separate helper f2fs: Allow sbi to be NULL in f2fs_printk f2fs: Add f2fs_fs_context to record the mount options f2fs: separate the options parsing and options checking f2fs: introduce fs_context_operation structure f2fs: switch to the new mount api f2fs: remove unused structure and functions fs/f2fs/super.c | 2213 ++++++++++++++++++++++++++++------------------- 1 file changed, 1343 insertions(+), 870 deletions(-) -- 2.34.1 _______________________________________________ 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] 11+ messages in thread
* [f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options 2024-08-12 9:12 [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel @ 2024-08-12 9:12 ` Hongbo Li via Linux-f2fs-devel 2024-08-12 10:43 ` [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel 1 sibling, 0 replies; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-08-12 9:12 UTC (permalink / raw) To: jaegeuk, chao; +Cc: lihongbo22, linux-f2fs-devel Use an array of `fs_parameter_spec` called f2fs_param_specs to hold the mount option specifications for the new mount api. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- fs/f2fs/super.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3959fd137cc9..dee482bcf6e9 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -28,6 +28,7 @@ #include <linux/part_stat.h> #include <linux/zstd.h> #include <linux/lz4.h> +#include <linux/fs_parser.h> #include "f2fs.h" #include "node.h" @@ -190,6 +191,91 @@ enum { Opt_age_extent_cache, Opt_errors, Opt_err, + Opt_jqfmt, + Opt_checkpoint, +}; + +static const struct constant_table f2fs_param_jqfmt[] = { + {"vfsold", QFMT_VFS_OLD}, + {"vfsv0", QFMT_VFS_V0}, + {"vfsv1", QFMT_VFS_V1}, + {} +}; + +static const struct constant_table f2fs_param_checkpoint[] = { + {"disable", Opt_checkpoint_disable}, + {"enable", Opt_checkpoint_enable}, + {} +}; + +static const struct fs_parameter_spec f2fs_param_specs[] = { + fsparam_string("background_gc", Opt_gc_background), + fsparam_flag("disable_roll_forward", Opt_disable_roll_forward), + fsparam_flag("norecovery", Opt_norecovery), + fsparam_flag("discard", Opt_discard), + fsparam_flag("nodiscard", Opt_nodiscard), + fsparam_flag("no_heap", Opt_noheap), + fsparam_flag("heap", Opt_heap), + fsparam_flag("user_xattr", Opt_user_xattr), + fsparam_flag("nouser_xattr", Opt_nouser_xattr), + fsparam_flag("acl", Opt_acl), + fsparam_flag("noacl", Opt_noacl), + fsparam_s32("active_logs", Opt_active_logs), + fsparam_flag("disable_ext_identify", Opt_disable_ext_identify), + fsparam_flag("inline_xattr", Opt_inline_xattr), + fsparam_flag("noinline_xattr", Opt_noinline_xattr), + fsparam_s32("inline_xattr_size", Opt_inline_xattr_size), + fsparam_flag("inline_data", Opt_inline_data), + fsparam_flag("inline_dentry", Opt_inline_dentry), + fsparam_flag("noinline_dentry", Opt_noinline_dentry), + fsparam_flag("flush_merge", Opt_flush_merge), + fsparam_flag("noflush_merge", Opt_noflush_merge), + fsparam_flag("barrier", Opt_barrier), + fsparam_flag("nobarrier", Opt_nobarrier), + fsparam_flag("fastboot", Opt_fastboot), + fsparam_flag("extent_cache", Opt_extent_cache), + fsparam_flag("noextent_cache", Opt_noextent_cache), + fsparam_flag("noinline_data", Opt_noinline_data), + fsparam_flag("data_flush", Opt_data_flush), + fsparam_u32("reserve_root", Opt_reserve_root), + fsparam_u32("resgid", Opt_resgid), + fsparam_u32("resuid", Opt_resuid), + fsparam_string("mode", Opt_mode), + fsparam_s32("fault_injection", Opt_fault_injection), + fsparam_u32("fault_type", Opt_fault_type), + fsparam_flag("quota", Opt_quota), + fsparam_flag("noquota", Opt_noquota), + 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_enum("jqfmt", Opt_jqfmt, f2fs_param_jqfmt), + fsparam_string("alloc_mode", Opt_alloc), + fsparam_string("fsync_mode", Opt_fsync), + fsparam_string("test_dummy_encryption", Opt_test_dummy_encryption), + fsparam_flag("test_dummy_encryption", Opt_test_dummy_encryption), + fsparam_flag("inlinecrypt", Opt_inlinecrypt), + fsparam_string("checkpoint", Opt_checkpoint_disable_cap), + fsparam_enum("checkpoint", Opt_checkpoint, f2fs_param_checkpoint), + fsparam_flag("checkpoint_merge", Opt_checkpoint_merge), + fsparam_flag("nocheckpoint_merge", Opt_nocheckpoint_merge), + fsparam_string("compress_algorithm", Opt_compress_algorithm), + fsparam_u32("compress_log_size", Opt_compress_log_size), + fsparam_string("compress_extension", Opt_compress_extension), + fsparam_string("nocompress_extension", Opt_nocompress_extension), + fsparam_flag("compress_chksum", Opt_compress_chksum), + fsparam_string("compress_mode", Opt_compress_mode), + fsparam_flag("compress_cache", Opt_compress_cache), + fsparam_flag("atgc", Opt_atgc), + fsparam_flag("gc_merge", Opt_gc_merge), + fsparam_flag("nogc_merge", Opt_nogc_merge), + fsparam_string("discard_unit", Opt_discard_unit), + fsparam_string("memory", Opt_memory_mode), + fsparam_flag("age_extent_cache", Opt_age_extent_cache), + fsparam_string("errors", Opt_errors), + {} }; static match_table_t f2fs_tokens = { -- 2.34.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-12 9:12 [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel 2024-08-12 9:12 ` [f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options Hongbo Li via Linux-f2fs-devel @ 2024-08-12 10:43 ` Hongbo Li via Linux-f2fs-devel 1 sibling, 0 replies; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-08-12 10:43 UTC (permalink / raw) To: jaegeuk, chao; +Cc: linux-f2fs-devel Sorry, just ignore this, I will send the whole patch set later. Thanks, Hongbo On 2024/8/12 17:12, Hongbo Li wrote: > Since many filesystems have done the new mount API conversion, > we introduce the new mount API conversion in f2fs. > > The series can be applied on top of the current mainline tree > and the work is based on the patches from Lukas Czerner (has > done this in ext4[1]). His patch give me a lot of ideas. > > Here is a high level description of the patchset: > > 1. Prepare the f2fs mount parameters required by the new mount > API and use it for parsing, while still using the old API to > get mount options string. Split the parameter parsing and > validation of the parse_options helper into two separate > helpers. > > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > > 2. Remove the use of sb/sbi structure of f2fs from all the > parsing code, because with the new mount API the parsing is > going to be done before we even get the super block. In this > part, we introduce f2fs_fs_context to hold the temporary > options when parsing. For the simple options check, it has > to be done during parsing by using f2fs_fs_context structure. > For the check which needs sb/sbi, we do this during super > block filling. > > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > > 3. Switch the f2fs to use the new mount API for mount and > remount. > > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > > 4. Cleanup the old unused structures and helpers. > > f2fs: remove unused structure and functions > > There is still a potential to do some cleanups and perhaps > refactoring. However that can be done later after the conversion > to the new mount API which is the main purpose of the patchset. > > [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ > > Hongbo Li (9): > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > f2fs: remove unused structure and functions > > fs/f2fs/super.c | 2213 ++++++++++++++++++++++++++++------------------- > 1 file changed, 1343 insertions(+), 870 deletions(-) > _______________________________________________ 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] 11+ messages in thread
* [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion
@ 2024-08-14 2:39 Hongbo Li via Linux-f2fs-devel
2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Hongbo Li via Linux-f2fs-devel @ 2024-08-14 2:39 UTC (permalink / raw)
To: jaegeuk, chao
Cc: linux-fsdevel, lczerner, brauner, lihongbo22, linux-f2fs-devel
Since many filesystems have done the new mount API conversion,
we introduce the new mount API conversion in f2fs.
The series can be applied on top of the current mainline tree
and the work is based on the patches from Lukas Czerner (has
done this in ext4[1]). His patch give me a lot of ideas.
Here is a high level description of the patchset:
1. Prepare the f2fs mount parameters required by the new mount
API and use it for parsing, while still using the old API to
get mount options string. Split the parameter parsing and
validation of the parse_options helper into two separate
helpers.
f2fs: Add fs parameter specifications for mount options
f2fs: move the option parser into handle_mount_opt
f2fs: move option validation into a separate helper
2. Remove the use of sb/sbi structure of f2fs from all the
parsing code, because with the new mount API the parsing is
going to be done before we even get the super block. In this
part, we introduce f2fs_fs_context to hold the temporary
options when parsing. For the simple options check, it has
to be done during parsing by using f2fs_fs_context structure.
For the check which needs sb/sbi, we do this during super
block filling.
f2fs: Allow sbi to be NULL in f2fs_printk
f2fs: Add f2fs_fs_context to record the mount options
f2fs: separate the options parsing and options checking
3. Switch the f2fs to use the new mount API for mount and
remount.
f2fs: introduce fs_context_operation structure
f2fs: switch to the new mount api
4. Cleanup the old unused structures and helpers.
f2fs: remove unused structure and functions
There is still a potential to do some cleanups and perhaps
refactoring. However that can be done later after the conversion
to the new mount API which is the main purpose of the patchset.
[1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/
Hongbo Li (9):
f2fs: Add fs parameter specifications for mount options
f2fs: move the option parser into handle_mount_opt
f2fs: move option validation into a separate helper
f2fs: Allow sbi to be NULL in f2fs_printk
f2fs: Add f2fs_fs_context to record the mount options
f2fs: separate the options parsing and options checking
f2fs: introduce fs_context_operation structure
f2fs: switch to the new mount api
f2fs: remove unused structure and functions
fs/f2fs/super.c | 2211 ++++++++++++++++++++++++++++-------------------
1 file changed, 1341 insertions(+), 870 deletions(-)
--
2.34.1
_______________________________________________
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] 11+ messages in thread* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-14 2:39 Hongbo Li via Linux-f2fs-devel @ 2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel 2024-08-30 17:07 ` Eric Sandeen 2024-09-11 2:04 ` Hongbo Li via Linux-f2fs-devel 2025-07-11 16:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel 2 siblings, 1 reply; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-08-27 11:47 UTC (permalink / raw) To: jaegeuk, chao; +Cc: linux-fsdevel, lczerner, brauner, linux-f2fs-devel Does there exist CI test for f2fs? I can only write the mount test for f2fs refer to tests/ext4/053. And I have tested this in local. Thanks, Hongbo On 2024/8/14 10:39, Hongbo Li wrote: > Since many filesystems have done the new mount API conversion, > we introduce the new mount API conversion in f2fs. > > The series can be applied on top of the current mainline tree > and the work is based on the patches from Lukas Czerner (has > done this in ext4[1]). His patch give me a lot of ideas. > > Here is a high level description of the patchset: > > 1. Prepare the f2fs mount parameters required by the new mount > API and use it for parsing, while still using the old API to > get mount options string. Split the parameter parsing and > validation of the parse_options helper into two separate > helpers. > > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > > 2. Remove the use of sb/sbi structure of f2fs from all the > parsing code, because with the new mount API the parsing is > going to be done before we even get the super block. In this > part, we introduce f2fs_fs_context to hold the temporary > options when parsing. For the simple options check, it has > to be done during parsing by using f2fs_fs_context structure. > For the check which needs sb/sbi, we do this during super > block filling. > > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > > 3. Switch the f2fs to use the new mount API for mount and > remount. > > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > > 4. Cleanup the old unused structures and helpers. > > f2fs: remove unused structure and functions > > There is still a potential to do some cleanups and perhaps > refactoring. However that can be done later after the conversion > to the new mount API which is the main purpose of the patchset. > > [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ > > Hongbo Li (9): > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > f2fs: remove unused structure and functions > > fs/f2fs/super.c | 2211 ++++++++++++++++++++++++++++------------------- > 1 file changed, 1341 insertions(+), 870 deletions(-) > _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel @ 2024-08-30 17:07 ` Eric Sandeen 2024-08-31 1:45 ` Hongbo Li via Linux-f2fs-devel 0 siblings, 1 reply; 11+ messages in thread From: Eric Sandeen @ 2024-08-30 17:07 UTC (permalink / raw) To: Hongbo Li, jaegeuk, chao Cc: linux-fsdevel, lczerner, brauner, linux-f2fs-devel Just FWIW - I had missed this thread when I got temporarily unsubscribed from fsdevel. I have a series that I was hacking on for this same work, at https://git.kernel.org/pub/scm/linux/kernel/git/sandeen/linux.git/commit/?h=f2fs-mount-api but it's very rough and almost certainly contains bugs. It may or may not be of any help to you, but just FYI. I'll try to help review/test your series since I tried to solve this as well, but I never completed the work. :) Thanks, -Eric On 8/27/24 6:47 AM, Hongbo Li wrote: > Does there exist CI test for f2fs? I can only write the mount test for f2fs refer to tests/ext4/053. And I have tested this in local. > > Thanks, > Hongbo > > On 2024/8/14 10:39, Hongbo Li wrote: >> Since many filesystems have done the new mount API conversion, >> we introduce the new mount API conversion in f2fs. >> >> The series can be applied on top of the current mainline tree >> and the work is based on the patches from Lukas Czerner (has >> done this in ext4[1]). His patch give me a lot of ideas. >> >> Here is a high level description of the patchset: >> >> 1. Prepare the f2fs mount parameters required by the new mount >> API and use it for parsing, while still using the old API to >> get mount options string. Split the parameter parsing and >> validation of the parse_options helper into two separate >> helpers. >> >> f2fs: Add fs parameter specifications for mount options >> f2fs: move the option parser into handle_mount_opt >> f2fs: move option validation into a separate helper >> >> 2. Remove the use of sb/sbi structure of f2fs from all the >> parsing code, because with the new mount API the parsing is >> going to be done before we even get the super block. In this >> part, we introduce f2fs_fs_context to hold the temporary >> options when parsing. For the simple options check, it has >> to be done during parsing by using f2fs_fs_context structure. >> For the check which needs sb/sbi, we do this during super >> block filling. >> >> f2fs: Allow sbi to be NULL in f2fs_printk >> f2fs: Add f2fs_fs_context to record the mount options >> f2fs: separate the options parsing and options checking >> >> 3. Switch the f2fs to use the new mount API for mount and >> remount. >> >> f2fs: introduce fs_context_operation structure >> f2fs: switch to the new mount api >> >> 4. Cleanup the old unused structures and helpers. >> >> f2fs: remove unused structure and functions >> >> There is still a potential to do some cleanups and perhaps >> refactoring. However that can be done later after the conversion >> to the new mount API which is the main purpose of the patchset. >> >> [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ >> >> Hongbo Li (9): >> f2fs: Add fs parameter specifications for mount options >> f2fs: move the option parser into handle_mount_opt >> f2fs: move option validation into a separate helper >> f2fs: Allow sbi to be NULL in f2fs_printk >> f2fs: Add f2fs_fs_context to record the mount options >> f2fs: separate the options parsing and options checking >> f2fs: introduce fs_context_operation structure >> f2fs: switch to the new mount api >> f2fs: remove unused structure and functions >> >> fs/f2fs/super.c | 2211 ++++++++++++++++++++++++++++------------------- >> 1 file changed, 1341 insertions(+), 870 deletions(-) >> > _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-30 17:07 ` Eric Sandeen @ 2024-08-31 1:45 ` Hongbo Li via Linux-f2fs-devel 0 siblings, 0 replies; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-08-31 1:45 UTC (permalink / raw) To: Eric Sandeen, jaegeuk, chao Cc: linux-fsdevel, lczerner, brauner, linux-f2fs-devel On 2024/8/31 1:07, Eric Sandeen wrote: > Just FWIW - > > I had missed this thread when I got temporarily unsubscribed from fsdevel. > I have a series that I was hacking on for this same work, at > https://git.kernel.org/pub/scm/linux/kernel/git/sandeen/linux.git/commit/?h=f2fs-mount-api > but it's very rough and almost certainly contains bugs. It may or may not > be of any help to you, but just FYI. > > I'll try to help review/test your series since I tried to solve this as > well, but I never completed the work. :) That will be great! Thank you very much! There is still a lot of refactoring that can be done. At the time, the consideration was to make the smallest possible changes, so many places were essentially preserved. We can work together to make this better. Thanks, Hongbo > > Thanks, > -Eric > > On 8/27/24 6:47 AM, Hongbo Li wrote: >> Does there exist CI test for f2fs? I can only write the mount test for f2fs refer to tests/ext4/053. And I have tested this in local. >> >> Thanks, >> Hongbo >> >> On 2024/8/14 10:39, Hongbo Li wrote: >>> Since many filesystems have done the new mount API conversion, >>> we introduce the new mount API conversion in f2fs. >>> >>> The series can be applied on top of the current mainline tree >>> and the work is based on the patches from Lukas Czerner (has >>> done this in ext4[1]). His patch give me a lot of ideas. >>> >>> Here is a high level description of the patchset: >>> >>> 1. Prepare the f2fs mount parameters required by the new mount >>> API and use it for parsing, while still using the old API to >>> get mount options string. Split the parameter parsing and >>> validation of the parse_options helper into two separate >>> helpers. >>> >>> f2fs: Add fs parameter specifications for mount options >>> f2fs: move the option parser into handle_mount_opt >>> f2fs: move option validation into a separate helper >>> >>> 2. Remove the use of sb/sbi structure of f2fs from all the >>> parsing code, because with the new mount API the parsing is >>> going to be done before we even get the super block. In this >>> part, we introduce f2fs_fs_context to hold the temporary >>> options when parsing. For the simple options check, it has >>> to be done during parsing by using f2fs_fs_context structure. >>> For the check which needs sb/sbi, we do this during super >>> block filling. >>> >>> f2fs: Allow sbi to be NULL in f2fs_printk >>> f2fs: Add f2fs_fs_context to record the mount options >>> f2fs: separate the options parsing and options checking >>> >>> 3. Switch the f2fs to use the new mount API for mount and >>> remount. >>> >>> f2fs: introduce fs_context_operation structure >>> f2fs: switch to the new mount api >>> >>> 4. Cleanup the old unused structures and helpers. >>> >>> f2fs: remove unused structure and functions >>> >>> There is still a potential to do some cleanups and perhaps >>> refactoring. However that can be done later after the conversion >>> to the new mount API which is the main purpose of the patchset. >>> >>> [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ >>> >>> Hongbo Li (9): >>> f2fs: Add fs parameter specifications for mount options >>> f2fs: move the option parser into handle_mount_opt >>> f2fs: move option validation into a separate helper >>> f2fs: Allow sbi to be NULL in f2fs_printk >>> f2fs: Add f2fs_fs_context to record the mount options >>> f2fs: separate the options parsing and options checking >>> f2fs: introduce fs_context_operation structure >>> f2fs: switch to the new mount api >>> f2fs: remove unused structure and functions >>> >>> fs/f2fs/super.c | 2211 ++++++++++++++++++++++++++++------------------- >>> 1 file changed, 1341 insertions(+), 870 deletions(-) >>> >> > _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-14 2:39 Hongbo Li via Linux-f2fs-devel 2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel @ 2024-09-11 2:04 ` Hongbo Li via Linux-f2fs-devel 2024-09-12 1:11 ` Chao Yu via Linux-f2fs-devel 2025-07-11 16:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel 2 siblings, 1 reply; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-09-11 2:04 UTC (permalink / raw) To: jaegeuk, chao Cc: linux-fsdevel, lczerner, brauner, Eric Sandeen, linux-f2fs-devel Is the subject of the email required to be [f2fs-dev][PATCH]? Thanks, Hongbo On 2024/8/14 10:39, Hongbo Li wrote: > Since many filesystems have done the new mount API conversion, > we introduce the new mount API conversion in f2fs. > > The series can be applied on top of the current mainline tree > and the work is based on the patches from Lukas Czerner (has > done this in ext4[1]). His patch give me a lot of ideas. > > Here is a high level description of the patchset: > > 1. Prepare the f2fs mount parameters required by the new mount > API and use it for parsing, while still using the old API to > get mount options string. Split the parameter parsing and > validation of the parse_options helper into two separate > helpers. > > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > > 2. Remove the use of sb/sbi structure of f2fs from all the > parsing code, because with the new mount API the parsing is > going to be done before we even get the super block. In this > part, we introduce f2fs_fs_context to hold the temporary > options when parsing. For the simple options check, it has > to be done during parsing by using f2fs_fs_context structure. > For the check which needs sb/sbi, we do this during super > block filling. > > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > > 3. Switch the f2fs to use the new mount API for mount and > remount. > > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > > 4. Cleanup the old unused structures and helpers. > > f2fs: remove unused structure and functions > > There is still a potential to do some cleanups and perhaps > refactoring. However that can be done later after the conversion > to the new mount API which is the main purpose of the patchset. > > [1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/ > > Hongbo Li (9): > f2fs: Add fs parameter specifications for mount options > f2fs: move the option parser into handle_mount_opt > f2fs: move option validation into a separate helper > f2fs: Allow sbi to be NULL in f2fs_printk > f2fs: Add f2fs_fs_context to record the mount options > f2fs: separate the options parsing and options checking > f2fs: introduce fs_context_operation structure > f2fs: switch to the new mount api > f2fs: remove unused structure and functions > > fs/f2fs/super.c | 2211 ++++++++++++++++++++++++++++------------------- > 1 file changed, 1341 insertions(+), 870 deletions(-) > _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-09-11 2:04 ` Hongbo Li via Linux-f2fs-devel @ 2024-09-12 1:11 ` Chao Yu via Linux-f2fs-devel 2024-09-12 1:49 ` Hongbo Li via Linux-f2fs-devel 0 siblings, 1 reply; 11+ messages in thread From: Chao Yu via Linux-f2fs-devel @ 2024-09-12 1:11 UTC (permalink / raw) To: Hongbo Li, jaegeuk; +Cc: linux-f2fs-devel On 2024/9/11 10:04, Hongbo Li wrote: > Is the subject of the email required to be [f2fs-dev][PATCH]? Hongbo, "[f2fs-dev]" prefix is added by f2fs mailing list when it forwards your patch to someone who subscribes the list, if you receive a patch w/o f2fs-dev prefix, it is because you Sent/Cced patch to yourself, and the list selected to not send you another email which has prefix based on your mailing list option, IIUC. So, it doesn't matter. :) Thanks, _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-09-12 1:11 ` Chao Yu via Linux-f2fs-devel @ 2024-09-12 1:49 ` Hongbo Li via Linux-f2fs-devel 0 siblings, 0 replies; 11+ messages in thread From: Hongbo Li via Linux-f2fs-devel @ 2024-09-12 1:49 UTC (permalink / raw) To: Chao Yu, jaegeuk; +Cc: linux-f2fs-devel On 2024/9/12 9:11, Chao Yu wrote: > On 2024/9/11 10:04, Hongbo Li wrote: >> Is the subject of the email required to be [f2fs-dev][PATCH]? > > Hongbo, > > "[f2fs-dev]" prefix is added by f2fs mailing list when it forwards > your patch to someone who subscribes the list, if you receive a patch > w/o f2fs-dev prefix, it is because you Sent/Cced patch to yourself, > and the list selected to not send you another email which has prefix > based on your mailing list option, IIUC. oh, I got it, thank you! Thanks, Hongbo > > So, it doesn't matter. :) > > Thanks, _______________________________________________ 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] 11+ messages in thread
* Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion 2024-08-14 2:39 Hongbo Li via Linux-f2fs-devel 2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel 2024-09-11 2:04 ` Hongbo Li via Linux-f2fs-devel @ 2025-07-11 16:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel 2 siblings, 0 replies; 11+ messages in thread From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2025-07-11 16:30 UTC (permalink / raw) To: Hongbo Li; +Cc: brauner, linux-f2fs-devel, lczerner, linux-fsdevel, jaegeuk Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Wed, 14 Aug 2024 10:39:03 +0800 you wrote: > Since many filesystems have done the new mount API conversion, > we introduce the new mount API conversion in f2fs. > > The series can be applied on top of the current mainline tree > and the work is based on the patches from Lukas Czerner (has > done this in ext4[1]). His patch give me a lot of ideas. > > [...] Here is the summary with links: - [f2fs-dev,1/9] f2fs: Add fs parameter specifications for mount options (no matching commit) - [f2fs-dev,2/9] f2fs: move the option parser into handle_mount_opt (no matching commit) - [f2fs-dev,3/9] f2fs: move option validation into a separate helper (no matching commit) - [f2fs-dev,4/9] f2fs: Allow sbi to be NULL in f2fs_printk (no matching commit) - [f2fs-dev,5/9] f2fs: Add f2fs_fs_context to record the mount options (no matching commit) - [f2fs-dev,6/9] f2fs: separate the options parsing and options checking (no matching commit) - [f2fs-dev,7/9] f2fs: introduce fs_context_operation structure https://git.kernel.org/jaegeuk/f2fs/c/54e12a4e0209 - [f2fs-dev,8/9] f2fs: switch to the new mount api (no matching commit) - [f2fs-dev,9/9] f2fs: remove unused structure and functions (no matching commit) You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ 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] 11+ messages in thread
end of thread, other threads:[~2025-07-11 16:30 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-12 9:12 [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel 2024-08-12 9:12 ` [f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options Hongbo Li via Linux-f2fs-devel 2024-08-12 10:43 ` [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion Hongbo Li via Linux-f2fs-devel -- strict thread matches above, loose matches on Subject: below -- 2024-08-14 2:39 Hongbo Li via Linux-f2fs-devel 2024-08-27 11:47 ` Hongbo Li via Linux-f2fs-devel 2024-08-30 17:07 ` Eric Sandeen 2024-08-31 1:45 ` Hongbo Li via Linux-f2fs-devel 2024-09-11 2:04 ` Hongbo Li via Linux-f2fs-devel 2024-09-12 1:11 ` Chao Yu via Linux-f2fs-devel 2024-09-12 1:49 ` Hongbo Li via Linux-f2fs-devel 2025-07-11 16:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).