Loading Documentation/ABI/testing/sysfs-fs-f2fs +6 −0 Original line number Diff line number Diff line Loading @@ -580,3 +580,9 @@ Date: January 2022 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Controls max # of node block writes to be used for roll forward recovery. This can limit the roll forward recovery time. What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec Date: June 2022 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. fs/f2fs/sysfs.c +10 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,11 @@ static struct f2fs_attr f2fs_attr_##_name = { \ .offset = _offset \ } #define F2FS_RO_ATTR(struct_type, struct_name, name, elname) \ F2FS_ATTR_OFFSET(struct_type, name, 0444, \ f2fs_sbi_show, NULL, \ offsetof(struct struct_name, elname)) #define F2FS_RW_ATTR(struct_type, struct_name, name, elname) \ F2FS_ATTR_OFFSET(struct_type, name, 0644, \ f2fs_sbi_show, f2fs_sbi_store, \ Loading Loading @@ -811,6 +816,8 @@ F2FS_FEATURE_RO_ATTR(encrypted_casefold); #endif /* CONFIG_FS_ENCRYPTION */ #ifdef CONFIG_BLK_DEV_ZONED F2FS_FEATURE_RO_ATTR(block_zoned); F2FS_RO_ATTR(F2FS_SBI, f2fs_sb_info, unusable_blocks_per_sec, unusable_blocks_per_sec); #endif F2FS_FEATURE_RO_ATTR(atomic_write); F2FS_FEATURE_RO_ATTR(extra_attr); Loading Loading @@ -919,6 +926,9 @@ static struct attribute *f2fs_attrs[] = { ATTR_LIST(moved_blocks_background), ATTR_LIST(avg_vblocks), #endif #ifdef CONFIG_BLK_DEV_ZONED ATTR_LIST(unusable_blocks_per_sec), #endif #ifdef CONFIG_F2FS_FS_COMPRESSION ATTR_LIST(compr_written_block), ATTR_LIST(compr_saved_block), Loading Loading
Documentation/ABI/testing/sysfs-fs-f2fs +6 −0 Original line number Diff line number Diff line Loading @@ -580,3 +580,9 @@ Date: January 2022 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Controls max # of node block writes to be used for roll forward recovery. This can limit the roll forward recovery time. What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec Date: June 2022 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.
fs/f2fs/sysfs.c +10 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,11 @@ static struct f2fs_attr f2fs_attr_##_name = { \ .offset = _offset \ } #define F2FS_RO_ATTR(struct_type, struct_name, name, elname) \ F2FS_ATTR_OFFSET(struct_type, name, 0444, \ f2fs_sbi_show, NULL, \ offsetof(struct struct_name, elname)) #define F2FS_RW_ATTR(struct_type, struct_name, name, elname) \ F2FS_ATTR_OFFSET(struct_type, name, 0644, \ f2fs_sbi_show, f2fs_sbi_store, \ Loading Loading @@ -811,6 +816,8 @@ F2FS_FEATURE_RO_ATTR(encrypted_casefold); #endif /* CONFIG_FS_ENCRYPTION */ #ifdef CONFIG_BLK_DEV_ZONED F2FS_FEATURE_RO_ATTR(block_zoned); F2FS_RO_ATTR(F2FS_SBI, f2fs_sb_info, unusable_blocks_per_sec, unusable_blocks_per_sec); #endif F2FS_FEATURE_RO_ATTR(atomic_write); F2FS_FEATURE_RO_ATTR(extra_attr); Loading Loading @@ -919,6 +926,9 @@ static struct attribute *f2fs_attrs[] = { ATTR_LIST(moved_blocks_background), ATTR_LIST(avg_vblocks), #endif #ifdef CONFIG_BLK_DEV_ZONED ATTR_LIST(unusable_blocks_per_sec), #endif #ifdef CONFIG_F2FS_FS_COMPRESSION ATTR_LIST(compr_written_block), ATTR_LIST(compr_saved_block), Loading