[f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-08-12 Thread Hongbo Li via 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. Her

[f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options

2024-08-12 Thread Hongbo Li via 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 --- fs/f2fs/super.c | 86 + 1 file changed, 86 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs

Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-08-12 Thread Hongbo Li via 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 an

[f2fs-dev] [PATCH 6/9] f2fs: separate the options parsing and options checking

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
The new mount api separates option parsing and super block setup into two distinc steps and so we need to separate the options parsing out of the parse_options(). In order to achieve this, here we handle the mount options with three steps: - Firstly, we move sb/sbi out of handle_mount_opt. A

[f2fs-dev] [PATCH 9/9] f2fs: remove unused structure and functions

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
The match_table_t and other some functions (which have been replaced during reconstructure) now are not used, so we can remove them. Signed-off-by: Hongbo Li --- fs/f2fs/super.c | 264 1 file changed, 264 deletions(-) diff --git a/fs/f2fs/super.c

[f2fs-dev] [PATCH 8/9] f2fs: switch to the new mount api

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
The new mount api will excute .parse_param, .init_fs_context, .get_tree and will call .remount if remount happened. So we add the necessary functions for the fs_context_operations. If .init_fs_context is added, the old .mount should remove. See Documentation/filesystems/mount_api.rst for more info

[f2fs-dev] [PATCH 7/9] f2fs: introduce fs_context_operation structure

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
The handle_mount_opt() helper is used to parse mount parameters, and so we can rename this function to f2fs_parse_param() and set it as .param_param in fs_context_operations. Signed-off-by: Hongbo Li --- fs/f2fs/super.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/

[f2fs-dev] [PATCH 4/9] f2fs: Allow sbi to be NULL in f2fs_printk

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of the new mount api, sbi will not be available. So here allows sbi to be NULL in f2fs log helpers and use that in handle_mount_opt(). Signed-off-by: Hongbo Li --- fs/f2fs/super.c | 106 ++-- 1 file changed, 57 insertions(+), 49 de

[f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-08-13 Thread Hongbo Li via 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. Her

[f2fs-dev] [PATCH 2/9] f2fs: move the option parser into handle_mount_opt

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
In handle_mount_opt, we use fs_parameter to pass each options. However we're still using the old API to get the options string. There are some change about parsering options: 1. For `active_logs`, `inline_xattr_size` and `fault_injection`, we use s32 type according the internal structure to re

[f2fs-dev] [PATCH 1/9] f2fs: Add fs parameter specifications for mount options

2024-08-13 Thread Hongbo Li via 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 --- fs/f2fs/super.c | 79 + 1 file changed, 79 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs

[f2fs-dev] [PATCH 5/9] f2fs: Add f2fs_fs_context to record the mount options

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of mouont in the new mount api, options value will be recorded with the context, and then it will be used in fill_super and other helpers. Notes that, this is a temporary status, we want remove the sb and sbi usages in handle_mount_opt. So here the f2fs_fs_context only records

[f2fs-dev] [PATCH 3/9] f2fs: move option validation into a separate helper

2024-08-13 Thread Hongbo Li via Linux-f2fs-devel
Just move option validation out of parse_options(), and the validation logic is enclosed within f2fs_validate_options. Signed-off-by: Hongbo Li --- fs/f2fs/super.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index

Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-08-27 Thread Hongbo Li via 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

Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-08-30 Thread Hongbo Li via 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 ro

Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-09-10 Thread Hongbo Li via 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

Re: [f2fs-dev] [PATCH 0/9] f2fs: new mount API conversion

2024-09-11 Thread Hongbo Li via 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

Re: [f2fs-dev] [PATCH V3 1/7] f2fs: Add fs parameter specifications for mount options

2025-05-07 Thread Hongbo Li via Linux-f2fs-devel
On 2025/4/24 1:08, Eric Sandeen wrote: From: Hongbo Li Use an array of `fs_parameter_spec` called f2fs_param_specs to hold the mount option specifications for the new mount api. Add constant_table structures for several options to facilitate parsing. Signed-off-by: Hongbo Li [sandeen: for

Re: [f2fs-dev] [PATCH V3 5/7] f2fs: separate the options parsing and options checking

2025-05-13 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/12 11:32, Chao Yu wrote: On 5/8/25 23:52, Eric Sandeen wrote: On 5/8/25 3:13 AM, Chao Yu wrote: On 4/24/25 01:08, Eric Sandeen wrote: From: Hongbo Li ... + if (ctx->qname_mask) { + for (i = 0; i < MAXQUOTAS; i++) { + if (!(ctx->qname_

Re: [f2fs-dev] [PATCH V3 5/7] f2fs: separate the options parsing and options checking

2025-05-13 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/8 23:52, Eric Sandeen wrote: On 5/8/25 3:13 AM, Chao Yu wrote: On 4/24/25 01:08, Eric Sandeen wrote: From: Hongbo Li ... + if (ctx->qname_mask) { + for (i = 0; i < MAXQUOTAS; i++) { + if (!(ctx->qname_mask & (1 << i))) +

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-13 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/13 16:59, Chao Yu wrote: On 4/24/25 01:08, Eric Sandeen wrote: From: Hongbo Li The new mount api will execute .parse_param, .init_fs_context, .get_tree and will call .remount if remount happened. So we add the necessary functions for the fs_context_operations. If .init_fs_context

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-14 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/14 23:30, Jaegeuk Kim wrote: Hi, Hongbo, It seems we're getting more issues in the patch set. May I ask for some help sending the new patch series having all the fixes that I made as well as addressing the concerns? You can get the patches from [1]. Ok, thank you and Chao for revie

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-13 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/14 12:03, Chao Yu wrote: On 5/14/25 10:33, Hongbo Li wrote: On 2025/5/13 16:59, Chao Yu wrote: On 4/24/25 01:08, Eric Sandeen wrote: From: Hongbo Li The new mount api will execute .parse_param, .init_fs_context, .get_tree and will call .remount if remount happened. So we add th

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-18 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/17 1:35, Jaegeuk Kim wrote: On 05/16, Hongbo Li wrote: On 2025/5/14 23:30, Jaegeuk Kim wrote: Hi, Hongbo, It seems we're getting more issues in the patch set. May I ask for some help sending the new patch series having all the fixes that I made as well as addressing the concerns?

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-15 Thread Hongbo Li via Linux-f2fs-devel
On 2025/5/14 23:30, Jaegeuk Kim wrote: Hi, Hongbo, It seems we're getting more issues in the patch set. May I ask for some help sending the new patch series having all the fixes that I made as well as addressing the concerns? You can get the patches from [1]. [1] https://git.kernel.org/pub/s

[f2fs-dev] [PATCH v4 2/7] f2fs: move the option parser into handle_mount_opt

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
In handle_mount_opt, we use fs_parameter to parse each option. However we're still using the old API to get the options string. Using fsparams parse_options allows us to remove many of the Opt_ enums, so remove them. The checkpoint disable cap (or percent) involves rather complex parsing; we retai

[f2fs-dev] [PATCH v4 3/7] f2fs: Allow sbi to be NULL in f2fs_printk

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of the new mount api, sbi will not be available. So here allows sbi to be NULL in f2fs log helpers and use that in handle_mount_opt(). Signed-off-by: Hongbo Li [sandeen: forward port] Signed-off-by: Eric Sandeen --- fs/f2fs/super.c | 90 +++--

[f2fs-dev] [PATCH v4 4/7] f2fs: Add f2fs_fs_context to record the mount options

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of mouont in the new mount api, options value will be recorded with the context, and then it will be used in fill_super and other helpers. Note that, this is a temporary status, we want remove the sb and sbi usages in handle_mount_opt. So here the f2fs_fs_context only records

[f2fs-dev] [PATCH v4 0/7] f2fs: new mount API conversion

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
In this version, we have finished the issues pointed in v3. First, I'd like to express my sincere thanks to Jaegeuk and Chao for reviewing this patch series and providing corrections. I also appreciate Eric for rebasing the patches onto the latest branch to ensure forward compatibility. The latest

[f2fs-dev] [PATCH v4 1/7] f2fs: Add fs parameter specifications for mount options

2025-06-02 Thread Hongbo Li via 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. Add constant_table structures for several options to facilitate parsing. Signed-off-by: Hongbo Li [sandeen: forward port, minor fixes and updates, more fsparam_enum] Signed-

Re: [f2fs-dev] [PATCH v4 0/7] f2fs: new mount API conversion

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
On 2025/6/3 0:05, Jaegeuk Kim wrote: Thanks you, Hongbo. I just applied this series to the dev-test branch as below, and will keep testing with incoming patches together. Let's see. :) https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev-test Ok, I will keep followin

[f2fs-dev] [PATCH v4 5/7] f2fs: separate the options parsing and options checking

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
The new mount api separates option parsing and super block setup into two distinct steps and so we need to separate the options parsing out of the parse_options(). In order to achieve this, here we handle the mount options with three steps: - Firstly, we move sb/sbi out of handle_mount_opt.

[f2fs-dev] [PATCH v4 6/7] f2fs: introduce fs_context_operation structure

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
The handle_mount_opt() helper is used to parse mount parameters, and so we can rename this function to f2fs_parse_param() and set it as .param_param in fs_context_operations. Signed-off-by: Hongbo Li [sandeen: forward port] Signed-off-by: Eric Sandeen --- fs/f2fs/super.c | 8 ++-- 1 file ch

[f2fs-dev] [PATCH v4 7/7] f2fs: switch to the new mount api

2025-06-02 Thread Hongbo Li via Linux-f2fs-devel
The new mount api will execute .parse_param, .init_fs_context, .get_tree and will call .remount if remount happened. So we add the necessary functions for the fs_context_operations. If .init_fs_context is added, the old .mount should remove. See Documentation/filesystems/mount_api.rst for more inf

Re: [f2fs-dev] [PATCH v4 5/7] f2fs: separate the options parsing and options checking

2025-07-07 Thread Hongbo Li via Linux-f2fs-devel
On 2025/7/7 20:17, Chao Yu wrote: On 6/2/25 17:02, Hongbo Li wrote:G The new mount api separates option parsing and super block setup into two distinct steps and so we need to separate the options parsing out of the parse_options(). In order to achieve this, here we handle the mount options

Re: [f2fs-dev] [PATCH v4 2/7] f2fs: move the option parser into handle_mount_opt

2025-07-07 Thread Hongbo Li via Linux-f2fs-devel
On 2025/7/4 11:27, Chao Yu wrote: On 6/2/25 17:02, Hongbo Li wrote: In handle_mount_opt, we use fs_parameter to parse each option. However we're still using the old API to get the options string. Using fsparams parse_options allows us to remove many of the Opt_ enums, so remove them. The che

[f2fs-dev] [PATCH v5 0/7] f2fs: new mount API conversion

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
In this version, we have finished the issues pointed in v4. First, I'd like to express my sincere thanks to Jaegeuk and Chao for reviewing this patch series and providing corrections. I also appreciate Eric for rebasing the patches onto the latest branch to ensure forward compatibility. The latest

[f2fs-dev] [PATCH v5 6/7] f2fs: introduce fs_context_operation structure

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
The handle_mount_opt() helper is used to parse mount parameters, and so we can rename this function to f2fs_parse_param() and set it as .param_param in fs_context_operations. Signed-off-by: Hongbo Li [sandeen: forward port] Signed-off-by: Eric Sandeen --- fs/f2fs/super.c | 8 ++-- 1 file ch

[f2fs-dev] [PATCH v5 5/7] f2fs: separate the options parsing and options checking

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
The new mount api separates option parsing and super block setup into two distinct steps and so we need to separate the options parsing out of the parse_options(). In order to achieve this, here we handle the mount options with three steps: - Firstly, we move sb/sbi out of handle_mount_opt.

[f2fs-dev] [PATCH v5 1/7] f2fs: Add fs parameter specifications for mount options

2025-07-10 Thread Hongbo Li via 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. Add constant_table structures for several options to facilitate parsing. Signed-off-by: Hongbo Li [sandeen: forward port, minor fixes and updates, more fsparam_enum] Signed-

[f2fs-dev] [PATCH v5 4/7] f2fs: Add f2fs_fs_context to record the mount options

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of mouont in the new mount api, options value will be recorded with the context, and then it will be used in fill_super and other helpers. Note that, this is a temporary status, we want remove the sb and sbi usages in handle_mount_opt. So here the f2fs_fs_context only records

[f2fs-dev] [PATCH v5 3/7] f2fs: Allow sbi to be NULL in f2fs_printk

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
At the parsing phase of the new mount api, sbi will not be available. So here allows sbi to be NULL in f2fs log helpers and use that in handle_mount_opt(). Signed-off-by: Hongbo Li [sandeen: forward port] Signed-off-by: Eric Sandeen --- fs/f2fs/super.c | 90 +++--

[f2fs-dev] [PATCH v5 7/7] f2fs: switch to the new mount api

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
The new mount api will execute .parse_param, .init_fs_context, .get_tree and will call .remount if remount happened. So we add the necessary functions for the fs_context_operations. If .init_fs_context is added, the old .mount should remove. See Documentation/filesystems/mount_api.rst for more inf

[f2fs-dev] [PATCH v5 2/7] f2fs: move the option parser into handle_mount_opt

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
In handle_mount_opt, we use fs_parameter to parse each option. However we're still using the old API to get the options string. Using fsparams parse_options allows us to remove many of the Opt_ enums, so remove them. The checkpoint disable cap (or percent) involves rather complex parsing; we retai

Re: [f2fs-dev] [PATCH v5 0/7] f2fs: new mount API conversion

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
On 2025/7/10 20:14, Hongbo Li wrote: In this version, we have finished the issues pointed in v4. First, I'd like to express my sincere thanks to Jaegeuk and Chao for reviewing this patch series and providing corrections. I also appreciate Eric for rebasing the patches onto the latest branch to

Re: [f2fs-dev] [PATCH v4 2/7] f2fs: move the option parser into handle_mount_opt

2025-07-10 Thread Hongbo Li via Linux-f2fs-devel
On 2025/7/10 1:48, Jaegeuk Kim wrote: Hongbo, Could you please post v5? Ok, so I summary the new comments: 1. The missing in f2fs_check_opt_consistency for bggc_mode(off) with blkzoned. 2. The 0day-ci robot reports in [1] [1] https://lore.kernel.org/oe-kbuild-all/20250704.t8n0otve-