Merge tag 'f2fs-for-6-6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Sep 2023 22:37:59 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Sep 2023 22:37:59 +0000 (15:37 -0700)
Pull f2fs updates from Jaegeuk Kim:
 "In this cycle, we don't have a highlighted feature enhancement, but
  mostly have fixed issues mainly in two parts: 1) zoned block device,
  and 2) compression support.

  For zoned block device, we've tried to improve the power-off recovery
  flow as much as possible. For compression, we found some corner cases
  caused by wrong compression policy and logics. Other than them, there
  were some reverts and stat corrections.

  Bug fixes:
   - use finish zone command when closing a zone
   - check zone type before sending async reset zone command
   - fix to assign compress_level for lz4 correctly
   - fix error path of f2fs_submit_page_read()
   - don't {,de}compress non-full cluster
   - send small discard commands during checkpoint back
   - flush inode if atomic file is aborted
   - correct to account gc/cp stats

  And, there are minor bug fixes, avoiding false lockdep warning, and
  clean-ups"

* tag 'f2fs-for-6-6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (25 commits)
  f2fs: use finish zone command when closing a zone
  f2fs: compress: fix to assign compress_level for lz4 correctly
  f2fs: fix error path of f2fs_submit_page_read()
  f2fs: clean up error handling in sanity_check_{compress_,}inode()
  f2fs: avoid false alarm of circular locking
  Revert "f2fs: do not issue small discard commands during checkpoint"
  f2fs: doc: fix description of max_small_discards
  f2fs: should update REQ_TIME for direct write
  f2fs: fix to account cp stats correctly
  f2fs: fix to account gc stats correctly
  f2fs: remove unneeded check condition in __f2fs_setxattr()
  f2fs: fix to update i_ctime in __f2fs_setxattr()
  Revert "f2fs: fix to do sanity check on extent cache correctly"
  f2fs: increase usage of folio_next_index() helper
  f2fs: Only lfs mode is allowed with zoned block device feature
  f2fs: check zone type before sending async reset zone command
  f2fs: compress: don't {,de}compress non-full cluster
  f2fs: allow f2fs_ioc_{,de}compress_file to be interrupted
  f2fs: don't reopen the main block device in f2fs_scan_devices
  f2fs: fix to avoid mmap vs set_compress_option case
  ...

1  2 
fs/f2fs/compress.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/inline.c
fs/f2fs/inode.c
fs/f2fs/recovery.c
fs/f2fs/super.c
fs/f2fs/xattr.c

Simple merge
diff --cc fs/f2fs/f2fs.h
Simple merge
diff --cc fs/f2fs/file.c
Simple merge
diff --cc fs/f2fs/gc.c
Simple merge
Simple merge
diff --cc fs/f2fs/inode.c
Simple merge
Simple merge
diff --cc fs/f2fs/super.c
@@@ -1561,7 -1561,8 +1561,8 @@@ static void destroy_device_list(struct 
        int i;
  
        for (i = 0; i < sbi->s_ndevs; i++) {
-               blkdev_put(FDEV(i).bdev, sbi->sb);
+               if (i > 0)
 -                      blkdev_put(FDEV(i).bdev, sbi->sb->s_type);
++                      blkdev_put(FDEV(i).bdev, sbi->sb);
  #ifdef CONFIG_BLK_DEV_ZONED
                kvfree(FDEV(i).blkz_seq);
  #endif
@@@ -4215,9 -4218,9 +4218,9 @@@ static int f2fs_scan_devices(struct f2f
                                FDEV(i).end_blk = FDEV(i).start_blk +
                                        (FDEV(i).total_segments <<
                                        sbi->log_blocks_per_seg) - 1;
 -                                      mode, sbi->sb->s_type, NULL);
+                               FDEV(i).bdev = blkdev_get_by_path(FDEV(i).path,
++                                      mode, sbi->sb, NULL);
                        }
-                       FDEV(i).bdev = blkdev_get_by_path(FDEV(i).path, mode,
-                                                         sbi->sb, NULL);
                }
                if (IS_ERR(FDEV(i).bdev))
                        return PTR_ERR(FDEV(i).bdev);
diff --cc fs/f2fs/xattr.c
@@@ -767,7 -766,8 +766,8 @@@ same
                clear_inode_flag(inode, FI_ACL_MODE);
        }
  
 -      inode->i_ctime = current_time(inode);
++      inode_set_ctime_current(inode);
+       f2fs_mark_inode_dirty_sync(inode, true);
  exit:
        kfree(base_addr);
        return error;