Re: [f2fs-dev] [PATCH 0/9] f2fs: first steps towards mount API conversion

2025-04-05 Thread Eric Sandeen via Linux-f2fs-devel
I was working on next steps for this, and I have a followup question. Today, several mount options are simply ignored if the on-disk format does not support them. For example: case Opt_compress_mode: if (!f2fs_sb_has_compression(sbi)) {

Re: [f2fs-dev] [PATCH 0/9] f2fs: first steps towards mount API conversion

2025-04-01 Thread Eric Sandeen via Linux-f2fs-devel
On 3/31/25 3:31 AM, Chao Yu wrote: > On 3/29/25 12:18, Eric Sandeen wrote: >> I was working on next steps for this, and I have a followup question. >> >> Today, several mount options are simply ignored if the on-disk format >> does not support them. For example: >> >> case Opt_compr

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
On 4/20/25 10:24 AM, Eric Sandeen wrote: > This is a forward-port of Hongbo's original f2fs mount API conversion, > posted last August at > https://lore.kernel.org/linux-f2fs-devel/20240814023912.3959299-1-lihongb...@huawei.com/ I'll rebase this onto jaegeuk's dev tree and send a V3. -Eric __

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 +

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 V3 0/7] f2fs: new mount API conversion

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
V3: - Rebase onto git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev branch - Fix up some 0day robot warnings This is a forward-port of Hongbo's original f2fs mount API conversion, posted last August at https://lore.kernel.org/linux-f2fs-devel/20240814023912.3959299-1-lihongb...

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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_con

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 hand

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
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 is added, the old .mount should remove. See Documentation/filesystems/mount_ap

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
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: forward port, minor fixes and updates, more fsp

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

2025-04-24 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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

Re: [f2fs-dev] [PATCH 0/9] f2fs: first steps towards mount API conversion

2025-04-12 Thread Eric Sandeen via Linux-f2fs-devel
On 4/1/25 3:33 PM, Eric Sandeen wrote: > On 3/31/25 3:31 AM, Chao Yu wrote: >> On 3/29/25 12:18, Eric Sandeen wrote: >>> I was working on next steps for this, and I have a followup question. >>> >>> Today, several mount options are simply ignored if the on-disk format >>> does not support them. For

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

2025-05-05 Thread Eric Sandeen via Linux-f2fs-devel
Hi all - it would be nice to get some review or feedback on this; seems that these patches tend to go stale fairly quickly as f2fs evolves. :) Thanks, -Eric On 4/23/25 12:08 PM, Eric Sandeen wrote: > V3: > - Rebase onto git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git > dev branch

Re: [f2fs-dev] [PATCH AUTOSEL 6.14 156/642] f2fs: defer readonly check vs norecovery

2025-05-05 Thread Eric Sandeen via Linux-f2fs-devel
This commit is in no way a bugfix and I don't see any reason to backport it to stable kernels. Thanks, -Eric On 5/5/25 5:06 PM, Sasha Levin wrote: > From: Eric Sandeen > > [ Upstream commit 9cca49875997a1a7e92800a828a62bacb0f577b9 ] > > Defer the readonly-vs-norecovery check until after option

Re: [f2fs-dev] [PATCH 0/9] f2fs: first steps towards mount API conversion

2025-04-14 Thread Eric Sandeen via Linux-f2fs-devel
On 4/12/25 12:17 PM, Eric Sandeen wrote: ... > FYI - I don't think I will be able to complete this conversion task myself - > f2fs is > by far the most difficult conversion I've encountered, and my time for these > sorts of > projects is sadly limited. I do have one more patch series that moves

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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_con

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 hand

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 +

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
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 is added, the old .mount should remove. See Documentation/filesystems/mount_ap

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
This is a forward-port of Hongbo's original f2fs mount API conversion, posted last August at https://lore.kernel.org/linux-f2fs-devel/20240814023912.3959299-1-lihongb...@huawei.com/ I had been trying to approach this with a little less complexity, but in the end I realized that Hongbo's approach

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

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
From: Hongbo Li 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 1/7] f2fs: Add fs parameter specifications for mount options

2025-04-21 Thread Eric Sandeen via Linux-f2fs-devel
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: forward port, minor fixes and updates, more fsp

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

2025-05-07 Thread Eric Sandeen via Linux-f2fs-devel
On 5/7/25 6:26 AM, Chao Yu wrote: > On 4/20/25 23:25, Eric Sandeen wrote: >> From: Hongbo Li >> >> 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_

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

