[f2fs-dev] [syzbot] Monthly f2fs report (Mar 2025)

2025-04-04 Thread syzbot
Hello f2fs maintainers/developers, This is a 31-day syzbot report for the f2fs subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/f2fs During the period, 1 new issues were detected and 1 were fixed. In total, 9 issues are still open and 57 have al

Re: [f2fs-dev] [DISCUSSION]:f2fs:Approachs to address write amplification in current aops->dirty_folio

2025-04-04 Thread Nanzhe Zhao
Thank you for your prompt and patient response! > > At this point, f2fs has no concept of head/tail pages. Because it > doesn't tell the VFS that it can handle large folios, it will only see > order-0 pages. The page->private member will go away, so filesystems > cannot depend on being able to ac

Re: [f2fs-dev] [DISCUSSION]:f2fs:Approachs to address write amplification in current aops->dirty_folio

2025-04-04 Thread Nanzhe Zhao
Thank you for your prompt and patient response! > > The challenge with that is that iomap does not support all the > functionality that f2fs requires. The iomap data structure could > be duplicated inside f2fs, but then we hit the problem that f2fs > currently stores other information in folio->pr

[f2fs-dev] [PATCH 109/153] f2fs: Pass a folio to f2fs_setxattr()

2025-04-04 Thread Matthew Wilcox (Oracle)
Also convert f2fs_initxattrs() to take a folio. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/acl.c | 2 +- fs/f2fs/dir.c | 2 +- fs/f2fs/xattr.c | 16 fs/f2fs/xattr.h | 22 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/fs/f2f

[f2fs-dev] [PATCH 014/153] f2fs: Pass a folio to f2fs_submit_merged_ipu_write()

