Loading Documentation/ABI/testing/sysfs-fs-f2fs +310 −13 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ Contact: "Namjae Jeon" <namjae.jeon@samsung.com> Description: Controls the victim selection policy for garbage collection. Setting gc_idle = 0(default) will disable this option. Setting gc_idle = 1 will select the Cost Benefit approach & setting gc_idle = 2 will select the greedy approach. gc_idle = 2 will select the greedy approach & setting gc_idle = 3 will select the age-threshold based approach. What: /sys/fs/f2fs/<disk>/reclaim_segments Date: October 2013 Loading @@ -37,18 +38,25 @@ Description: This parameter controls the number of prefree segments to be What: /sys/fs/f2fs/<disk>/main_blkaddr Date: November 2019 Contact: "Ramon Pantin" <pantin@google.com> Description: Shows first block address of MAIN area. Description: Shows first block address of MAIN area. What: /sys/fs/f2fs/<disk>/ipu_policy Date: November 2013 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> Description: Controls the in-place-update policy. updates in f2fs. User can set: 0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR, 0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL, 0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC, 0x40: F2FS_IPU_NOCACHE. ==== ================= 0x01 F2FS_IPU_FORCE 0x02 F2FS_IPU_SSR 0x04 F2FS_IPU_UTIL 0x08 F2FS_IPU_SSR_UTIL 0x10 F2FS_IPU_FSYNC 0x20 F2FS_IPU_ASYNC 0x40 F2FS_IPU_NOCACHE 0x80 F2FS_IPU_HONOR_OPU_WRITE ==== ================= Refer segment.h for details. What: /sys/fs/f2fs/<disk>/min_ipu_util Loading Loading @@ -88,13 +96,47 @@ Description: Controls the issue rate of discard commands that consist of small checkpoint is triggered, and issued during the checkpoint. By default, it is disabled with 0. What: /sys/fs/f2fs/<disk>/max_ordered_discard Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: Controls the maximum ordered discard, the unit size is one block(4KB). Set it to 16 by default. What: /sys/fs/f2fs/<disk>/max_discard_request Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the number of discards a thread will issue at a time. Higher number will allow the discard thread to finish its work faster, at the cost of higher latency for incomming I/O. What: /sys/fs/f2fs/<disk>/min_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait between issuing discard requests when there are discards to be issued and no I/O aware interruptions occur. What: /sys/fs/f2fs/<disk>/mid_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait between issuing discard requests when there are discards to be issued and an I/O aware interruption occurs. What: /sys/fs/f2fs/<disk>/max_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait when there are no discard operations to be issued. What: /sys/fs/f2fs/<disk>/discard_granularity Date: July 2017 Contact: "Chao Yu" <yuchao0@huawei.com> Description: Controls discard granularity of inner discard thread. Inner thread will not issue discards with size that is smaller than granularity. The unit size is one block(4KB), now only support configuring in range of [1, 512]. Default value is 4(=16KB). in range of [1, 512]. Default value is 16. For small devices, default value is 1. What: /sys/fs/f2fs/<disk>/umount_discard_timeout Date: January 2019 Loading @@ -102,6 +144,11 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Set timeout to issue discard commands during umount. Default: 5 secs What: /sys/fs/f2fs/<disk>/pending_discard Date: November 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows the number of pending discard commands in the queue. What: /sys/fs/f2fs/<disk>/max_victim_search Date: January 2014 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> Loading Loading @@ -192,7 +239,34 @@ Description: Shows total written kbytes issued to disk. What: /sys/fs/f2fs/<disk>/features Date: July 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows all enabled features in current device. Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/> Shows all enabled features in current device. Supported features: encryption, blkzoned, extra_attr, projquota, inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression, pin_file. What: /sys/fs/f2fs/<disk>/feature_list/ Date: June 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule. Supported on-disk features: encryption, block_zoned (aka blkzoned), extra_attr, project_quota (aka projquota), inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression. Note that, pin_file is moved into /sys/fs/f2fs/features/. What: /sys/fs/f2fs/features/ Date: July 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows all enabled kernel features. Supported features: encryption, block_zoned, extra_attr, project_quota, inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression, test_dummy_encryption_v2, atomic_write, pin_file, encrypted_casefold. What: /sys/fs/f2fs/<disk>/inject_rate Date: May 2016 Loading Loading @@ -227,9 +301,16 @@ Description: Shows current reserved blocks in system, it may be temporarily What: /sys/fs/f2fs/<disk>/gc_urgent Date: August 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Do background GC agressively when set. When gc_urgent = 1, background thread starts to do GC by given gc_urgent_sleep_time interval. It is set to 0 by default. Description: Do background GC aggressively when set. Set to 0 by default. gc urgent high(1): does GC forcibly in a period of given gc_urgent_sleep_time and ignores I/O idling check. uses greedy GC approach and turns SSR mode on. gc urgent low(2): lowers the bar of checking I/O idling in order to process outstanding discard commands and GC a little bit aggressively. uses cost benefit GC approach. gc urgent mid(3): does GC forcibly in a period of given gc_urgent_sleep_time and executes a mid level of I/O idling check. uses cost benefit GC approach. What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time Date: August 2017 Loading Loading @@ -263,7 +344,7 @@ Date April 2019 Contact: "Daniel Rosenberg" <drosen@google.com> Description: If checkpoint=disable, it displays the number of blocks that are unusable. If checkpoint=enable it displays the enumber of blocks that If checkpoint=enable it displays the number of blocks that would be unusable if checkpoint=disable were to be set. What: /sys/fs/f2fs/<disk>/encoding Loading Loading @@ -347,3 +428,219 @@ Date: April 2020 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Give a way to change iostat_period time. 3secs by default. The new iostat trace gives stats gap given the period. What: /sys/fs/f2fs/<disk>/max_io_bytes Date: December 2020 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: This gives a control to limit the bio size in f2fs. Default is zero, which will follow underlying block layer limit, whereas, if it has a certain bytes value, f2fs won't submit a bio larger than that size. What: /sys/fs/f2fs/<disk>/stat/sb_status Date: December 2020 Contact: "Chao Yu" <yuchao0@huawei.com> Description: Show status of f2fs superblock in real time. ====== ===================== ================================= value sb status macro description 0x1 SBI_IS_DIRTY dirty flag for checkpoint 0x2 SBI_IS_CLOSE specify unmounting 0x4 SBI_NEED_FSCK need fsck.f2fs to fix 0x8 SBI_POR_DOING recovery is doing or not 0x10 SBI_NEED_SB_WRITE need to recover superblock 0x20 SBI_NEED_CP need to checkpoint 0x40 SBI_IS_SHUTDOWN shutdown by ioctl 0x80 SBI_IS_RECOVERED recovered orphan/data 0x100 SBI_CP_DISABLED CP was disabled last mount 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted 0x2000 SBI_IS_RESIZEFS resizefs is in process 0x4000 SBI_IS_FREEZING freefs is in process ====== ===================== ================================= What: /sys/fs/f2fs/<disk>/stat/cp_status Date: September 2022 Contact: "Chao Yu" <chao.yu@oppo.com> Description: Show status of f2fs checkpoint in real time. =============================== ============================== cp flag value CP_UMOUNT_FLAG 0x00000001 CP_ORPHAN_PRESENT_FLAG 0x00000002 CP_COMPACT_SUM_FLAG 0x00000004 CP_ERROR_FLAG 0x00000008 CP_FSCK_FLAG 0x00000010 CP_FASTBOOT_FLAG 0x00000020 CP_CRC_RECOVERY_FLAG 0x00000040 CP_NAT_BITS_FLAG 0x00000080 CP_TRIMMED_FLAG 0x00000100 CP_NOCRC_RECOVERY_FLAG 0x00000200 CP_LARGE_NAT_BITMAP_FLAG 0x00000400 CP_QUOTA_NEED_FSCK_FLAG 0x00000800 CP_DISABLED_FLAG 0x00001000 CP_DISABLED_QUICK_FLAG 0x00002000 CP_RESIZEFS_FLAG 0x00004000 =============================== ============================== What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio Date: January 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and "be", and set the I/O priority within valid range of it. "," delimiter is necessary in between I/O class and priority number. What: /sys/fs/f2fs/<disk>/ovp_segments Date: March 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows the number of overprovision segments. What: /sys/fs/f2fs/<disk>/compr_written_block Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the block count written after compression since mount. Note that when the compressed blocks are deleted, this count doesn't decrease. If you write "0" here, you can initialize compr_written_block and compr_saved_block to "0". What: /sys/fs/f2fs/<disk>/compr_saved_block Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the saved block count with compression since mount. Note that when the compressed blocks are deleted, this count doesn't decrease. If you write "0" here, you can initialize compr_written_block and compr_saved_block to "0". What: /sys/fs/f2fs/<disk>/compr_new_inode Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the count of inode newly enabled for compression since mount. Note that when the compression is disabled for the files, this count doesn't decrease. If you write "0" here, you can initialize compr_new_inode to "0". What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls candidate ratio in order to limit total number of potential victim in all candidates, the value should be in range of [0, 100], by default it was initialized as 20(%). What: /sys/fs/f2fs/<disk>/atgc_candidate_count Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls candidate count in order to limit total number of potential victim in all candidates, by default it was initialized as 10 (sections). What: /sys/fs/f2fs/<disk>/atgc_age_weight Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls age weight to balance weight proportion in between aging and valid blocks, the value should be in range of [0, 100], by default it was initialized as 60(%). What: /sys/fs/f2fs/<disk>/atgc_age_threshold Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls age threshold to bypass GCing young candidates whose age is not beyond the threshold, by default it was initialized as 604800 seconds (equals to 7 days). What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments Date: July 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show how many segments have been reclaimed by GC during a specific GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid) You can re-initialize this value to "0". What: /sys/fs/f2fs/<disk>/gc_segment_mode Date: July 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: You can control for which gc mode the "gc_reclaimed_segments" node shows. Refer to the description of the modes in "gc_reclaimed_segments". What: /sys/fs/f2fs/<disk>/max_fragment_chunk Date: August 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: With "mode=fragment:block" mount options, we can scatter block allocation. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole in the length of 1..<max_fragment_hole> by turns. This value can be set between 1..512 and the default value is 4. What: /sys/fs/f2fs/<disk>/max_fragment_hole Date: August 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: With "mode=fragment:block" mount options, we can scatter block allocation. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole in the length of 1..<max_fragment_hole> by turns. This value can be set between 1..512 and the default value is 4. What: /sys/fs/f2fs/<disk>/gc_remaining_trials Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: You can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn back to GC normal mode. By default, the value is zero, which means there is no limit like before. What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks 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>/current_atomic_write Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the total current atomic write block count, which is not committed yet. This is a read-only entry. What: /sys/fs/f2fs/<disk>/peak_atomic_write Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the peak value of total current atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/committed_atomic_block Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the accumulated total committed atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/revoked_atomic_block Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the accumulated total revoked atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/gc_mode Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: Show the current gc_mode as a string. This is a read-only entry. What: /sys/fs/f2fs/<disk>/discard_urgent_util Date: November 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: When space utilization exceeds this, do background DISCARD aggressively. Does DISCARD forcibly in a period of given min_discard_issue_time when the number of discards is not 0 and set discard granularity to 1. Default: 80 What: /sys/fs/f2fs/<disk>/hot_data_age_threshold Date: November 2022 Contact: "Ping Xiong" <xiongping1@xiaomi.com> Description: When DATA SEPARATION is on, it controls the age threshold to indicate the data blocks as hot. By default it was initialized as 262144 blocks (equals to 1GB). What: /sys/fs/f2fs/<disk>/warm_data_age_threshold Date: November 2022 Contact: "Ping Xiong" <xiongping1@xiaomi.com> Description: When DATA SEPARATION is on, it controls the age threshold to indicate the data blocks as warm. By default it was initialized as 2621440 blocks (equals to 10GB). Loading
Documentation/ABI/testing/sysfs-fs-f2fs +310 −13 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ Contact: "Namjae Jeon" <namjae.jeon@samsung.com> Description: Controls the victim selection policy for garbage collection. Setting gc_idle = 0(default) will disable this option. Setting gc_idle = 1 will select the Cost Benefit approach & setting gc_idle = 2 will select the greedy approach. gc_idle = 2 will select the greedy approach & setting gc_idle = 3 will select the age-threshold based approach. What: /sys/fs/f2fs/<disk>/reclaim_segments Date: October 2013 Loading @@ -37,18 +38,25 @@ Description: This parameter controls the number of prefree segments to be What: /sys/fs/f2fs/<disk>/main_blkaddr Date: November 2019 Contact: "Ramon Pantin" <pantin@google.com> Description: Shows first block address of MAIN area. Description: Shows first block address of MAIN area. What: /sys/fs/f2fs/<disk>/ipu_policy Date: November 2013 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> Description: Controls the in-place-update policy. updates in f2fs. User can set: 0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR, 0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL, 0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC, 0x40: F2FS_IPU_NOCACHE. ==== ================= 0x01 F2FS_IPU_FORCE 0x02 F2FS_IPU_SSR 0x04 F2FS_IPU_UTIL 0x08 F2FS_IPU_SSR_UTIL 0x10 F2FS_IPU_FSYNC 0x20 F2FS_IPU_ASYNC 0x40 F2FS_IPU_NOCACHE 0x80 F2FS_IPU_HONOR_OPU_WRITE ==== ================= Refer segment.h for details. What: /sys/fs/f2fs/<disk>/min_ipu_util Loading Loading @@ -88,13 +96,47 @@ Description: Controls the issue rate of discard commands that consist of small checkpoint is triggered, and issued during the checkpoint. By default, it is disabled with 0. What: /sys/fs/f2fs/<disk>/max_ordered_discard Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: Controls the maximum ordered discard, the unit size is one block(4KB). Set it to 16 by default. What: /sys/fs/f2fs/<disk>/max_discard_request Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the number of discards a thread will issue at a time. Higher number will allow the discard thread to finish its work faster, at the cost of higher latency for incomming I/O. What: /sys/fs/f2fs/<disk>/min_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait between issuing discard requests when there are discards to be issued and no I/O aware interruptions occur. What: /sys/fs/f2fs/<disk>/mid_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait between issuing discard requests when there are discards to be issued and an I/O aware interruption occurs. What: /sys/fs/f2fs/<disk>/max_discard_issue_time Date: December 2021 Contact: "Konstantin Vyshetsky" <vkon@google.com> Description: Controls the interval the discard thread will wait when there are no discard operations to be issued. What: /sys/fs/f2fs/<disk>/discard_granularity Date: July 2017 Contact: "Chao Yu" <yuchao0@huawei.com> Description: Controls discard granularity of inner discard thread. Inner thread will not issue discards with size that is smaller than granularity. The unit size is one block(4KB), now only support configuring in range of [1, 512]. Default value is 4(=16KB). in range of [1, 512]. Default value is 16. For small devices, default value is 1. What: /sys/fs/f2fs/<disk>/umount_discard_timeout Date: January 2019 Loading @@ -102,6 +144,11 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Set timeout to issue discard commands during umount. Default: 5 secs What: /sys/fs/f2fs/<disk>/pending_discard Date: November 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows the number of pending discard commands in the queue. What: /sys/fs/f2fs/<disk>/max_victim_search Date: January 2014 Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> Loading Loading @@ -192,7 +239,34 @@ Description: Shows total written kbytes issued to disk. What: /sys/fs/f2fs/<disk>/features Date: July 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows all enabled features in current device. Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/> Shows all enabled features in current device. Supported features: encryption, blkzoned, extra_attr, projquota, inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression, pin_file. What: /sys/fs/f2fs/<disk>/feature_list/ Date: June 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule. Supported on-disk features: encryption, block_zoned (aka blkzoned), extra_attr, project_quota (aka projquota), inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression. Note that, pin_file is moved into /sys/fs/f2fs/features/. What: /sys/fs/f2fs/features/ Date: July 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows all enabled kernel features. Supported features: encryption, block_zoned, extra_attr, project_quota, inode_checksum, flexible_inline_xattr, quota_ino, inode_crtime, lost_found, verity, sb_checksum, casefold, readonly, compression, test_dummy_encryption_v2, atomic_write, pin_file, encrypted_casefold. What: /sys/fs/f2fs/<disk>/inject_rate Date: May 2016 Loading Loading @@ -227,9 +301,16 @@ Description: Shows current reserved blocks in system, it may be temporarily What: /sys/fs/f2fs/<disk>/gc_urgent Date: August 2017 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Do background GC agressively when set. When gc_urgent = 1, background thread starts to do GC by given gc_urgent_sleep_time interval. It is set to 0 by default. Description: Do background GC aggressively when set. Set to 0 by default. gc urgent high(1): does GC forcibly in a period of given gc_urgent_sleep_time and ignores I/O idling check. uses greedy GC approach and turns SSR mode on. gc urgent low(2): lowers the bar of checking I/O idling in order to process outstanding discard commands and GC a little bit aggressively. uses cost benefit GC approach. gc urgent mid(3): does GC forcibly in a period of given gc_urgent_sleep_time and executes a mid level of I/O idling check. uses cost benefit GC approach. What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time Date: August 2017 Loading Loading @@ -263,7 +344,7 @@ Date April 2019 Contact: "Daniel Rosenberg" <drosen@google.com> Description: If checkpoint=disable, it displays the number of blocks that are unusable. If checkpoint=enable it displays the enumber of blocks that If checkpoint=enable it displays the number of blocks that would be unusable if checkpoint=disable were to be set. What: /sys/fs/f2fs/<disk>/encoding Loading Loading @@ -347,3 +428,219 @@ Date: April 2020 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Give a way to change iostat_period time. 3secs by default. The new iostat trace gives stats gap given the period. What: /sys/fs/f2fs/<disk>/max_io_bytes Date: December 2020 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: This gives a control to limit the bio size in f2fs. Default is zero, which will follow underlying block layer limit, whereas, if it has a certain bytes value, f2fs won't submit a bio larger than that size. What: /sys/fs/f2fs/<disk>/stat/sb_status Date: December 2020 Contact: "Chao Yu" <yuchao0@huawei.com> Description: Show status of f2fs superblock in real time. ====== ===================== ================================= value sb status macro description 0x1 SBI_IS_DIRTY dirty flag for checkpoint 0x2 SBI_IS_CLOSE specify unmounting 0x4 SBI_NEED_FSCK need fsck.f2fs to fix 0x8 SBI_POR_DOING recovery is doing or not 0x10 SBI_NEED_SB_WRITE need to recover superblock 0x20 SBI_NEED_CP need to checkpoint 0x40 SBI_IS_SHUTDOWN shutdown by ioctl 0x80 SBI_IS_RECOVERED recovered orphan/data 0x100 SBI_CP_DISABLED CP was disabled last mount 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted 0x2000 SBI_IS_RESIZEFS resizefs is in process 0x4000 SBI_IS_FREEZING freefs is in process ====== ===================== ================================= What: /sys/fs/f2fs/<disk>/stat/cp_status Date: September 2022 Contact: "Chao Yu" <chao.yu@oppo.com> Description: Show status of f2fs checkpoint in real time. =============================== ============================== cp flag value CP_UMOUNT_FLAG 0x00000001 CP_ORPHAN_PRESENT_FLAG 0x00000002 CP_COMPACT_SUM_FLAG 0x00000004 CP_ERROR_FLAG 0x00000008 CP_FSCK_FLAG 0x00000010 CP_FASTBOOT_FLAG 0x00000020 CP_CRC_RECOVERY_FLAG 0x00000040 CP_NAT_BITS_FLAG 0x00000080 CP_TRIMMED_FLAG 0x00000100 CP_NOCRC_RECOVERY_FLAG 0x00000200 CP_LARGE_NAT_BITMAP_FLAG 0x00000400 CP_QUOTA_NEED_FSCK_FLAG 0x00000800 CP_DISABLED_FLAG 0x00001000 CP_DISABLED_QUICK_FLAG 0x00002000 CP_RESIZEFS_FLAG 0x00004000 =============================== ============================== What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio Date: January 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and "be", and set the I/O priority within valid range of it. "," delimiter is necessary in between I/O class and priority number. What: /sys/fs/f2fs/<disk>/ovp_segments Date: March 2021 Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> Description: Shows the number of overprovision segments. What: /sys/fs/f2fs/<disk>/compr_written_block Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the block count written after compression since mount. Note that when the compressed blocks are deleted, this count doesn't decrease. If you write "0" here, you can initialize compr_written_block and compr_saved_block to "0". What: /sys/fs/f2fs/<disk>/compr_saved_block Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the saved block count with compression since mount. Note that when the compressed blocks are deleted, this count doesn't decrease. If you write "0" here, you can initialize compr_written_block and compr_saved_block to "0". What: /sys/fs/f2fs/<disk>/compr_new_inode Date: March 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the count of inode newly enabled for compression since mount. Note that when the compression is disabled for the files, this count doesn't decrease. If you write "0" here, you can initialize compr_new_inode to "0". What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls candidate ratio in order to limit total number of potential victim in all candidates, the value should be in range of [0, 100], by default it was initialized as 20(%). What: /sys/fs/f2fs/<disk>/atgc_candidate_count Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls candidate count in order to limit total number of potential victim in all candidates, by default it was initialized as 10 (sections). What: /sys/fs/f2fs/<disk>/atgc_age_weight Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls age weight to balance weight proportion in between aging and valid blocks, the value should be in range of [0, 100], by default it was initialized as 60(%). What: /sys/fs/f2fs/<disk>/atgc_age_threshold Date: May 2021 Contact: "Chao Yu" <yuchao0@huawei.com> Description: When ATGC is on, it controls age threshold to bypass GCing young candidates whose age is not beyond the threshold, by default it was initialized as 604800 seconds (equals to 7 days). What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments Date: July 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show how many segments have been reclaimed by GC during a specific GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid) You can re-initialize this value to "0". What: /sys/fs/f2fs/<disk>/gc_segment_mode Date: July 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: You can control for which gc mode the "gc_reclaimed_segments" node shows. Refer to the description of the modes in "gc_reclaimed_segments". What: /sys/fs/f2fs/<disk>/max_fragment_chunk Date: August 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: With "mode=fragment:block" mount options, we can scatter block allocation. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole in the length of 1..<max_fragment_hole> by turns. This value can be set between 1..512 and the default value is 4. What: /sys/fs/f2fs/<disk>/max_fragment_hole Date: August 2021 Contact: "Daeho Jeong" <daehojeong@google.com> Description: With "mode=fragment:block" mount options, we can scatter block allocation. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole in the length of 1..<max_fragment_hole> by turns. This value can be set between 1..512 and the default value is 4. What: /sys/fs/f2fs/<disk>/gc_remaining_trials Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: You can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn back to GC normal mode. By default, the value is zero, which means there is no limit like before. What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks 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>/current_atomic_write Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the total current atomic write block count, which is not committed yet. This is a read-only entry. What: /sys/fs/f2fs/<disk>/peak_atomic_write Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the peak value of total current atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/committed_atomic_block Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the accumulated total committed atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/revoked_atomic_block Date: July 2022 Contact: "Daeho Jeong" <daehojeong@google.com> Description: Show the accumulated total revoked atomic write block count after boot. If you write "0" here, you can initialize to "0". What: /sys/fs/f2fs/<disk>/gc_mode Date: October 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: Show the current gc_mode as a string. This is a read-only entry. What: /sys/fs/f2fs/<disk>/discard_urgent_util Date: November 2022 Contact: "Yangtao Li" <frank.li@vivo.com> Description: When space utilization exceeds this, do background DISCARD aggressively. Does DISCARD forcibly in a period of given min_discard_issue_time when the number of discards is not 0 and set discard granularity to 1. Default: 80 What: /sys/fs/f2fs/<disk>/hot_data_age_threshold Date: November 2022 Contact: "Ping Xiong" <xiongping1@xiaomi.com> Description: When DATA SEPARATION is on, it controls the age threshold to indicate the data blocks as hot. By default it was initialized as 262144 blocks (equals to 1GB). What: /sys/fs/f2fs/<disk>/warm_data_age_threshold Date: November 2022 Contact: "Ping Xiong" <xiongping1@xiaomi.com> Description: When DATA SEPARATION is on, it controls the age threshold to indicate the data blocks as warm. By default it was initialized as 2621440 blocks (equals to 10GB).