]> git.infradead.org Git - users/hch/misc.git/commitdiff
Merge tag 'f2fs-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeu...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2024 22:12:38 +0000 (15:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2024 22:12:38 +0000 (15:12 -0700)
Pull f2fs updates from Jaegeuk Kim:
 "The main changes include converting major IO paths to use folio, and
  adding various knobs to control GC more flexibly for Zoned devices.

  In addition, there are several patches to address corner cases of
  atomic file operations and better support for file pinning on zoned
  device.

  Enhancement:
   - add knobs to tune foreground/background GCs for Zoned devices
   - convert IO paths to use folio
   - reduce expensive checkpoint trigger frequency
   - allow F2FS_IPU_NOCACHE for pinned file
   - forcibly migrate to secure space for zoned device file pinning
   - get rid of buffer_head use
   - add write priority option based on zone UFS
   - get rid of online repair on corrupted directory

  Bug fixes:
   - fix to don't panic system for no free segment fault injection
   - fix to don't set SB_RDONLY in f2fs_handle_critical_error()
   - avoid unused block when dio write in LFS mode
   - compress: don't redirty sparse cluster during {,de}compress
   - check discard support for conventional zones
   - atomic: prevent atomic file from being dirtied before commit
   - atomic: fix to check atomic_file in f2fs ioctl interfaces
   - atomic: fix to forbid dio in atomic_file
   - atomic: fix to truncate pagecache before on-disk metadata truncation
   - atomic: create COW inode from parent dentry
   - atomic: fix to avoid racing w/ GC
   - atomic: require FMODE_WRITE for atomic write ioctls
   - fix to wait page writeback before setting gcing flag
   - fix to avoid racing in between read and OPU dio write, dio completion
   - fix several potential integer overflows in file offsets and dir_block_index
   - fix to avoid use-after-free in f2fs_stop_gc_thread()

  As usual, there are several code clean-ups and refactorings"

* tag 'f2fs-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (60 commits)
  f2fs: allow F2FS_IPU_NOCACHE for pinned file
  f2fs: forcibly migrate to secure space for zoned device file pinning
  f2fs: remove unused parameters
  f2fs: fix to don't panic system for no free segment fault injection
  f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error()
  f2fs: add valid block ratio not to do excessive GC for one time GC
  f2fs: create gc_no_zoned_gc_percent and gc_boost_zoned_gc_percent
  f2fs: do FG_GC when GC boosting is required for zoned devices
  f2fs: increase BG GC migration window granularity when boosted for zoned devices
  f2fs: add reserved_segments sysfs node
  f2fs: introduce migration_window_granularity
  f2fs: make BG GC more aggressive for zoned devices
  f2fs: avoid unused block when dio write in LFS mode
  f2fs: fix to check atomic_file in f2fs ioctl interfaces
  f2fs: get rid of online repaire on corrupted directory
  f2fs: prevent atomic file from being dirtied before commit
  f2fs: get rid of page->index
  f2fs: convert read_node_page() to use folio
  f2fs: convert __write_node_page() to use folio
  f2fs: convert f2fs_write_data_page() to use folio
  ...

1  2 
fs/f2fs/data.c
fs/f2fs/file.c
fs/f2fs/super.c
fs/f2fs/verity.c

diff --cc fs/f2fs/data.c
index 5dfa0207ad8f4f9d91a1b73ca0c41edcba651b5c,b94cf6eea2f95e020cb8c89f86bd4e57bf4cca8b..94f7b084f6016490caba8a328b060f7dfc8a9e15
@@@ -3617,16 -3634,17 +3635,16 @@@ repeat
  
        /* TODO: cluster can be compressed due to race with .writepage */
  
 -      *pagep = page;
 -      folio = page_folio(page);
 +      *foliop = folio;
  
        if (f2fs_is_atomic_file(inode))
-               err = prepare_atomic_write_begin(sbi, &folio->page, pos, len,
+               err = prepare_atomic_write_begin(sbi, folio, pos, len,
                                        &blkaddr, &need_balance, &use_cow);
        else
-               err = prepare_write_begin(sbi, &folio->page, pos, len,
+               err = prepare_write_begin(sbi, folio, pos, len,
                                        &blkaddr, &need_balance);
        if (err)
 -              goto fail;
 +              goto put_folio;
  
        if (need_balance && !IS_NOQUOTA(inode) &&
                        has_not_enough_free_secs(sbi, 0, 0)) {
                if (!f2fs_is_valid_blkaddr(sbi, blkaddr,
                                DATA_GENERIC_ENHANCE_READ)) {
                        err = -EFSCORRUPTED;
 -                      goto fail;
 +                      goto put_folio;
                }
                err = f2fs_submit_page_read(use_cow ?
-                               F2FS_I(inode)->cow_inode : inode, &folio->page,
-                               blkaddr, 0, true);
+                               F2FS_I(inode)->cow_inode : inode,
+                               folio, blkaddr, 0, true);
                if (err)
 -                      goto fail;
 +                      goto put_folio;
  
                folio_lock(folio);
                if (unlikely(folio->mapping != mapping)) {
diff --cc fs/f2fs/file.c
Simple merge
diff --cc fs/f2fs/super.c
Simple merge
Simple merge