Re: [f2fs-dev] [PATCH] f2fs: improve the performance of f2fs_lookup

2025-07-08 Thread kernel test robot
Hi Yuwen, kernel test robot noticed the following build warnings: [auto build test WARNING on jaegeuk-f2fs/dev-test] [also build test WARNING on jaegeuk-f2fs/dev brauner-vfs/vfs.all linus/master v6.16-rc5 next-20250708] [cannot apply to tytso-ext4/dev] [If your patch is applied to the wrong git

[f2fs-dev] [PATCH 47/60] f2fs: Pass a folio to f2fs_end_read_compressed_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
Both callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 7 +++ fs/f2fs/data.c | 4 ++-- fs/f2fs/f2fs.h | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 10b423060

[f2fs-dev] [PATCH 51/60] f2fs: Pass the nat_blk to __update_nat_bits()

2025-07-08 Thread Matthew Wilcox (Oracle)
The page argument is only used to look up the address of the nat_blk. Since the caller already has it, pass it in instead. Also mark it const as the nat_blk isn't modified by this function. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 5 ++--- 1 file changed, 2 insertions(+), 3 d

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

2025-07-08 Thread Darrick J. Wong via Linux-f2fs-devel
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 Fri, Jul 04, 2025 at 10:12:29AM +0930, Qu Wenruo wrote: > > > > > Currently

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

2025-07-08 Thread Qu Wenruo via Linux-f2fs-devel
在 2025/7/9 08:29, Dave Chinner 写道: 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/8 08:32, Dave Chinner 写道: On Fri, Jul 04, 2025 at 10:1

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

2025-07-08 Thread Dave Chinner via Linux-f2fs-devel
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/8 08:32, Dave Chinner 写道: > > > > On Fri, Jul 04, 2025 at 10:12:29AM +093

Re: [f2fs-dev] [PATCH v2] f2fs/015: test mount options

2025-07-08 Thread Chao Yu via Linux-f2fs-devel
On 7/8/25 22:29, Zorro Lang wrote: > On Mon, Jul 07, 2025 at 05:05:31PM +0800, Chao Yu wrote: >> On 7/5/25 02:14, Zorro Lang wrote: >>> On Fri, Jul 04, 2025 at 07:48:18PM +0800, Chao Yu wrote: As f2fs changes to use new mount APIs, let's add a new testcase to check mount result for all f2

Re: [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match

2025-07-08 Thread ywen.chen
> But I wonder why generic_ci_match is even called that often. Both ext4 > and f2fs support hashed lookups, so you should usually only see it called > for the main match, plus the occasional hash false positive, which should > be rate if the hash works. At present, in the latest version of Linux

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

2025-07-08 Thread Christian Brauner via Linux-f2fs-devel
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/8 08:32, Dave Chinner 写道: > > > On Fri, Jul 04, 2025 at 10:12:29AM +0930, Qu Wenruo wrote: > > > > Currently all the filesystems implementing the > >

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

2025-07-08 Thread Jan Kara
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 Fri, Jul 04, 2025 at 10:12:29AM +0930, Qu Wenruo wrote: > > > > Currently all the filesystems implementing the > > > > super_opearations::shu

Re: [f2fs-dev] 回复: [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match

2025-07-08 Thread Christoph Hellwig
On Tue, Jul 08, 2025 at 10:36:07AM +0800, ywen.chen wrote: > 1. Use the latest version of the fsck.f2fs tool to correct > the file system. > 2. Use a relatively new version of the kernel. (For example, > linear search cannot be turned off in v6.6) > > > The performance gain of this commit is very

[f2fs-dev] [PATCH v2] f2fs: fix to avoid UAF in f2fs_sync_inode_meta()

2025-07-08 Thread Chao Yu via Linux-f2fs-devel
syzbot reported an UAF issue as below: [1] [2] [1] https://syzkaller.appspot.com/text?tag=CrashReport&x=16594c6058 == BUG: KASAN: use-after-free in __list_del_entry_valid+0xa6/0x130 lib/list_debug.c:62 Read of size 8 at addr fff

[f2fs-dev] [PATCH v2] f2fs: fix to avoid panic in f2fs_evict_inode

2025-07-08 Thread Chao Yu via Linux-f2fs-devel
As syzbot [1] reported as below: R10: 0100 R11: 0206 R12: 7ffe17473450 R13: 7f28b1c10854 R14: dae5 R15: 7ffe17474520 ---[ end trace ]--- == BUG: KASAN: use-after-free

Re: [f2fs-dev] [PATCH v3 1/2] libfs: reduce the number of memory allocations in generic_ci_match

2025-07-08 Thread Yuwen Chen
On Sun, 6 Jul 2025 22:27:17 -0700 Christoph Hellwig wrote: > But I wonder why generic_ci_match is even called that often. Both ext4 > and f2fs support hashed lookups, so you should usually only see it called > for the main match, plus the occasional hash false positive, which should > be rate if t

[f2fs-dev] [PATCH 60/60] f2fs: Remove F2FS_P_SB()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have been converted to F2FS_F_SB() so delete this wrapper. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 3ae1f15205c5..251fe1f7f57d 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs

[f2fs-dev] [PATCH 27/60] f2fs: Pass a folio to is_fsync_dnode()

2025-07-08 Thread Matthew Wilcox (Oracle)
Both callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 2 +- fs/f2fs/node.h | 2 +- fs/f2fs/recovery.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f8620b262b72..7ea5a98399a7 100

[f2fs-dev] [PATCH 22/60] f2fs: Pass a folio to set_cold_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also mark it as const to help the compiler. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 2 +- fs/f2fs/node.c | 4 ++-- fs/f2fs/node.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/ino

[f2fs-dev] [PATCH 38/60] f2fs: Add folio counterparts to page_private_flags functions

2025-07-08 Thread Matthew Wilcox (Oracle)
Name these new functions folio_test_f2fs_*(), folio_set_f2fs_*() and folio_clear_f2fs_*(). Convert all callers which currently have a folio and cast back to a page. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 4 ++-- fs/f2fs/data.c | 12 ++-- fs/f2fs/f2fs.h

[f2fs-dev] [PATCH 16/60] f2fs: Pass a folio to f2fs_allocate_data_block()

2025-07-08 Thread Matthew Wilcox (Oracle)
Most callers pass NULL, and the one which passes a page already has a folio, so we can pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h| 2 +- fs/f2fs/segment.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs

[f2fs-dev] [PATCH 00/60] f2fs folio conversions for 6.17

2025-07-08 Thread Matthew Wilcox (Oracle)
Some more folio conversions for f2fs. Again, I have checked these patches build, but otherwise they are untested. There are three inline functions in fscrypt that I change to take a const struct folio pointer instead of a mutable pointer that I don't think should cause any conflicts. Matthew Wil

[f2fs-dev] [PATCH 02/60] f2fs: Pass a folio to recover_inode()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/recovery.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index f84a96deaa07..dacfe7c1cbe5 100644 --- a/fs/f2fs/recovery.c +++

[f2fs-dev] [PATCH 18/60] f2fs: Pass a folio to f2fs_enable_inode_chksum()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 0a071ce586fa..bee6b0970e7b 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode

[f2fs-dev] [PATCH 19/60] f2fs: Pass a folio to f2fs_inode_chksum()

2025-07-08 Thread Matthew Wilcox (Oracle)
Both callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index bee6b0970e7b..61fd96f0a1ff 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@

[f2fs-dev] [PATCH 05/60] f2fs: Pass a folio to sanity_check_extent_cache()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/extent_cache.c | 4 ++-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inode.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c ind

[f2fs-dev] [PATCH 12/60] f2fs: Pass a folio to is_recoverable_dnode()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also make the argument const as the function does not modify it. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.h | 10 +- fs/f2fs/recovery.c | 6 +++--- 3 files changed

[f2fs-dev] [PATCH 55/60] f2fs: Use F2FS_F_SB() in f2fs_read_end_io()

2025-07-08 Thread Matthew Wilcox (Oracle)
Get the folio from the bio instead of the page. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 116482adf591..942aaf10b78b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -278,

[f2fs-dev] [PATCH 56/60] f2fs: Remove clear_page_private_all()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers can simply call folio_detach_private(). This was the only way that clear_page_private_data() could be called, so remove that too. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 4 ++-- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 18 -- 3 files changed, 3 i

[f2fs-dev] [PATCH 20/60] f2fs: Pass a folio to fill_node_footer_blkaddr()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.h| 6 +++--- fs/f2fs/segment.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 914399113f21..5cbe038bfaab 100644 --- a/fs/f2fs/node.

[f2fs-dev] [PATCH 17/60] f2fs: Pass a folio to f2fs_inode_chksum_set()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h| 2 +- fs/f2fs/inode.c | 10 +- fs/f2fs/node.c| 2 +- fs/f2fs/node.h| 2 +- fs/f2fs/segment.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/f2fs

[f2fs-dev] [PATCH 58/60] f2fs: Pass a folio to f2fs_submit_merged_write_cond()

2025-07-08 Thread Matthew Wilcox (Oracle)
Most callers pass NULL, and the one that passes a page already has a folio. Also convert __submit_merged_write_cond() to take a folio. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c| 8 fs/f2fs/f2fs.h| 2 +- fs/f2fs/segment.c | 2 +- 3 files changed, 6 insertions(+),

[f2fs-dev] [PATCH 13/60] f2fs: Pass a folio to set_dentry_mark()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 6 +++--- fs/f2fs/node.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 26d3bc7597d9..f964b526b73c 100644 --- a/fs/f2fs/node.c +++ b/f

[f2fs-dev] [PATCH 52/60] f2fs: Pass a folio to F2FS_NODE()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 10 +- fs/f2fs/inode.c | 8 fs/f2fs/node.c | 6 +++--- fs/f2fs/node.h | 30 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a

[f2fs-dev] [PATCH 25/60] f2fs: Pass a folio to cpver_of_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 2 +- fs/f2fs/node.h | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 9c47f1e73421..89a27bbc0226 100644 --- a/fs/f2fs/node.c +++ b

[f2fs-dev] [PATCH 50/60] f2fs: Convert get_next_nat_page() to get_next_nat_folio()

2025-07-08 Thread Matthew Wilcox (Oracle)
Return a folio from this function and convert its one caller. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ab534557a80e

[f2fs-dev] [PATCH 28/60] f2fs: Pass a folio to is_dent_dnode()

2025-07-08 Thread Matthew Wilcox (Oracle)
Both callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.h | 2 +- fs/f2fs/recovery.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 17afa6d51053..aea801c58097 100644 --- a/fs/f2fs/node.h

[f2fs-dev] [PATCH 04/60] f2fs: Pass a folio to f2fs_recover_inode_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 6 +++--- fs/f2fs/recovery.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index aa535dcf2297..1243264f4

[f2fs-dev] [PATCH 49/60] f2fs: Pass a folio to f2fs_is_compressed_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Also remove the test for the private flag; it is redundant with checking folio->private for being NULL. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 14 ++ fs/f2fs/data.c | 10 +- fs/f2fs/f2fs.h | 4 ++--

[f2fs-dev] [PATCH 03/60] f2fs: Pass a folio to recover_quota_data()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/recovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index dacfe7c1cbe5..10212130097c 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2

[f2fs-dev] [PATCH 32/60] f2fs: Pass a folio to is_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All three callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index a03e30a1b8c2..657f9a2d4b05 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/no

[f2fs-dev] [PATCH 39/60] f2fs: Use a folio in f2fs_is_cp_guaranteed()

2025-07-08 Thread Matthew Wilcox (Oracle)
Convert the passed page to a folio and use it throughout. Removes a use of fscrypt_is_bounce_page(), which we're trying to remove. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 11 ++- fs/f2fs/f2fs.h | 2 +- include/linux/fscrypt.h | 7 --- 3 files

[f2fs-dev] [PATCH 54/60] f2fs: Use a folio in f2fs_encrypted_get_link()

2025-07-08 Thread Matthew Wilcox (Oracle)
Use a folio instead of a page when dealing with the page cache. Removes a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/namei.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 07e333ee2

[f2fs-dev] [PATCH 35/60] f2fs: Pass a folio to get_dnode_base()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller already has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index f98d83ccd1e2..3463fa414b55 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs

[f2fs-dev] [PATCH 24/60] f2fs: Pass a folio to fill_node_footer()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also mark it as const to help the compiler. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 4 ++-- fs/f2fs/node.h | 4 ++-- fs/f2fs/recovery.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.c b/fs/

[f2fs-dev] [PATCH 14/60] f2fs: Pass a folio to set_fsync_mark()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 6 +++--- fs/f2fs/node.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f964b526b73c..db41d41f03db 100644 --- a/fs/f2fs/node.c +++ b/f

[f2fs-dev] [PATCH 21/60] f2fs: Pass a folio to get_nid()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also mark it as const to help the compiler. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 18 +- fs/f2fs/node.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index

[f2fs-dev] [PATCH 15/60] f2fs: Pass a folio to set_mark()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 7e7578a547ad..8d7d7405de9b 100644 --- a/fs/f2

[f2fs-dev] [PATCH 34/60] f2fs: Pass a folio to ofs_of_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/extent_cache.c | 2 +- fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 2 +- fs/f2fs/node.c | 4 ++-- fs/f2fs/node.h | 6 +++--- fs/f2fs/recovery.c | 14 +++---

[f2fs-dev] [PATCH 06/60] f2fs: Pass a folio to sanity_check_inode()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 6ce6279e4eb5..6b91531f79a4 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2f

[f2fs-dev] [PATCH 08/60] f2fs: Pass a folio to inode_has_blocks()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 0d021c638922..fa072e4a5616 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inlin

[f2fs-dev] [PATCH 42/60] f2fs: Pass a folio to f2fs_compress_write_end_io()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 6 +++--- fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 4e432df2431f..c1

[f2fs-dev] [PATCH 33/60] f2fs: Pass a folio to IS_DNODE()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c| 15 +++ fs/f2fs/node.h| 4 ++-- fs/f2fs/segment.c | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index d4063427

[f2fs-dev] [PATCH 59/60] f2fs: Pass a folio to __has_merged_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
All three callers have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b82d8784248e..56ea8dfc43a7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data

[f2fs-dev] [PATCH 10/60] f2fs: Pass a folio to ino_of_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also make the argument const as the function does not modify it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 2 +- fs/f2fs/inode.c| 8 fs/f2fs/node.c | 24 fs/f2fs/node.h | 4 ++-- fs/f2

[f2fs-dev] [PATCH 01/60] f2fs: Pass a folio to recover_dentry()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/recovery.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 51ebed4e1521..f84a96deaa07 100644 --- a/fs/f2fs/recovery.c +++ b/fs/

[f2fs-dev] [PATCH 29/60] f2fs: Add fio->folio

2025-07-08 Thread Matthew Wilcox (Oracle)
Put fio->page insto a union with fio->folio. This lets us remove a lot of folio->page and page->folio conversions. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 4 ++-- fs/f2fs/data.c | 17 - fs/f2fs/f2fs.h | 7 +-- fs/f2fs/gc.c | 6

[f2fs-dev] [PATCH 41/60] f2fs: Convert get_page_private_data() to folio_get_f2fs_data()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller already has a folio so convert this function to be folio based. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 2 +- fs/f2fs/f2fs.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index d7346c1f

[f2fs-dev] [PATCH 07/60] f2fs: Pass a folio to f2fs_sanity_check_inline_data()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 4 ++-- fs/f2fs/inode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index d278b5117629..0e33c971aff7 1006

[f2fs-dev] [PATCH 11/60] f2fs: Pass a folio to nid_of_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers have a folio so pass it in. Also make the argument const as the function does not modify it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 2 +- fs/f2fs/inode.c | 4 ++-- fs/f2fs/node.c | 6 +++--- fs/f2fs/node.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletio

[f2fs-dev] [PATCH 45/60] f2fs: Pass a folio to WB_DATA_TYPE() and f2fs_is_cp_guaranteed()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Removes a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 11 +-- fs/f2fs/f2fs.h | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/comp

[f2fs-dev] [PATCH 09/60] f2fs: Pass a folio to F2FS_INODE()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio, so pass it in. Also make it const as F2FS_INODE() does not modify the struct folio passed in (the data it describes is mutable, but it does not change the contents of the struct). This may improve code generation. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/

[f2fs-dev] [PATCH 37/60] f2fs: Pass a folio to IS_INODE()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Also make it const to help the compiler. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/file.c | 2 +- fs/f2fs/gc.c| 2 +- fs/f2fs/inline.c| 2 +- fs/f2fs/inode.c | 2 +-

[f2fs-dev] [PATCH 57/60] f2fs: Remove use of page from f2fs_write_single_data_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
Both remaining uses of page now have a folio equivalent. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 72565841a16c..18c5b619f48e 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/d

[f2fs-dev] [PATCH 31/60] f2fs: Pass a folio to is_cold_node()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 2 +- fs/f2fs/node.c| 12 ++-- fs/f2fs/node.h| 2 +- fs/f2fs/segment.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2f

[f2fs-dev] [PATCH 46/60] f2fs: Use a folio iterator in f2fs_handle_step_decompress()

2025-07-08 Thread Matthew Wilcox (Oracle)
Change from bio_for_each_segment_all() to bio_for_each_folio_all() to iterate over each folio instead of each page. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 0672

[f2fs-dev] [PATCH 30/60] f2fs: Use folio_unlock() in f2fs_write_compressed_pages()

2025-07-08 Thread Matthew Wilcox (Oracle)
Remove a call to compound_head() by replacing a call to unlock_page() with a call to folio_unlock(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 8cbb8038bc72..5be1a

[f2fs-dev] [PATCH 26/60] f2fs: Pass a folio to f2fs_recover_xattr_data()

2025-07-08 Thread Matthew Wilcox (Oracle)
One caller passes NULL and the other caller already has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 6 +++--- fs/f2fs/recovery.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f

[f2fs-dev] [PATCH 53/60] f2fs: Pass a folio to f2fs_cache_compressed_page()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller already has a folio so pass it in. f2fs_cache_compressed_page() is not used outside compress.c so make it static. This requires a forward declaration (or would require rearranging this file, but I've chosen not to do that for readability of the diff). Signed-off-by: Matthew Wilcox

[f2fs-dev] [PATCH 36/60] f2fs: Pass a folio to ADDRS_PER_PAGE()

2025-07-08 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 2 +- fs/f2fs/file.c | 18 +- fs/f2fs/recovery.c | 4 ++-- fs/f2fs/segment.c | 2 +- include/linux/f2fs_fs.h | 2 +- 5 files changed, 14 insert

[f2fs-dev] [PATCH 40/60] f2fs: Convert set_page_private_data() to folio_set_f2fs_data()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has a folio, so pass it in and operate on it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 2 +- fs/f2fs/f2fs.h | 12 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 5be1a4396f80..d7

[f2fs-dev] [PATCH 23/60] f2fs: Pass folios to copy_node_footer()

2025-07-08 Thread Matthew Wilcox (Oracle)
The only caller has folios so pass them in. Also mark them as const to help the compiler. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.h | 7 --- fs/f2fs/recovery.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index d1

[f2fs-dev] [PATCH 44/60] f2fs: Use a bio in f2fs_submit_page_write()

2025-07-08 Thread Matthew Wilcox (Oracle)
Convert bio_page to bio_folio and use it throughout. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 01c0358ef66f..4649c0a510a0 100644 --- a/fs/f2fs/data.c +++ b/f

[f2fs-dev] [PATCH 48/60] f2fs: Use a folio iterator in f2fs_verify_bio()

2025-07-08 Thread Matthew Wilcox (Oracle)
Change from bio_for_each_segment_all() to bio_for_each_folio_all() to iterate over each folio instead of each page. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ccf4

[f2fs-dev] [PATCH 43/60] f2fs: Use a folio in f2fs_merge_page_bio()

2025-07-08 Thread Matthew Wilcox (Oracle)
We have two folios to deal with here; one carries the metadata and the other points to the data. They may be the same, but if it's compressed, the data_folio will differ from the metadata folio. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 12 ++-- 1 file changed, 6 inser

Re: [f2fs-dev] [PATCH v2] f2fs/015: test mount options

2025-07-08 Thread Zorro Lang via Linux-f2fs-devel
On Mon, Jul 07, 2025 at 05:05:31PM +0800, Chao Yu wrote: > On 7/5/25 02:14, Zorro Lang wrote: > > On Fri, Jul 04, 2025 at 07:48:18PM +0800, Chao Yu wrote: > >> As f2fs changes to use new mount APIs, let's add a new testcase > >> to check mount result for all f2fs supported mount options and > >> th

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

2025-07-08 Thread Qu Wenruo via Linux-f2fs-devel
在 2025/7/9 10:05, Kent Overstreet 写道: On Wed, Jul 09, 2025 at 08:37:05AM +0930, Qu Wenruo wrote: 在 2025/7/9 08:29, Dave Chinner 写道: 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:

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

2025-07-08 Thread Kent Overstreet
On Wed, Jul 09, 2025 at 08:37:05AM +0930, Qu Wenruo wrote: > 在 2025/7/9 08:29, Dave Chinner 写道: > > 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 w

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

2025-07-08 Thread Kent Overstreet
On Wed, Jul 09, 2025 at 10:25:08AM +0930, Qu Wenruo wrote: > 在 2025/7/9 10:05, Kent Overstreet 写道: > > Consider that the thing that has a block device open might not even be a > > filesystem, or at least a VFS filesystem. > > > > It could be a stacking block device driver - md or md - and those >

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

2025-07-08 Thread Qu Wenruo via Linux-f2fs-devel
在 2025/7/9 05:50, Darrick J. Wong 写道: [...] Well, I'd also say just go for own fs_holder_ops if it was not for the awkward "get super from bdev" step. As Christian wrote we've encapsulated that in fs/super.c and bdev_super_lock() in particular but the calling conventions for the fs_holder_ops a