2025-05-07 Thread Eric Sandeen via Linux-f2fs-devel
On 5/7/25 9:46 AM, Jaegeuk Kim wrote: > I meant: > > # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb > # mount /dev/vdb mnt > > It's supposed to be successful, since extent_cache is enabled by default. I'm sorry, clearly I was too sleepy last night. This fixes it for me. We have to test the ma

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

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
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))) >> +continue; >> + >> +

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

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
On 5/8/25 4:19 AM, Chao Yu wrote: >> @@ -2645,21 +2603,11 @@ static int f2fs_remount(struct super_block *sb, int >> *flags, char *data) >> >> default_options(sbi, true); >> >> -memset(&fc, 0, sizeof(fc)); >> -memset(&ctx, 0, sizeof(ctx)); >> -fc.fs_private = &ctx; >> -fc.p

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

2025-05-07 Thread Eric Sandeen via Linux-f2fs-devel
On 5/7/25 2:48 PM, Jaegeuk Kim wrote: > On 05/07, Eric Sandeen wrote: >> On 5/7/25 9:46 AM, Jaegeuk Kim wrote: >> >>> I meant: >>> >>> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb >>> # mount /dev/vdb mnt >>> >>> It's supposed to be successful, since extent_cache is enabled by default. >> >> I'm

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

2025-05-07 Thread Eric Sandeen via Linux-f2fs-devel
On 5/7/25 3:28 PM, Jaegeuk Kim wrote: >> But as far as I can tell, at least for the extent cache, remount is handled >> properly already (with the hunk above): >> >> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb >> # mount /dev/vdb mnt >> # mount -o remount,noextent_cache mnt >> mount: /root/mnt:

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

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
On 5/8/25 10:52 AM, Eric Sandeen wrote: >>> + >>> + if (f2fs_test_compress_extension(F2FS_CTX_INFO(ctx).noextensions, >>> + F2FS_CTX_INFO(ctx).nocompress_ext_cnt, >>> + F2FS_CTX_INFO(ctx).extensions, >>> + F2FS_CTX_INFO

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

2025-05-06 Thread Eric Sandeen via Linux-f2fs-devel
On 5/6/25 5:01 PM, Jaegeuk Kim wrote: >> +static int f2fs_check_opt_consistency(struct fs_context *fc, >> + struct super_block *sb) >> +{ >> +struct f2fs_fs_context *ctx = fc->fs_private; >> +struct f2fs_sb_info *sbi = F2FS_SB(sb); >> +int err; >> + >

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

2025-05-06 Thread Eric Sandeen via Linux-f2fs-devel
On 5/6/25 11:02 AM, Jaegeuk Kim wrote: > On 05/05, Eric Sandeen wrote: >> Hi all - it would be nice to get some review or feedback on this; >> seems that these patches tend to go stale fairly quickly as f2fs >> evolves. :) > > Thank you so much for the work! Let me queue this series into dev-test

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

2025-05-06 Thread Eric Sandeen via Linux-f2fs-devel
On 5/6/25 9:56 PM, Eric Sandeen wrote: > On 5/6/25 8:23 PM, Jaegeuk Kim wrote: ... >> What about: >> # mount -o loop,noextent_cache f2fsfile.img mnt >> >> In this case, 1) ctx_clear_opt(), 2) set_opt() in default_options, >> 3) clear_opt since mask is set? > > Not sure what I'm missing, it seems

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

2025-05-06 Thread Eric Sandeen via Linux-f2fs-devel
On 5/6/25 7:35 PM, Jaegeuk Kim wrote: > Hmm, I had to drop the series at the moment, since it seems needing more > work to deal with default_options(), which breaks my device setup. > For example, set_opt(sbi, READ_EXTENT_CACHE) in default_options is not > propagating > to the below logics. In thi

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

2025-05-06 Thread Eric Sandeen via Linux-f2fs-devel
On 5/6/25 8:23 PM, Jaegeuk Kim wrote: > On 05/06, Eric Sandeen wrote: >> On 5/6/25 7:35 PM, Jaegeuk Kim wrote: >>> Hmm, I had to drop the series at the moment, since it seems needing more >>> work to deal with default_options(), which breaks my device setup. >>> For example, set_opt(sbi, READ_EXTEN

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

2025-05-12 Thread Eric Sandeen via Linux-f2fs-devel
On 5/11/25 10:43 PM, Chao Yu wrote: > On 5/8/25 23:59, Eric Sandeen wrote: >> On 5/8/25 4:19 AM, Chao Yu wrote: @@ -2645,21 +2603,11 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) default_options(sbi, true); - memset(&fc, 0, sizeof(fc));

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

2025-05-14 Thread Eric Sandeen via Linux-f2fs-devel
On 5/14/25 10:30 AM, 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.ker