]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
f2fs: add a sysfs entry to show max open zones
authorYongpeng Yang <yangyongpeng@xiaomi.com>
Mon, 10 Nov 2025 08:22:22 +0000 (16:22 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 4 Dec 2025 02:00:04 +0000 (02:00 +0000)
This patch adds a sysfs entry showing the max zones that F2FS can write
concurrently.

Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/sysfs.c

index b590809869ca6485a468d8d963465af82a328932..770470e0598b80e1d828d35451142a1e7b5d6f23 100644 (file)
@@ -643,6 +643,12 @@ Contact:   "Jaegeuk Kim" <jaegeuk@kernel.org>
 Description:   Shows the number of unusable blocks in a section which was defined by
                the zone capacity reported by underlying zoned device.
 
+What:          /sys/fs/f2fs/<disk>/max_open_zones
+Date:          November 2025
+Contact:       "Yongpeng Yang" <yangyongpeng@xiaomi.com>
+Description:   Shows the max number of zones that F2FS can write concurrently when a zoned
+               device is mounted.
+
 What:          /sys/fs/f2fs/<disk>/current_atomic_write
 Date:          July 2022
 Contact:       "Daeho Jeong" <daehojeong@google.com>
index 5685b454bfd12d1dad5a5b0599bc7553b4ac5a42..c42f4f979d13f3f7580f124910a71879d930e13f 100644 (file)
@@ -1213,6 +1213,7 @@ F2FS_SBI_GENERAL_RW_ATTR(last_age_weight);
 F2FS_SBI_GENERAL_RW_ATTR(max_read_extent_count);
 #ifdef CONFIG_BLK_DEV_ZONED
 F2FS_SBI_GENERAL_RO_ATTR(unusable_blocks_per_sec);
+F2FS_SBI_GENERAL_RO_ATTR(max_open_zones);
 F2FS_SBI_GENERAL_RW_ATTR(blkzone_alloc_policy);
 #endif
 F2FS_SBI_GENERAL_RW_ATTR(carve_out);
@@ -1388,6 +1389,7 @@ static struct attribute *f2fs_attrs[] = {
 #endif
 #ifdef CONFIG_BLK_DEV_ZONED
        ATTR_LIST(unusable_blocks_per_sec),
+       ATTR_LIST(max_open_zones),
        ATTR_LIST(blkzone_alloc_policy),
 #endif
 #ifdef CONFIG_F2FS_FS_COMPRESSION