Skip to content

Commit 0974f48

Browse files
committed
Merge tag 'f2fs-for-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
Pull f2fs updates from Jaegeuk Kim: "Three main updates: folio conversion by Matthew, switch to a new mount API by Hongbo and Eric, and several sysfs entries to tune GCs for ZUFS with finer granularity by Daeho. There are also patches to address bugs and issues in the existing features such as GCs, file pinning, write-while-dio-read, contingous block allocation, and memory access violations. Enhancements: - switch to new mount API and folio conversion - add sysfs nodes to controle F2FS GCs for ZUFS - improve performance on the nat entry cache - drop inode from the donation list when the last file is closed - avoid splitting bio when reading multiple pages Bug fixes: - fix to trigger foreground gc during f2fs_map_blocks() in lfs mode - make sure zoned device GC to use FG_GC in shortage of free section - fix to calculate dirty data during has_not_enough_free_secs() - fix to update upper_p in __get_secs_required() correctly - wait for inflight dio completion, excluding pinned files read using dio - don't break allocation when crossing contiguous sections - vm_unmap_ram() may be called from an invalid context - fix to avoid out-of-boundary access in dnode page - fix to avoid panic in f2fs_evict_inode - fix to avoid UAF in f2fs_sync_inode_meta() - fix to use f2fs_is_valid_blkaddr_raw() in do_write_page() - fix UAF of f2fs_inode_info in f2fs_free_dic - fix to avoid invalid wait context issue - fix bio memleak when committing super block - handle nat.blkaddr corruption in f2fs_get_node_info() In addition, there are also clean-ups and minor bug fixes" * tag 'f2fs-for-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (109 commits) f2fs: drop inode from the donation list when the last file is closed f2fs: add gc_boost_gc_greedy sysfs node f2fs: add gc_boost_gc_multiple sysfs node f2fs: fix to trigger foreground gc during f2fs_map_blocks() in lfs mode f2fs: fix to calculate dirty data during has_not_enough_free_secs() f2fs: fix to update upper_p in __get_secs_required() correctly f2fs: directly add newly allocated pre-dirty nat entry to dirty set list f2fs: avoid redundant clean nat entry move in lru list f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio f2fs: ignore valid ratio when free section count is low f2fs: don't break allocation when crossing contiguous sections f2fs: remove unnecessary tracepoint enabled check f2fs: merge the two conditions to avoid code duplication f2fs: vm_unmap_ram() may be called from an invalid context f2fs: fix to avoid out-of-boundary access in dnode page f2fs: switch to the new mount api f2fs: introduce fs_context_operation structure f2fs: separate the options parsing and options checking f2fs: Add f2fs_fs_context to record the mount options f2fs: Allow sbi to be NULL in f2fs_printk ...
2 parents 35a813e + 078cad8 commit 0974f48

File tree

24 files changed

+2019
-1534
lines changed

24 files changed

+2019
-1534
lines changed

Documentation/ABI/testing/sysfs-fs-f2fs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,3 +861,25 @@ Description: This is a read-only entry to show the value of sb.s_encoding_flags,
861861
SB_ENC_STRICT_MODE_FL 0x00000001
862862
SB_ENC_NO_COMPAT_FALLBACK_FL 0x00000002
863863
============================ ==========
864+
865+
What: /sys/fs/f2fs/<disk>/reserved_pin_section
866+
Date: June 2025
867+
Contact: "Chao Yu" <[email protected]>
868+
Description: This threshold is used to control triggering garbage collection while
869+
fallocating on pinned file, so, it can guarantee there is enough free
870+
reserved section before preallocating on pinned file.
871+
By default, the value is ovp_sections, especially, for zoned ufs, the
872+
value is 1.
873+
874+
What: /sys/fs/f2fs/<disk>/gc_boost_gc_multiple
875+
Date: June 2025
876+
Contact: "Daeho Jeong" <[email protected]>
877+
Description: Set a multiplier for the background GC migration window when F2FS GC is
878+
boosted. The range should be from 1 to the segment count in a section.
879+
Default: 5
880+
881+
What: /sys/fs/f2fs/<disk>/gc_boost_gc_greedy
882+
Date: June 2025
883+
Contact: "Daeho Jeong" <[email protected]>
884+
Description: Control GC algorithm for boost GC. 0: cost benefit, 1: greedy
885+
Default: 1

Documentation/filesystems/f2fs.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ usrjquota=<file> Appoint specified file and type during mount, so that quota
238238
grpjquota=<file> information can be properly updated during recovery flow,
239239
prjjquota=<file> <quota file>: must be in root directory;
240240
jqfmt=<quota type> <quota type>: [vfsold,vfsv0,vfsv1].
241-
offusrjquota Turn off user journalled quota.
242-
offgrpjquota Turn off group journalled quota.
243-
offprjjquota Turn off project journalled quota.
241+
usrjquota= Turn off user journalled quota.
242+
grpjquota= Turn off group journalled quota.
243+
prjjquota= Turn off project journalled quota.
244244
quota Enable plain user disk quota accounting.
245245
noquota Disable all plain disk quota option.
246246
alloc_mode=%s Adjust block allocation policy, which supports "reuse"

fs/f2fs/checkpoint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static struct folio *__get_meta_folio(struct f2fs_sb_info *sbi, pgoff_t index,
8282
if (folio_test_uptodate(folio))
8383
goto out;
8484

85-
fio.page = &folio->page;
85+
fio.folio = folio;
8686

8787
err = f2fs_submit_page_bio(&fio);
8888
if (err) {
@@ -309,7 +309,7 @@ int f2fs_ra_meta_pages(struct f2fs_sb_info *sbi, block_t start, int nrpages,
309309
continue;
310310
}
311311

312-
fio.page = &folio->page;
312+
fio.folio = folio;
313313
err = f2fs_submit_page_bio(&fio);
314314
f2fs_folio_put(folio, err ? true : false);
315315

@@ -485,7 +485,7 @@ static bool f2fs_dirty_meta_folio(struct address_space *mapping,
485485
folio_mark_uptodate(folio);
486486
if (filemap_dirty_folio(mapping, folio)) {
487487
inc_page_count(F2FS_M_SB(mapping), F2FS_DIRTY_META);
488-
set_page_private_reference(&folio->page);
488+
folio_set_f2fs_reference(folio);
489489
return true;
490490
}
491491
return false;
@@ -1045,7 +1045,7 @@ void f2fs_update_dirty_folio(struct inode *inode, struct folio *folio)
10451045
inode_inc_dirty_pages(inode);
10461046
spin_unlock(&sbi->inode_lock[type]);
10471047

1048-
set_page_private_reference(&folio->page);
1048+
folio_set_f2fs_reference(folio);
10491049
}
10501050

10511051
void f2fs_remove_dirty_inode(struct inode *inode)

0 commit comments

Comments
 (0)