2025-04-04 Thread Matthew Wilcox (Oracle)
The only caller which passes a page already has a folio, so pass it in. 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(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c in

[f2fs-dev] [PATCH 079/153] f2fs: Use a folio in gc_node_segment()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/gc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 45b1ffa5ea93..56c0ca609fc1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1045,7

[f2fs-dev] [PATCH 043/153] f2fs: Remove f2fs_get_sum_page()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers have now been converted to call f2fs_get_sum_folio() instead. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 55a161d39e4a..b6ca1e5a721e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/

[f2fs-dev] [PATCH 087/153] f2fs: Use a folio in f2fs_init_inode_metadata()

2025-04-04 Thread Matthew Wilcox (Oracle)
Since this is the only caller of f2fs_new_inode_page(), convert that to return a folio at the same time. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c | 37 +++-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 8 -

[f2fs-dev] [PATCH 041/153] f2fs: Use a folio in check_index_in_prev_nodes()

2025-04-04 Thread Matthew Wilcox (Oracle)
Get a folio instead of a page and operate on it. Saves a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/recovery.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index a29bd82de93b..4b2c09d63

[f2fs-dev] [PATCH 129/153] f2fs: Pass a folio to f2fs_delete_entry()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers now have a folio so pass it in. Removes eight calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c | 26 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/namei.c| 4 ++-- fs/f2fs/recovery.c | 2 +- 4 files changed, 17 insertions

[f2fs-dev] [PATCH 070/153] f2fs: Add f2fs_get_xnode_folio()

2025-04-04 Thread Matthew Wilcox (Oracle)
The folio equivalent of f2fs_get_xnode_page(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 5 + 2 files changed, 6 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index a32ac1ecb61c..8b5c81116653 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs

[f2fs-dev] [PATCH 101/153] f2fs: Use a folio in f2fs_recover_inline_data()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inline.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 245cbff2ca2c..13ede6ccc312 100644 --- a/fs/f2fs/inline.c ++

[f2fs-dev] [PATCH 055/153] f2fs: Use a folio in fill_zero()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/file.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ab46fb272cc2..90e71b54e1d0 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/

Re: [f2fs-dev] [PATCH v5] f2fs: prevent the current section from being selected as a victim during GC

2025-04-04 Thread Jaegeuk Kim via Linux-f2fs-devel
Hi Yohan, I modified this patch after applying the clean up by https://lore.kernel.org/linux-f2fs-devel/20250404195442.413945-1-jaeg...@kernel.org/T/#u --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -486,6 +486,11 @@ static inline void __set_test_and_free(struct f2fs_sb_info *sbi,

[f2fs-dev] [PATCH] f2fs: clean up unnecessary indentation

2025-04-04 Thread Jaegeuk Kim via Linux-f2fs-devel
No functional change. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.h | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 0465dc00b349..5fcb1f92d506 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2f

[f2fs-dev] [PATCH 117/153] f2fs: Pass a folio to do_recover_data()

2025-04-04 Thread Matthew Wilcox (Oracle)
Push the page conversion into do_recover_data(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/recovery.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index dd69ff5b7661..8f8a6b2331a6 100644 ---

[f2fs-dev] f2fs: prevent the current section from being selected as a victim during GC

2025-04-04 Thread yohan.joung
>On 4/2/25 08:52, yohan.joung wrote: >> When selecting a victim using next_victim_seg in a large section, the >> selected section might already have been cleared and designated as the >> new current section, making it actively in use. >> This behavior causes inconsistency between the SIT and SSA. >

[f2fs-dev] [PATCH 033/153] f2fs: Use a folio in __get_nat_bitmaps()

2025-04-04 Thread Matthew Wilcox (Oracle)
Get a folio instead of a page. Saves a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7e32763cc51e..e1fa3babb50f 100644 --- a/fs/f2fs

[f2fs-dev] [PATCH 106/153] f2fs: Use a folio in f2fs_update_inode_page()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 38512f2d4b28..c122761eaa86 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -

[f2fs-dev] [PATCH 116/153] f2fs: Pass a folio to read_inline_xattr()

2025-04-04 Thread Matthew Wilcox (Oracle)
Both callers have a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/xattr.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index ff49bcba96f3..c07b3d7c45fa 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.

[f2fs-dev] [PATCH 126/153] f2fs: Pass a folio to __f2fs_find_entry()

2025-04-04 Thread Matthew Wilcox (Oracle)
Also pass a folio to f2fs_find_in_inline_dir() and find_in_level(). Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c | 32 +--- fs/f2fs/f2fs.h | 8 +++- fs/f2fs/inline.c | 8 fs/f2fs/namei.c|

[f2fs-dev] [PATCH 124/153] f2fs: Pass a folio to f2fs_do_read_inline_data()

2025-04-04 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/f2fs.h | 2 +- fs/f2fs/inline.c | 8 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index e434f4f5439c..952b3885a092

[f2fs-dev] [syzbot] [f2fs?] kernel BUG in f2fs_truncate_hole

2025-04-04 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:4e82c87058f4 Merge tag 'rust-6.15' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1150240458 kernel config: https://syzkaller.appspot.com/x/.config?x=f8721be6a767792 dash

[f2fs-dev] [PATCH 015/153] f2fs: Convert __get_meta_page() to __get_meta_folio()

2025-04-04 Thread Matthew Wilcox (Oracle)
Push the conversion to a page into the callers. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 55fcb9869531..1274b66ab5fc 100644 --- a/fs/f2fs

Re: [f2fs-dev] [PATCH 3/3] fsck.f2fs: support to tune linear lookup feature

2025-04-04 Thread Jaegeuk Kim via Linux-f2fs-devel
Can we also update man page? On 03/31, Chao Yu wrote: > Support a new option --nolinear-lookup=X for fsck.f2fs to tune > linear lookup fallback conditionally, X=1: disable linear lookup, > X=0: enable linear lookup. > > This can help to 1) add a regression testcase to check kernel > whether linea

Re: [f2fs-dev] [RFC PATCH] f2fs: remove some redundant flow about FI_ATOMIC_DIRTIED

2025-04-04 Thread Chao Yu via Linux-f2fs-devel
On 3/27/25 02:51, Daeho Jeong wrote: > On Wed, Mar 26, 2025 at 5:12 AM Chao Yu via Linux-f2fs-devel > wrote: >> >> On 3/26/25 18:51, Zhiguo Niu wrote: >>> Chao Yu 于2025年3月26日周三 17:26写道: On 3/26/25 16:46, Zhiguo Niu wrote: > Commit fccaa81de87e ("f2fs: prevent atomic file from being

[f2fs-dev] [PATCH 047/153] f2fs: Remove f2fs_find_data_page()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers have now been converted to call f2fs_find_data_folio(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 8 1 file changed, 8 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b6ca1e5a721e..788a8cd55603 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs

[f2fs-dev] [PATCH 084/153] f2fs: Remove f2fs_get_node_page()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers have now been converted to call f2fs_get_node_folio(). Remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/f2fs.h | 1 - fs/f2fs/node.c | 8 2 files changed, 9 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 92b5878dc5d3..9fd4640f67bf 100

[f2fs-dev] [PATCH 053/153] f2fs: Use a folio in f2fs_defragment_range()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/file.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5529b740c37f..ab46fb272cc2 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/

[f2fs-dev] [PATCH 107/153] f2fs: Use a folio in do_read_inode()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove five calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/inode.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index c122761eaa86..cbfd536efe20 100644 --- a/fs/f2fs/inode.

[f2fs-dev] [PATCH 141/153] f2fs: Use a folio in f2fs_encrypt_one_page()

2025-04-04 Thread Matthew Wilcox (Oracle)
Fetch a folio from the page cache instead of a page. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8980b77bfdab..d67731f042cf

[f2fs-dev] [PATCH 090/153] f2fs: Use a folio in f2fs_add_inline_entry()

2025-04-04 Thread Matthew Wilcox (Oracle)
Also convert f2fs_init_inode_metadata() to take a folio. Remove Remove three calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c| 4 ++-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 20 ++-- 3 files changed, 13 insertions(+), 13 deletions(-)

[f2fs-dev] [PATCH 011/153] f2fs: Use a folio in commit_checkpoint()

2025-04-04 Thread Matthew Wilcox (Oracle)
Save four calls to compound_head(). Also remove the call to f2fs_wait_on_page_writeback() as this was already done by f2fs_grab_meta_folio() and writeback can't have restarted in the meantime since we hold the folio locked. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 18 ++

[f2fs-dev] [PATCH 007/153] f2fs: Remove access to page->mapping in f2fs_is_cp_guaranteed()

2025-04-04 Thread Matthew Wilcox (Oracle)
page->mapping will be removed soon, so call page_folio() on the page that was passed in. 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 8d25af7a4cfd..e668497ed3fc 100644 --- a/fs/

[f2fs-dev] [PATCH 140/153] f2fs: Convert f2fs_load_compressed_page() to f2fs_load_compressed_folio()

2025-04-04 Thread Matthew Wilcox (Oracle)
The only caller already has a folio, so pass it in. Copy the entire size of the folio to support large block sizes. Remove two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/compress.c | 16 fs/f2fs/data.c | 3 +-- fs/f2fs/f2fs.h | 6 +++

[f2fs-dev] [PATCH 130/153] f2fs: Pass a folio to f2fs_delete_inline_entry()

2025-04-04 Thread Matthew Wilcox (Oracle)
The caller now has a folio so pass it in. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 3 +-- fs/f2fs/inline.c | 14 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/dir.c b/

[f2fs-dev] [PATCH 135/153] f2fs: Pass a folio to f2fs_set_link()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers now have a folio, pass it in. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c | 10 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/namei.c | 12 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/f2fs/dir.c

[f2fs-dev] [PATCH 016/153] f2fs: Convert f2fs_get_tmp_page() to f2fs_get_tmp_folio()

2025-04-04 Thread Matthew Wilcox (Oracle)
Convert all the callers to receive a folio. Removes a lot of hidden calls to compound_head() in f2fs_put_page(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 4 +-- fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 10 +++--- fs/f2fs/recovery.c | 86 ++

[f2fs-dev] [PATCH 061/153] f2fs: Use a folio in move_data_block()

2025-04-04 Thread Matthew Wilcox (Oracle)
Remove 11 hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/gc.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bdc1d079c7b3..45b1ffa5ea93 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1

[f2fs-dev] [PATCH 121/153] f2fs: Pass a folio to f2fs_make_empty_inline_dir()

2025-04-04 Thread Matthew Wilcox (Oracle)
The only caller already has a folio, so pass it in. Removes a hidden call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/dir.c| 2 +- fs/f2fs/f2fs.h | 2 +- fs/f2fs/inline.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/dir.c b/

[f2fs-dev] [PATCH 010/153] f2fs: Add f2fs_grab_meta_folio()

2025-04-04 Thread Matthew Wilcox (Oracle)
Turn f2fs_grab_meta_page() into a wrapper around f2fs_grab_meta_folio(). Saves three hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 16 fs/f2fs/f2fs.h | 8 +++- 2 files changed, 15 insertions(+), 9 deletions(-) diff

[f2fs-dev] [PATCH v2 1/2] f2fs: add a proc entry show inject stats

2025-04-04 Thread Chao Yu via Linux-f2fs-devel
This patch adds a proc entry named inject_stats to show total injected count for each fault type. cat /proc/fs/f2fs//inject_stats fault_type injected_count kmalloc 0 kvmalloc0 page alloc 0 page get0 alloc bio(obsolete) 0

[f2fs-dev] [PATCH 147/153] f2fs: Pass a folio to set_nid()

2025-04-04 Thread Matthew Wilcox (Oracle)
All callers have a folio, so pass it in. Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 10 +- fs/f2fs/node.h | 8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 152c664f94

Re: [f2fs-dev] [PATCH] f2fs: support to disable linear lookup fallback

2025-04-04 Thread Daniel Lee via Linux-f2fs-devel
On Sun, Mar 30, 2025 at 7:54 PM Chao Yu wrote: > > After commit 91b587ba79e1 ("f2fs: Introduce linear search for > dentries"), f2fs forced to use linear lookup whenever a hash-based > lookup fails on casefolded directory, it may affect performance > for scenarios: a) create a new file w/ filename

[f2fs-dev] [PATCH 093/153] f2fs: Use a folio in f2fs_do_truncate_blocks()

2025-04-04 Thread Matthew Wilcox (Oracle)
Removes two calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/file.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 90e71b54e1d0..f6835c0d1ce8 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @