Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Kent Overstreet
On Thu, Jul 10, 2025 at 03:10:04PM +0200, Jan Kara wrote: > On Wed 09-07-25 13:49:12, Kent Overstreet wrote: > > On Wed, Jul 09, 2025 at 07:23:07PM +0200, Jan Kara wrote: > > > > It also avoids the problem of ->mark_dead events being generated > > > > from a context that holds filesystem/vfs locks

Re: [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers

2025-07-10 Thread Jaegeuk Kim via Linux-f2fs-devel
On 07/10, Matthew Wilcox wrote: > On Thu, Jul 10, 2025 at 02:26:38PM +, Jaegeuk Kim wrote: > > On 07/10, Matthew Wilcox wrote: > > > On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote: > > > > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to > > > > >> parameter

Re: [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers

2025-07-10 Thread Matthew Wilcox
On Thu, Jul 10, 2025 at 02:26:38PM +, Jaegeuk Kim wrote: > On 07/10, Matthew Wilcox wrote: > > On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote: > > > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to > > > >> parameter of type 'struct folio *' discards qualifi

Re: [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers

2025-07-10 Thread Jaegeuk Kim via Linux-f2fs-devel
On 07/10, Matthew Wilcox wrote: > On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote: > > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter > > >> of type 'struct folio *' discards qualifiers > > >> [-Werror,-Wincompatible-pointer-types-discards-qualifiers

Re: [f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers

2025-07-10 Thread Matthew Wilcox
On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote: > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter > >> of type 'struct folio *' discards qualifiers > >> [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > 58 | return >

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Jan Kara
On Wed 09-07-25 13:49:12, Kent Overstreet wrote: > On Wed, Jul 09, 2025 at 07:23:07PM +0200, Jan Kara wrote: > > > It also avoids the problem of ->mark_dead events being generated > > > from a context that holds filesystem/vfs locks and then deadlocking > > > waiting for those locks to be released.

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

[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

[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 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 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 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 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 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 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

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christoph Hellwig
On Mon, Jul 07, 2025 at 05:45:32PM -0700, Darrick J. Wong wrote: > On second thought -- it's weird that you'd flush the filesystem and > shrink the inode/dentry caches in a "your device went away" handler. > Fancy filesystems like bcachefs and btrfs would likely just shift IO to > a different bdev,

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christoph Hellwig
On Tue, Jul 08, 2025 at 09:55:14AM +0200, Christian Brauner wrote: > I think letting filesystems implement their own holder ops should be > avoided if we can. Christoph may chime in here. Ccing helps for that.. > > I have no appettite for > exporting stuff like get_bdev_super() unless absolutely

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Qu Wenruo via Linux-f2fs-devel
在 2025/7/10 18:10, Christian Brauner 写道: On Tue, Jul 08, 2025 at 01:20:50PM -0700, Darrick J. Wong wrote: On Tue, Jul 08, 2025 at 12:20:00PM +0200, Jan Kara wrote: On Mon 07-07-25 17:45:32, Darrick J. Wong wrote: On Tue, Jul 08, 2025 at 08:52:47AM +0930, Qu Wenruo wrote: 在 2025/7/8 08:32, D

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-

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christian Brauner via Linux-f2fs-devel
On Tue, Jul 08, 2025 at 01:20:50PM -0700, Darrick J. Wong wrote: > On Tue, Jul 08, 2025 at 12:20:00PM +0200, Jan Kara wrote: > > On Mon 07-07-25 17:45:32, Darrick J. Wong wrote: > > > On Tue, Jul 08, 2025 at 08:52:47AM +0930, Qu Wenruo wrote: > > > > 在 2025/7/8 08:32, Dave Chinner 写道: > > > > > On

Re: [f2fs-dev] [PATCH v4 1/6] fs: enhance and rename shutdown() callback to remove_bdev()

2025-07-10 Thread Christian Brauner via Linux-f2fs-devel
On Wed, Jul 09, 2025 at 08:59:42AM +1000, Dave Chinner wrote: > On Tue, Jul 08, 2025 at 09:55:14AM +0200, Christian Brauner wrote: > > On Mon, Jul 07, 2025 at 05:45:32PM -0700, Darrick J. Wong wrote: > > > On Tue, Jul 08, 2025 at 08:52:47AM +0930, Qu Wenruo wrote: > > > > > > > > > > > > 在 2025/7

[f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers

2025-07-10 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test head: bc8610a18daa4a611d189374031fe1fa3c603423 commit: 9f506c758707749076b4ec2402007670c6f35558 [65/93] f2fs: Use a folio in f2fs_is_cp_guaranteed() config: s390-randconfig-002-20250710 (https://download.01.org

[f2fs-dev] [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:70: warning: passing argument 1 of 'fscrypt_pagecache_folio' discards 'const' qualifier from pointer target type

2025-07-10 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test head: bc8610a18daa4a611d189374031fe1fa3c603423 commit: 9f506c758707749076b4ec2402007670c6f35558 [65/93] f2fs: Use a folio in f2fs_is_cp_guaranteed() config: i386-buildonly-randconfig-001-20250710 (https