Skip to content

Commit 8973201

Browse files
Yongpeng YangJaegeuk Kim
authored andcommitted
f2fs: add a sysfs entry to show max open zones
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>
1 parent 581251e commit 8973201

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Documentation/ABI/testing/sysfs-fs-f2fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,12 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
643643
Description: Shows the number of unusable blocks in a section which was defined by
644644
the zone capacity reported by underlying zoned device.
645645

646+
What: /sys/fs/f2fs/<disk>/max_open_zones
647+
Date: November 2025
648+
Contact: "Yongpeng Yang" <yangyongpeng@xiaomi.com>
649+
Description: Shows the max number of zones that F2FS can write concurrently when a zoned
650+
device is mounted.
651+
646652
What: /sys/fs/f2fs/<disk>/current_atomic_write
647653
Date: July 2022
648654
Contact: "Daeho Jeong" <daehojeong@google.com>

fs/f2fs/sysfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,7 @@ F2FS_SBI_GENERAL_RW_ATTR(last_age_weight);
12131213
F2FS_SBI_GENERAL_RW_ATTR(max_read_extent_count);
12141214
#ifdef CONFIG_BLK_DEV_ZONED
12151215
F2FS_SBI_GENERAL_RO_ATTR(unusable_blocks_per_sec);
1216+
F2FS_SBI_GENERAL_RO_ATTR(max_open_zones);
12161217
F2FS_SBI_GENERAL_RW_ATTR(blkzone_alloc_policy);
12171218
#endif
12181219
F2FS_SBI_GENERAL_RW_ATTR(carve_out);
@@ -1388,6 +1389,7 @@ static struct attribute *f2fs_attrs[] = {
13881389
#endif
13891390
#ifdef CONFIG_BLK_DEV_ZONED
13901391
ATTR_LIST(unusable_blocks_per_sec),
1392+
ATTR_LIST(max_open_zones),
13911393
ATTR_LIST(blkzone_alloc_policy),
13921394
#endif
13931395
#ifdef CONFIG_F2FS_FS_COMPRESSION

0 commit comments

Comments
 (0)