sysfs-fs-f2fs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
  2. Date: July 2013
  3. Contact: "Namjae Jeon" <[email protected]>
  4. Description: Controls the maximum sleep time for gc_thread. Time
  5. is in milliseconds.
  6. What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
  7. Date: July 2013
  8. Contact: "Namjae Jeon" <[email protected]>
  9. Description: Controls the minimum sleep time for gc_thread. Time
  10. is in milliseconds.
  11. What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
  12. Date: July 2013
  13. Contact: "Namjae Jeon" <[email protected]>
  14. Description: Controls the default sleep time for gc_thread. Time
  15. is in milliseconds.
  16. What: /sys/fs/f2fs/<disk>/gc_idle
  17. Date: July 2013
  18. Contact: "Namjae Jeon" <[email protected]>
  19. Description: Controls the victim selection policy for garbage collection.
  20. Setting gc_idle = 0(default) will disable this option. Setting:
  21. =========== ===============================================
  22. gc_idle = 1 will select the Cost Benefit approach & setting
  23. gc_idle = 2 will select the greedy approach & setting
  24. gc_idle = 3 will select the age-threshold based approach.
  25. =========== ===============================================
  26. What: /sys/fs/f2fs/<disk>/reclaim_segments
  27. Date: October 2013
  28. Contact: "Jaegeuk Kim" <[email protected]>
  29. Description: This parameter controls the number of prefree segments to be
  30. reclaimed. If the number of prefree segments is larger than
  31. the number of segments in the proportion to the percentage
  32. over total volume size, f2fs tries to conduct checkpoint to
  33. reclaim the prefree segments to free segments.
  34. By default, 5% over total # of segments.
  35. What: /sys/fs/f2fs/<disk>/main_blkaddr
  36. Date: November 2019
  37. Contact: "Ramon Pantin" <[email protected]>
  38. Description: Shows first block address of MAIN area.
  39. What: /sys/fs/f2fs/<disk>/ipu_policy
  40. Date: November 2013
  41. Contact: "Jaegeuk Kim" <[email protected]>
  42. Description: Controls the in-place-update policy.
  43. updates in f2fs. User can set:
  44. ===== =============== ===================================================
  45. value policy description
  46. 0x00 DISABLE disable IPU(=default option in LFS mode)
  47. 0x01 FORCE all the time
  48. 0x02 SSR if SSR mode is activated
  49. 0x04 UTIL if FS utilization is over threashold
  50. 0x08 SSR_UTIL if SSR mode is activated and FS utilization is over
  51. threashold
  52. 0x10 FSYNC activated in fsync path only for high performance
  53. flash storages. IPU will be triggered only if the
  54. # of dirty pages over min_fsync_blocks.
  55. (=default option)
  56. 0x20 ASYNC do IPU given by asynchronous write requests
  57. 0x40 NOCACHE disable IPU bio cache
  58. 0x80 HONOR_OPU_WRITE use OPU write prior to IPU write if inode has
  59. FI_OPU_WRITE flag
  60. ===== =============== ===================================================
  61. Refer segment.h for details.
  62. What: /sys/fs/f2fs/<disk>/min_ipu_util
  63. Date: November 2013
  64. Contact: "Jaegeuk Kim" <[email protected]>
  65. Description: Controls the FS utilization condition for the in-place-update
  66. policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
  67. What: /sys/fs/f2fs/<disk>/min_fsync_blocks
  68. Date: September 2014
  69. Contact: "Jaegeuk Kim" <[email protected]>
  70. Description: Controls the dirty page count condition for the in-place-update
  71. policies.
  72. What: /sys/fs/f2fs/<disk>/min_seq_blocks
  73. Date: August 2018
  74. Contact: "Jaegeuk Kim" <[email protected]>
  75. Description: Controls the dirty page count condition for batched sequential
  76. writes in writepages.
  77. What: /sys/fs/f2fs/<disk>/min_hot_blocks
  78. Date: March 2017
  79. Contact: "Jaegeuk Kim" <[email protected]>
  80. Description: Controls the dirty page count condition for redefining hot data.
  81. What: /sys/fs/f2fs/<disk>/min_ssr_sections
  82. Date: October 2017
  83. Contact: "Chao Yu" <[email protected]>
  84. Description: Controls the free section threshold to trigger SSR allocation.
  85. If this is large, SSR mode will be enabled early.
  86. What: /sys/fs/f2fs/<disk>/max_small_discards
  87. Date: November 2013
  88. Contact: "Jaegeuk Kim" <[email protected]>
  89. Description: Controls the issue rate of discard commands that consist of small
  90. blocks less than 2MB. The candidates to be discarded are cached until
  91. checkpoint is triggered, and issued during the checkpoint.
  92. By default, it is disabled with 0.
  93. What: /sys/fs/f2fs/<disk>/max_ordered_discard
  94. Date: October 2022
  95. Contact: "Yangtao Li" <[email protected]>
  96. Description: Controls the maximum ordered discard, the unit size is one block(4KB).
  97. Set it to 16 by default.
  98. What: /sys/fs/f2fs/<disk>/max_discard_request
  99. Date: December 2021
  100. Contact: "Konstantin Vyshetsky" <[email protected]>
  101. Description: Controls the number of discards a thread will issue at a time.
  102. Higher number will allow the discard thread to finish its work
  103. faster, at the cost of higher latency for incomming I/O.
  104. What: /sys/fs/f2fs/<disk>/min_discard_issue_time
  105. Date: December 2021
  106. Contact: "Konstantin Vyshetsky" <[email protected]>
  107. Description: Controls the interval the discard thread will wait between
  108. issuing discard requests when there are discards to be issued and
  109. no I/O aware interruptions occur.
  110. What: /sys/fs/f2fs/<disk>/mid_discard_issue_time
  111. Date: December 2021
  112. Contact: "Konstantin Vyshetsky" <[email protected]>
  113. Description: Controls the interval the discard thread will wait between
  114. issuing discard requests when there are discards to be issued and
  115. an I/O aware interruption occurs.
  116. What: /sys/fs/f2fs/<disk>/max_discard_issue_time
  117. Date: December 2021
  118. Contact: "Konstantin Vyshetsky" <[email protected]>
  119. Description: Controls the interval the discard thread will wait when there are
  120. no discard operations to be issued.
  121. What: /sys/fs/f2fs/<disk>/discard_granularity
  122. Date: July 2017
  123. Contact: "Chao Yu" <[email protected]>
  124. Description: Controls discard granularity of inner discard thread. Inner thread
  125. will not issue discards with size that is smaller than granularity.
  126. The unit size is one block(4KB), now only support configuring
  127. in range of [1, 512]. Default value is 16.
  128. For small devices, default value is 1.
  129. What: /sys/fs/f2fs/<disk>/umount_discard_timeout
  130. Date: January 2019
  131. Contact: "Jaegeuk Kim" <[email protected]>
  132. Description: Set timeout to issue discard commands during umount.
  133. Default: 5 secs
  134. What: /sys/fs/f2fs/<disk>/pending_discard
  135. Date: November 2021
  136. Contact: "Jaegeuk Kim" <[email protected]>
  137. Description: Shows the number of pending discard commands in the queue.
  138. What: /sys/fs/f2fs/<disk>/max_victim_search
  139. Date: January 2014
  140. Contact: "Jaegeuk Kim" <[email protected]>
  141. Description: Controls the number of trials to find a victim segment
  142. when conducting SSR and cleaning operations. The default value
  143. is 4096 which covers 8GB block address range.
  144. What: /sys/fs/f2fs/<disk>/migration_granularity
  145. Date: October 2018
  146. Contact: "Chao Yu" <[email protected]>
  147. Description: Controls migration granularity of garbage collection on large
  148. section, it can let GC move partial segment{s} of one section
  149. in one GC cycle, so that dispersing heavy overhead GC to
  150. multiple lightweight one.
  151. What: /sys/fs/f2fs/<disk>/dir_level
  152. Date: March 2014
  153. Contact: "Jaegeuk Kim" <[email protected]>
  154. Description: Controls the directory level for large directory. If a
  155. directory has a number of files, it can reduce the file lookup
  156. latency by increasing this dir_level value. Otherwise, it
  157. needs to decrease this value to reduce the space overhead.
  158. The default value is 0.
  159. What: /sys/fs/f2fs/<disk>/ram_thresh
  160. Date: March 2014
  161. Contact: "Jaegeuk Kim" <[email protected]>
  162. Description: Controls the memory footprint used by free nids and cached
  163. nat entries. By default, 1 is set, which indicates
  164. 10 MB / 1 GB RAM.
  165. What: /sys/fs/f2fs/<disk>/cp_interval
  166. Date: October 2015
  167. Contact: "Jaegeuk Kim" <[email protected]>
  168. Description: Controls the checkpoint timing, set to 60 seconds by default.
  169. What: /sys/fs/f2fs/<disk>/idle_interval
  170. Date: January 2016
  171. Contact: "Jaegeuk Kim" <[email protected]>
  172. Description: Controls the idle timing of system, if there is no FS operation
  173. during given interval.
  174. Set to 5 seconds by default.
  175. What: /sys/fs/f2fs/<disk>/discard_idle_interval
  176. Date: September 2018
  177. Contact: "Chao Yu" <[email protected]>
  178. Contact: "Sahitya Tummala" <[email protected]>
  179. Description: Controls the idle timing of discard thread given
  180. this time interval.
  181. Default is 5 secs.
  182. What: /sys/fs/f2fs/<disk>/gc_idle_interval
  183. Date: September 2018
  184. Contact: "Chao Yu" <[email protected]>
  185. Contact: "Sahitya Tummala" <[email protected]>
  186. Description: Controls the idle timing for gc path. Set to 5 seconds by default.
  187. What: /sys/fs/f2fs/<disk>/iostat_enable
  188. Date: August 2017
  189. Contact: "Chao Yu" <[email protected]>
  190. Description: Controls to enable/disable IO stat.
  191. What: /sys/fs/f2fs/<disk>/ra_nid_pages
  192. Date: October 2015
  193. Contact: "Chao Yu" <[email protected]>
  194. Description: Controls the count of nid pages to be readaheaded.
  195. When building free nids, F2FS reads NAT blocks ahead for
  196. speed up. Default is 0.
  197. What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
  198. Date: January 2016
  199. Contact: "Chao Yu" <[email protected]>
  200. Description: Controls dirty nat entries ratio threshold, if current
  201. ratio exceeds configured threshold, checkpoint will
  202. be triggered for flushing dirty nat entries.
  203. What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
  204. Date: January 2016
  205. Contact: "Shuoran Liu" <[email protected]>
  206. Description: Shows total written kbytes issued to disk.
  207. What: /sys/fs/f2fs/<disk>/features
  208. Date: July 2017
  209. Contact: "Jaegeuk Kim" <[email protected]>
  210. Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/>
  211. Shows all enabled features in current device.
  212. Supported features:
  213. encryption, blkzoned, extra_attr, projquota, inode_checksum,
  214. flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
  215. verity, sb_checksum, casefold, readonly, compression, pin_file.
  216. What: /sys/fs/f2fs/<disk>/feature_list/
  217. Date: June 2021
  218. Contact: "Jaegeuk Kim" <[email protected]>
  219. Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule.
  220. Supported on-disk features:
  221. encryption, block_zoned (aka blkzoned), extra_attr,
  222. project_quota (aka projquota), inode_checksum,
  223. flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
  224. verity, sb_checksum, casefold, readonly, compression.
  225. Note that, pin_file is moved into /sys/fs/f2fs/features/.
  226. What: /sys/fs/f2fs/features/
  227. Date: July 2017
  228. Contact: "Jaegeuk Kim" <[email protected]>
  229. Description: Shows all enabled kernel features.
  230. Supported features:
  231. encryption, block_zoned, extra_attr, project_quota,
  232. inode_checksum, flexible_inline_xattr, quota_ino,
  233. inode_crtime, lost_found, verity, sb_checksum,
  234. casefold, readonly, compression, test_dummy_encryption_v2,
  235. atomic_write, pin_file, encrypted_casefold.
  236. What: /sys/fs/f2fs/<disk>/inject_rate
  237. Date: May 2016
  238. Contact: "Sheng Yong" <[email protected]>
  239. Description: Controls the injection rate of arbitrary faults.
  240. What: /sys/fs/f2fs/<disk>/inject_type
  241. Date: May 2016
  242. Contact: "Sheng Yong" <[email protected]>
  243. Description: Controls the injection type of arbitrary faults.
  244. What: /sys/fs/f2fs/<disk>/dirty_segments
  245. Date: October 2017
  246. Contact: "Jaegeuk Kim" <[email protected]>
  247. Description: Shows the number of dirty segments.
  248. What: /sys/fs/f2fs/<disk>/reserved_blocks
  249. Date: June 2017
  250. Contact: "Chao Yu" <[email protected]>
  251. Description: Controls target reserved blocks in system, the threshold
  252. is soft, it could exceed current available user space.
  253. What: /sys/fs/f2fs/<disk>/current_reserved_blocks
  254. Date: October 2017
  255. Contact: "Yunlong Song" <[email protected]>
  256. Contact: "Chao Yu" <[email protected]>
  257. Description: Shows current reserved blocks in system, it may be temporarily
  258. smaller than target_reserved_blocks, but will gradually
  259. increase to target_reserved_blocks when more free blocks are
  260. freed by user later.
  261. What: /sys/fs/f2fs/<disk>/gc_urgent
  262. Date: August 2017
  263. Contact: "Jaegeuk Kim" <[email protected]>
  264. Description: Do background GC aggressively when set. Set to 0 by default.
  265. gc urgent high(1): does GC forcibly in a period of given
  266. gc_urgent_sleep_time and ignores I/O idling check. uses greedy
  267. GC approach and turns SSR mode on.
  268. gc urgent low(2): lowers the bar of checking I/O idling in
  269. order to process outstanding discard commands and GC a
  270. little bit aggressively. uses cost benefit GC approach.
  271. gc urgent mid(3): does GC forcibly in a period of given
  272. gc_urgent_sleep_time and executes a mid level of I/O idling check.
  273. uses cost benefit GC approach.
  274. What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
  275. Date: August 2017
  276. Contact: "Jaegeuk Kim" <[email protected]>
  277. Description: Controls sleep time of GC urgent mode. Set to 500ms by default.
  278. What: /sys/fs/f2fs/<disk>/readdir_ra
  279. Date: November 2017
  280. Contact: "Sheng Yong" <[email protected]>
  281. Description: Controls readahead inode block in readdir. Enabled by default.
  282. What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh
  283. Date: January 2018
  284. Contact: Jaegeuk Kim <[email protected]>
  285. Description: This indicates how many GC can be failed for the pinned
  286. file. If it exceeds this, F2FS doesn't guarantee its pinning
  287. state. 2048 trials is set by default.
  288. What: /sys/fs/f2fs/<disk>/extension_list
  289. Date: Feburary 2018
  290. Contact: "Chao Yu" <[email protected]>
  291. Description: Used to control configure extension list:
  292. - Query: cat /sys/fs/f2fs/<disk>/extension_list
  293. - Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
  294. - Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
  295. - [h] means add/del hot file extension
  296. - [c] means add/del cold file extension
  297. What: /sys/fs/f2fs/<disk>/unusable
  298. Date April 2019
  299. Contact: "Daniel Rosenberg" <[email protected]>
  300. Description: If checkpoint=disable, it displays the number of blocks that
  301. are unusable.
  302. If checkpoint=enable it displays the number of blocks that
  303. would be unusable if checkpoint=disable were to be set.
  304. What: /sys/fs/f2fs/<disk>/encoding
  305. Date July 2019
  306. Contact: "Daniel Rosenberg" <[email protected]>
  307. Description: Displays name and version of the encoding set for the filesystem.
  308. If no encoding is set, displays (none)
  309. What: /sys/fs/f2fs/<disk>/free_segments
  310. Date: September 2019
  311. Contact: "Hridya Valsaraju" <[email protected]>
  312. Description: Number of free segments in disk.
  313. What: /sys/fs/f2fs/<disk>/cp_foreground_calls
  314. Date: September 2019
  315. Contact: "Hridya Valsaraju" <[email protected]>
  316. Description: Number of checkpoint operations performed on demand. Available when
  317. CONFIG_F2FS_STAT_FS=y.
  318. What: /sys/fs/f2fs/<disk>/cp_background_calls
  319. Date: September 2019
  320. Contact: "Hridya Valsaraju" <[email protected]>
  321. Description: Number of checkpoint operations performed in the background to
  322. free segments. Available when CONFIG_F2FS_STAT_FS=y.
  323. What: /sys/fs/f2fs/<disk>/gc_foreground_calls
  324. Date: September 2019
  325. Contact: "Hridya Valsaraju" <[email protected]>
  326. Description: Number of garbage collection operations performed on demand.
  327. Available when CONFIG_F2FS_STAT_FS=y.
  328. What: /sys/fs/f2fs/<disk>/gc_background_calls
  329. Date: September 2019
  330. Contact: "Hridya Valsaraju" <[email protected]>
  331. Description: Number of garbage collection operations triggered in background.
  332. Available when CONFIG_F2FS_STAT_FS=y.
  333. What: /sys/fs/f2fs/<disk>/moved_blocks_foreground
  334. Date: September 2019
  335. Contact: "Hridya Valsaraju" <[email protected]>
  336. Description: Number of blocks moved by garbage collection in foreground.
  337. Available when CONFIG_F2FS_STAT_FS=y.
  338. What: /sys/fs/f2fs/<disk>/moved_blocks_background
  339. Date: September 2019
  340. Contact: "Hridya Valsaraju" <[email protected]>
  341. Description: Number of blocks moved by garbage collection in background.
  342. Available when CONFIG_F2FS_STAT_FS=y.
  343. What: /sys/fs/f2fs/<disk>/avg_vblocks
  344. Date: September 2019
  345. Contact: "Hridya Valsaraju" <[email protected]>
  346. Description: Average number of valid blocks.
  347. Available when CONFIG_F2FS_STAT_FS=y.
  348. What: /sys/fs/f2fs/<disk>/mounted_time_sec
  349. Date: February 2020
  350. Contact: "Jaegeuk Kim" <[email protected]>
  351. Description: Show the mounted time in secs of this partition.
  352. What: /sys/fs/f2fs/<disk>/data_io_flag
  353. Date: April 2020
  354. Contact: "Jaegeuk Kim" <[email protected]>
  355. Description: Give a way to attach REQ_META|FUA to data writes
  356. given temperature-based bits. Now the bits indicate:
  357. +-------------------+-------------------+
  358. | REQ_META | REQ_FUA |
  359. +------+------+-----+------+------+-----+
  360. | 5 | 4 | 3 | 2 | 1 | 0 |
  361. +------+------+-----+------+------+-----+
  362. | Cold | Warm | Hot | Cold | Warm | Hot |
  363. +------+------+-----+------+------+-----+
  364. What: /sys/fs/f2fs/<disk>/node_io_flag
  365. Date: June 2020
  366. Contact: "Jaegeuk Kim" <[email protected]>
  367. Description: Give a way to attach REQ_META|FUA to node writes
  368. given temperature-based bits. Now the bits indicate:
  369. +-------------------+-------------------+
  370. | REQ_META | REQ_FUA |
  371. +------+------+-----+------+------+-----+
  372. | 5 | 4 | 3 | 2 | 1 | 0 |
  373. +------+------+-----+------+------+-----+
  374. | Cold | Warm | Hot | Cold | Warm | Hot |
  375. +------+------+-----+------+------+-----+
  376. What: /sys/fs/f2fs/<disk>/iostat_period_ms
  377. Date: April 2020
  378. Contact: "Daeho Jeong" <[email protected]>
  379. Description: Give a way to change iostat_period time. 3secs by default.
  380. The new iostat trace gives stats gap given the period.
  381. What: /sys/fs/f2fs/<disk>/max_io_bytes
  382. Date: December 2020
  383. Contact: "Jaegeuk Kim" <[email protected]>
  384. Description: This gives a control to limit the bio size in f2fs.
  385. Default is zero, which will follow underlying block layer limit,
  386. whereas, if it has a certain bytes value, f2fs won't submit a
  387. bio larger than that size.
  388. What: /sys/fs/f2fs/<disk>/stat/sb_status
  389. Date: December 2020
  390. Contact: "Chao Yu" <[email protected]>
  391. Description: Show status of f2fs superblock in real time.
  392. ====== ===================== =================================
  393. value sb status macro description
  394. 0x1 SBI_IS_DIRTY dirty flag for checkpoint
  395. 0x2 SBI_IS_CLOSE specify unmounting
  396. 0x4 SBI_NEED_FSCK need fsck.f2fs to fix
  397. 0x8 SBI_POR_DOING recovery is doing or not
  398. 0x10 SBI_NEED_SB_WRITE need to recover superblock
  399. 0x20 SBI_NEED_CP need to checkpoint
  400. 0x40 SBI_IS_SHUTDOWN shutdown by ioctl
  401. 0x80 SBI_IS_RECOVERED recovered orphan/data
  402. 0x100 SBI_CP_DISABLED CP was disabled last mount
  403. 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly
  404. 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP
  405. 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP
  406. 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
  407. 0x2000 SBI_IS_RESIZEFS resizefs is in process
  408. 0x4000 SBI_IS_FREEZING freefs is in process
  409. ====== ===================== =================================
  410. What: /sys/fs/f2fs/<disk>/stat/cp_status
  411. Date: September 2022
  412. Contact: "Chao Yu" <[email protected]>
  413. Description: Show status of f2fs checkpoint in real time.
  414. =============================== ==============================
  415. cp flag value
  416. CP_UMOUNT_FLAG 0x00000001
  417. CP_ORPHAN_PRESENT_FLAG 0x00000002
  418. CP_COMPACT_SUM_FLAG 0x00000004
  419. CP_ERROR_FLAG 0x00000008
  420. CP_FSCK_FLAG 0x00000010
  421. CP_FASTBOOT_FLAG 0x00000020
  422. CP_CRC_RECOVERY_FLAG 0x00000040
  423. CP_NAT_BITS_FLAG 0x00000080
  424. CP_TRIMMED_FLAG 0x00000100
  425. CP_NOCRC_RECOVERY_FLAG 0x00000200
  426. CP_LARGE_NAT_BITMAP_FLAG 0x00000400
  427. CP_QUOTA_NEED_FSCK_FLAG 0x00000800
  428. CP_DISABLED_FLAG 0x00001000
  429. CP_DISABLED_QUICK_FLAG 0x00002000
  430. CP_RESIZEFS_FLAG 0x00004000
  431. =============================== ==============================
  432. What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio
  433. Date: January 2021
  434. Contact: "Daeho Jeong" <[email protected]>
  435. Description: Give a way to change checkpoint merge daemon's io priority.
  436. Its default value is "be,3", which means "BE" I/O class and
  437. I/O priority "3". We can select the class between "rt" and "be",
  438. and set the I/O priority within valid range of it. "," delimiter
  439. is necessary in between I/O class and priority number.
  440. What: /sys/fs/f2fs/<disk>/ovp_segments
  441. Date: March 2021
  442. Contact: "Jaegeuk Kim" <[email protected]>
  443. Description: Shows the number of overprovision segments.
  444. What: /sys/fs/f2fs/<disk>/compr_written_block
  445. Date: March 2021
  446. Contact: "Daeho Jeong" <[email protected]>
  447. Description: Show the block count written after compression since mount. Note
  448. that when the compressed blocks are deleted, this count doesn't
  449. decrease. If you write "0" here, you can initialize
  450. compr_written_block and compr_saved_block to "0".
  451. What: /sys/fs/f2fs/<disk>/compr_saved_block
  452. Date: March 2021
  453. Contact: "Daeho Jeong" <[email protected]>
  454. Description: Show the saved block count with compression since mount. Note
  455. that when the compressed blocks are deleted, this count doesn't
  456. decrease. If you write "0" here, you can initialize
  457. compr_written_block and compr_saved_block to "0".
  458. What: /sys/fs/f2fs/<disk>/compr_new_inode
  459. Date: March 2021
  460. Contact: "Daeho Jeong" <[email protected]>
  461. Description: Show the count of inode newly enabled for compression since mount.
  462. Note that when the compression is disabled for the files, this count
  463. doesn't decrease. If you write "0" here, you can initialize
  464. compr_new_inode to "0".
  465. What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio
  466. Date: May 2021
  467. Contact: "Chao Yu" <[email protected]>
  468. Description: When ATGC is on, it controls candidate ratio in order to limit total
  469. number of potential victim in all candidates, the value should be in
  470. range of [0, 100], by default it was initialized as 20(%).
  471. What: /sys/fs/f2fs/<disk>/atgc_candidate_count
  472. Date: May 2021
  473. Contact: "Chao Yu" <[email protected]>
  474. Description: When ATGC is on, it controls candidate count in order to limit total
  475. number of potential victim in all candidates, by default it was
  476. initialized as 10 (sections).
  477. What: /sys/fs/f2fs/<disk>/atgc_age_weight
  478. Date: May 2021
  479. Contact: "Chao Yu" <[email protected]>
  480. Description: When ATGC is on, it controls age weight to balance weight proportion
  481. in between aging and valid blocks, the value should be in range of
  482. [0, 100], by default it was initialized as 60(%).
  483. What: /sys/fs/f2fs/<disk>/atgc_age_threshold
  484. Date: May 2021
  485. Contact: "Chao Yu" <[email protected]>
  486. Description: When ATGC is on, it controls age threshold to bypass GCing young
  487. candidates whose age is not beyond the threshold, by default it was
  488. initialized as 604800 seconds (equals to 7 days).
  489. What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments
  490. Date: July 2021
  491. Contact: "Daeho Jeong" <[email protected]>
  492. Description: Show how many segments have been reclaimed by GC during a specific
  493. GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy,
  494. 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid)
  495. You can re-initialize this value to "0".
  496. What: /sys/fs/f2fs/<disk>/gc_segment_mode
  497. Date: July 2021
  498. Contact: "Daeho Jeong" <[email protected]>
  499. Description: You can control for which gc mode the "gc_reclaimed_segments" node shows.
  500. Refer to the description of the modes in "gc_reclaimed_segments".
  501. What: /sys/fs/f2fs/<disk>/seq_file_ra_mul
  502. Date: July 2021
  503. Contact: "Daeho Jeong" <[email protected]>
  504. Description: You can control the multiplier value of bdi device readahead window size
  505. between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option.
  506. What: /sys/fs/f2fs/<disk>/max_fragment_chunk
  507. Date: August 2021
  508. Contact: "Daeho Jeong" <[email protected]>
  509. Description: With "mode=fragment:block" mount options, we can scatter block allocation.
  510. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
  511. in the length of 1..<max_fragment_hole> by turns. This value can be set
  512. between 1..512 and the default value is 4.
  513. What: /sys/fs/f2fs/<disk>/max_fragment_hole
  514. Date: August 2021
  515. Contact: "Daeho Jeong" <[email protected]>
  516. Description: With "mode=fragment:block" mount options, we can scatter block allocation.
  517. f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
  518. in the length of 1..<max_fragment_hole> by turns. This value can be set
  519. between 1..512 and the default value is 4.
  520. What: /sys/fs/f2fs/<disk>/gc_remaining_trials
  521. Date: October 2022
  522. Contact: "Yangtao Li" <[email protected]>
  523. Description: You can set the trial count limit for GC urgent and idle mode with this value.
  524. If GC thread gets to the limit, the mode will turn back to GC normal mode.
  525. By default, the value is zero, which means there is no limit like before.
  526. What: /sys/fs/f2fs/<disk>/max_roll_forward_node_blocks
  527. Date: January 2022
  528. Contact: "Jaegeuk Kim" <[email protected]>
  529. Description: Controls max # of node block writes to be used for roll forward
  530. recovery. This can limit the roll forward recovery time.
  531. What: /sys/fs/f2fs/<disk>/unusable_blocks_per_sec
  532. Date: June 2022
  533. Contact: "Jaegeuk Kim" <[email protected]>
  534. Description: Shows the number of unusable blocks in a section which was defined by
  535. the zone capacity reported by underlying zoned device.
  536. What: /sys/fs/f2fs/<disk>/current_atomic_write
  537. Date: July 2022
  538. Contact: "Daeho Jeong" <[email protected]>
  539. Description: Show the total current atomic write block count, which is not committed yet.
  540. This is a read-only entry.
  541. What: /sys/fs/f2fs/<disk>/peak_atomic_write
  542. Date: July 2022
  543. Contact: "Daeho Jeong" <[email protected]>
  544. Description: Show the peak value of total current atomic write block count after boot.
  545. If you write "0" here, you can initialize to "0".
  546. What: /sys/fs/f2fs/<disk>/committed_atomic_block
  547. Date: July 2022
  548. Contact: "Daeho Jeong" <[email protected]>
  549. Description: Show the accumulated total committed atomic write block count after boot.
  550. If you write "0" here, you can initialize to "0".
  551. What: /sys/fs/f2fs/<disk>/revoked_atomic_block
  552. Date: July 2022
  553. Contact: "Daeho Jeong" <[email protected]>
  554. Description: Show the accumulated total revoked atomic write block count after boot.
  555. If you write "0" here, you can initialize to "0".
  556. What: /sys/fs/f2fs/<disk>/gc_mode
  557. Date: October 2022
  558. Contact: "Yangtao Li" <[email protected]>
  559. Description: Show the current gc_mode as a string.
  560. This is a read-only entry.
  561. What: /sys/fs/f2fs/<disk>/discard_urgent_util
  562. Date: November 2022
  563. Contact: "Yangtao Li" <[email protected]>
  564. Description: When space utilization exceeds this, do background DISCARD aggressively.
  565. Does DISCARD forcibly in a period of given min_discard_issue_time when the number
  566. of discards is not 0 and set discard granularity to 1.
  567. Default: 80
  568. What: /sys/fs/f2fs/<disk>/hot_data_age_threshold
  569. Date: November 2022
  570. Contact: "Ping Xiong" <[email protected]>
  571. Description: When DATA SEPARATION is on, it controls the age threshold to indicate
  572. the data blocks as hot. By default it was initialized as 262144 blocks
  573. (equals to 1GB).
  574. What: /sys/fs/f2fs/<disk>/warm_data_age_threshold
  575. Date: November 2022
  576. Contact: "Ping Xiong" <[email protected]>
  577. Description: When DATA SEPARATION is on, it controls the age threshold to indicate
  578. the data blocks as warm. By default it was initialized as 2621440 blocks
  579. (equals to 10GB).
  580. What: /sys/fs/f2fs/<disk>/fault_rate
  581. Date: May 2016
  582. Contact: "Sheng Yong" <[email protected]>
  583. Contact: "Chao Yu" <[email protected]>
  584. Description: Enable fault injection in all supported types with
  585. specified injection rate.
  586. What: /sys/fs/f2fs/<disk>/fault_type
  587. Date: May 2016
  588. Contact: "Sheng Yong" <[email protected]>
  589. Contact: "Chao Yu" <[email protected]>
  590. Description: Support configuring fault injection type, should be
  591. enabled with fault_injection option, fault type value
  592. is shown below, it supports single or combined type.
  593. =========================== ===========
  594. Type_Name Type_Value
  595. =========================== ===========
  596. FAULT_KMALLOC 0x000000001
  597. FAULT_KVMALLOC 0x000000002
  598. FAULT_PAGE_ALLOC 0x000000004
  599. FAULT_PAGE_GET 0x000000008
  600. FAULT_ALLOC_BIO 0x000000010 (obsolete)
  601. FAULT_ALLOC_NID 0x000000020
  602. FAULT_ORPHAN 0x000000040
  603. FAULT_BLOCK 0x000000080
  604. FAULT_DIR_DEPTH 0x000000100
  605. FAULT_EVICT_INODE 0x000000200
  606. FAULT_TRUNCATE 0x000000400
  607. FAULT_READ_IO 0x000000800
  608. FAULT_CHECKPOINT 0x000001000
  609. FAULT_DISCARD 0x000002000
  610. FAULT_WRITE_IO 0x000004000
  611. FAULT_SLAB_ALLOC 0x000008000
  612. FAULT_DQUOT_INIT 0x000010000
  613. FAULT_LOCK_OP 0x000020000
  614. FAULT_BLKADDR_VALIDITY 0x000040000
  615. FAULT_BLKADDR_CONSISTENCE 0x000080000
  616. =========================== ===========
  617. What: /sys/fs/f2fs/<disk>/discard_io_aware_gran
  618. Date: January 2023
  619. Contact: "Yangtao Li" <[email protected]>
  620. Description: Controls background discard granularity of inner discard thread
  621. when is not in idle. Inner thread will not issue discards with size that
  622. is smaller than granularity. The unit size is one block(4KB), now only
  623. support configuring in range of [0, 512].
  624. Default: 512
  625. What: /sys/fs/f2fs/<disk>/last_age_weight
  626. Date: January 2023
  627. Contact: "Ping Xiong" <[email protected]>
  628. Description: When DATA SEPARATION is on, it controls the weight of last data block age.
  629. What: /sys/fs/f2fs/<disk>/compress_watermark
  630. Date: February 2023
  631. Contact: "Yangtao Li" <[email protected]>
  632. Description: When compress cache is on, it controls free memory watermark
  633. in order to limit caching compress page. If free memory is lower
  634. than watermark, then deny caching compress page. The value should be in
  635. range of (0, 100], by default it was initialized as 20(%).
  636. What: /sys/fs/f2fs/<disk>/compress_percent
  637. Date: February 2023
  638. Contact: "Yangtao Li" <[email protected]>
  639. Description: When compress cache is on, it controls cached page
  640. percent(compress pages / free_ram) in order to limit caching compress page.
  641. If cached page percent exceed threshold, then deny caching compress page.
  642. The value should be in range of (0, 100], by default it was initialized
  643. as 20(%).