.. | .. |
---|
20 | 20 | Date: July 2013 |
---|
21 | 21 | Contact: "Namjae Jeon" <namjae.jeon@samsung.com> |
---|
22 | 22 | Description: Controls the victim selection policy for garbage collection. |
---|
23 | | - Setting gc_idle = 0(default) will disable this option. Setting |
---|
24 | | - gc_idle = 1 will select the Cost Benefit approach & setting |
---|
25 | | - gc_idle = 2 will select the greedy approach. |
---|
| 23 | + Setting gc_idle = 0(default) will disable this option. Setting: |
---|
| 24 | + |
---|
| 25 | + =========== =============================================== |
---|
| 26 | + gc_idle = 1 will select the Cost Benefit approach & setting |
---|
| 27 | + gc_idle = 2 will select the greedy approach & setting |
---|
| 28 | + gc_idle = 3 will select the age-threshold based approach. |
---|
| 29 | + =========== =============================================== |
---|
26 | 30 | |
---|
27 | 31 | What: /sys/fs/f2fs/<disk>/reclaim_segments |
---|
28 | 32 | Date: October 2013 |
---|
.. | .. |
---|
45 | 49 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> |
---|
46 | 50 | Description: Controls the in-place-update policy. |
---|
47 | 51 | updates in f2fs. User can set: |
---|
48 | | - 0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR, |
---|
49 | | - 0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL, |
---|
50 | | - 0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC, |
---|
51 | | - 0x40: F2FS_IPU_NOCACHE. |
---|
| 52 | + |
---|
| 53 | + ==== ================= |
---|
| 54 | + 0x01 F2FS_IPU_FORCE |
---|
| 55 | + 0x02 F2FS_IPU_SSR |
---|
| 56 | + 0x04 F2FS_IPU_UTIL |
---|
| 57 | + 0x08 F2FS_IPU_SSR_UTIL |
---|
| 58 | + 0x10 F2FS_IPU_FSYNC |
---|
| 59 | + 0x20 F2FS_IPU_ASYNC |
---|
| 60 | + 0x40 F2FS_IPU_NOCACHE |
---|
| 61 | + 0x80 F2FS_IPU_HONOR_OPU_WRITE |
---|
| 62 | + ==== ================= |
---|
| 63 | + |
---|
52 | 64 | Refer segment.h for details. |
---|
53 | 65 | |
---|
54 | 66 | What: /sys/fs/f2fs/<disk>/min_ipu_util |
---|
.. | .. |
---|
101 | 113 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
102 | 114 | Description: Set timeout to issue discard commands during umount. |
---|
103 | 115 | Default: 5 secs |
---|
| 116 | + |
---|
| 117 | +What: /sys/fs/f2fs/<disk>/pending_discard |
---|
| 118 | +Date: November 2021 |
---|
| 119 | +Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
| 120 | +Description: Shows the number of pending discard commands in the queue. |
---|
104 | 121 | |
---|
105 | 122 | What: /sys/fs/f2fs/<disk>/max_victim_search |
---|
106 | 123 | Date: January 2014 |
---|
.. | .. |
---|
192 | 209 | What: /sys/fs/f2fs/<disk>/features |
---|
193 | 210 | Date: July 2017 |
---|
194 | 211 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
195 | | -Description: Shows all enabled features in current device. |
---|
| 212 | +Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/ |
---|
| 213 | + Shows all enabled features in current device. |
---|
| 214 | + Supported features: |
---|
| 215 | + encryption, blkzoned, extra_attr, projquota, inode_checksum, |
---|
| 216 | + flexible_inline_xattr, quota_ino, inode_crtime, lost_found, |
---|
| 217 | + verity, sb_checksum, casefold, readonly, compression, pin_file. |
---|
| 218 | + |
---|
| 219 | +What: /sys/fs/f2fs/<disk>/feature_list/ |
---|
| 220 | +Date: June 2021 |
---|
| 221 | +Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
| 222 | +Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule. |
---|
| 223 | + Supported on-disk features: |
---|
| 224 | + encryption, block_zoned (aka blkzoned), extra_attr, |
---|
| 225 | + project_quota (aka projquota), inode_checksum, |
---|
| 226 | + flexible_inline_xattr, quota_ino, inode_crtime, lost_found, |
---|
| 227 | + verity, sb_checksum, casefold, readonly, compression. |
---|
| 228 | + Note that, pin_file is moved into /sys/fs/f2fs/features/. |
---|
| 229 | + |
---|
| 230 | +What: /sys/fs/f2fs/features/ |
---|
| 231 | +Date: July 2017 |
---|
| 232 | +Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
| 233 | +Description: Shows all enabled kernel features. |
---|
| 234 | + Supported features: |
---|
| 235 | + encryption, block_zoned, extra_attr, project_quota, |
---|
| 236 | + inode_checksum, flexible_inline_xattr, quota_ino, |
---|
| 237 | + inode_crtime, lost_found, verity, sb_checksum, |
---|
| 238 | + casefold, readonly, compression, test_dummy_encryption_v2, |
---|
| 239 | + atomic_write, pin_file, encrypted_casefold. |
---|
196 | 240 | |
---|
197 | 241 | What: /sys/fs/f2fs/<disk>/inject_rate |
---|
198 | 242 | Date: May 2016 |
---|
.. | .. |
---|
227 | 271 | What: /sys/fs/f2fs/<disk>/gc_urgent |
---|
228 | 272 | Date: August 2017 |
---|
229 | 273 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
230 | | -Description: Do background GC agressively when set. When gc_urgent = 1, |
---|
231 | | - background thread starts to do GC by given gc_urgent_sleep_time |
---|
232 | | - interval. It is set to 0 by default. |
---|
| 274 | +Description: Do background GC aggressively when set. Set to 0 by default. |
---|
| 275 | + gc urgent high(1): does GC forcibly in a period of given |
---|
| 276 | + gc_urgent_sleep_time and ignores I/O idling check. uses greedy |
---|
| 277 | + GC approach and turns SSR mode on. |
---|
| 278 | + gc urgent low(2): lowers the bar of checking I/O idling in |
---|
| 279 | + order to process outstanding discard commands and GC a |
---|
| 280 | + little bit aggressively. uses cost benefit GC approach. |
---|
| 281 | + gc urgent mid(3): does GC forcibly in a period of given |
---|
| 282 | + gc_urgent_sleep_time and executes a mid level of I/O idling check. |
---|
| 283 | + uses cost benefit GC approach. |
---|
233 | 284 | |
---|
234 | 285 | What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time |
---|
235 | 286 | Date: August 2017 |
---|
.. | .. |
---|
263 | 314 | Contact: "Daniel Rosenberg" <drosen@google.com> |
---|
264 | 315 | Description: If checkpoint=disable, it displays the number of blocks that |
---|
265 | 316 | are unusable. |
---|
266 | | - If checkpoint=enable it displays the enumber of blocks that |
---|
| 317 | + If checkpoint=enable it displays the number of blocks that |
---|
267 | 318 | would be unusable if checkpoint=disable were to be set. |
---|
268 | 319 | |
---|
269 | 320 | What: /sys/fs/f2fs/<disk>/encoding |
---|
.. | .. |
---|
329 | 380 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
330 | 381 | Description: Give a way to attach REQ_META|FUA to data writes |
---|
331 | 382 | given temperature-based bits. Now the bits indicate: |
---|
332 | | - * REQ_META | REQ_FUA | |
---|
333 | | - * 5 | 4 | 3 | 2 | 1 | 0 | |
---|
334 | | - * Cold | Warm | Hot | Cold | Warm | Hot | |
---|
| 383 | + |
---|
| 384 | + +-------------------+-------------------+ |
---|
| 385 | + | REQ_META | REQ_FUA | |
---|
| 386 | + +------+------+-----+------+------+-----+ |
---|
| 387 | + | 5 | 4 | 3 | 2 | 1 | 0 | |
---|
| 388 | + +------+------+-----+------+------+-----+ |
---|
| 389 | + | Cold | Warm | Hot | Cold | Warm | Hot | |
---|
| 390 | + +------+------+-----+------+------+-----+ |
---|
335 | 391 | |
---|
336 | 392 | What: /sys/fs/f2fs/<disk>/node_io_flag |
---|
337 | 393 | Date: June 2020 |
---|
338 | 394 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
339 | 395 | Description: Give a way to attach REQ_META|FUA to node writes |
---|
340 | 396 | given temperature-based bits. Now the bits indicate: |
---|
341 | | - * REQ_META | REQ_FUA | |
---|
342 | | - * 5 | 4 | 3 | 2 | 1 | 0 | |
---|
343 | | - * Cold | Warm | Hot | Cold | Warm | Hot | |
---|
| 397 | + |
---|
| 398 | + +-------------------+-------------------+ |
---|
| 399 | + | REQ_META | REQ_FUA | |
---|
| 400 | + +------+------+-----+------+------+-----+ |
---|
| 401 | + | 5 | 4 | 3 | 2 | 1 | 0 | |
---|
| 402 | + +------+------+-----+------+------+-----+ |
---|
| 403 | + | Cold | Warm | Hot | Cold | Warm | Hot | |
---|
| 404 | + +------+------+-----+------+------+-----+ |
---|
344 | 405 | |
---|
345 | 406 | What: /sys/fs/f2fs/<disk>/iostat_period_ms |
---|
346 | 407 | Date: April 2020 |
---|
347 | 408 | Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
348 | 409 | Description: Give a way to change iostat_period time. 3secs by default. |
---|
349 | 410 | The new iostat trace gives stats gap given the period. |
---|
| 411 | +What: /sys/fs/f2fs/<disk>/max_io_bytes |
---|
| 412 | +Date: December 2020 |
---|
| 413 | +Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
| 414 | +Description: This gives a control to limit the bio size in f2fs. |
---|
| 415 | + Default is zero, which will follow underlying block layer limit, |
---|
| 416 | + whereas, if it has a certain bytes value, f2fs won't submit a |
---|
| 417 | + bio larger than that size. |
---|
| 418 | + |
---|
| 419 | +What: /sys/fs/f2fs/<disk>/stat/sb_status |
---|
| 420 | +Date: December 2020 |
---|
| 421 | +Contact: "Chao Yu" <yuchao0@huawei.com> |
---|
| 422 | +Description: Show status of f2fs superblock in real time. |
---|
| 423 | + |
---|
| 424 | + ====== ===================== ================================= |
---|
| 425 | + value sb status macro description |
---|
| 426 | + 0x1 SBI_IS_DIRTY dirty flag for checkpoint |
---|
| 427 | + 0x2 SBI_IS_CLOSE specify unmounting |
---|
| 428 | + 0x4 SBI_NEED_FSCK need fsck.f2fs to fix |
---|
| 429 | + 0x8 SBI_POR_DOING recovery is doing or not |
---|
| 430 | + 0x10 SBI_NEED_SB_WRITE need to recover superblock |
---|
| 431 | + 0x20 SBI_NEED_CP need to checkpoint |
---|
| 432 | + 0x40 SBI_IS_SHUTDOWN shutdown by ioctl |
---|
| 433 | + 0x80 SBI_IS_RECOVERED recovered orphan/data |
---|
| 434 | + 0x100 SBI_CP_DISABLED CP was disabled last mount |
---|
| 435 | + 0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly |
---|
| 436 | + 0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP |
---|
| 437 | + 0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP |
---|
| 438 | + 0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted |
---|
| 439 | + 0x2000 SBI_IS_RESIZEFS resizefs is in process |
---|
| 440 | + 0x4000 SBI_IS_FREEZING freefs is in process |
---|
| 441 | + ====== ===================== ================================= |
---|
| 442 | + |
---|
| 443 | +What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio |
---|
| 444 | +Date: January 2021 |
---|
| 445 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 446 | +Description: Give a way to change checkpoint merge daemon's io priority. |
---|
| 447 | + Its default value is "be,3", which means "BE" I/O class and |
---|
| 448 | + I/O priority "3". We can select the class between "rt" and "be", |
---|
| 449 | + and set the I/O priority within valid range of it. "," delimiter |
---|
| 450 | + is necessary in between I/O class and priority number. |
---|
| 451 | + |
---|
| 452 | +What: /sys/fs/f2fs/<disk>/ovp_segments |
---|
| 453 | +Date: March 2021 |
---|
| 454 | +Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
---|
| 455 | +Description: Shows the number of overprovision segments. |
---|
| 456 | + |
---|
| 457 | +What: /sys/fs/f2fs/<disk>/compr_written_block |
---|
| 458 | +Date: March 2021 |
---|
| 459 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 460 | +Description: Show the block count written after compression since mount. Note |
---|
| 461 | + that when the compressed blocks are deleted, this count doesn't |
---|
| 462 | + decrease. If you write "0" here, you can initialize |
---|
| 463 | + compr_written_block and compr_saved_block to "0". |
---|
| 464 | + |
---|
| 465 | +What: /sys/fs/f2fs/<disk>/compr_saved_block |
---|
| 466 | +Date: March 2021 |
---|
| 467 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 468 | +Description: Show the saved block count with compression since mount. Note |
---|
| 469 | + that when the compressed blocks are deleted, this count doesn't |
---|
| 470 | + decrease. If you write "0" here, you can initialize |
---|
| 471 | + compr_written_block and compr_saved_block to "0". |
---|
| 472 | + |
---|
| 473 | +What: /sys/fs/f2fs/<disk>/compr_new_inode |
---|
| 474 | +Date: March 2021 |
---|
| 475 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 476 | +Description: Show the count of inode newly enabled for compression since mount. |
---|
| 477 | + Note that when the compression is disabled for the files, this count |
---|
| 478 | + doesn't decrease. If you write "0" here, you can initialize |
---|
| 479 | + compr_new_inode to "0". |
---|
| 480 | + |
---|
| 481 | +What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio |
---|
| 482 | +Date: May 2021 |
---|
| 483 | +Contact: "Chao Yu" <yuchao0@huawei.com> |
---|
| 484 | +Description: When ATGC is on, it controls candidate ratio in order to limit total |
---|
| 485 | + number of potential victim in all candidates, the value should be in |
---|
| 486 | + range of [0, 100], by default it was initialized as 20(%). |
---|
| 487 | + |
---|
| 488 | +What: /sys/fs/f2fs/<disk>/atgc_candidate_count |
---|
| 489 | +Date: May 2021 |
---|
| 490 | +Contact: "Chao Yu" <yuchao0@huawei.com> |
---|
| 491 | +Description: When ATGC is on, it controls candidate count in order to limit total |
---|
| 492 | + number of potential victim in all candidates, by default it was |
---|
| 493 | + initialized as 10 (sections). |
---|
| 494 | + |
---|
| 495 | +What: /sys/fs/f2fs/<disk>/atgc_age_weight |
---|
| 496 | +Date: May 2021 |
---|
| 497 | +Contact: "Chao Yu" <yuchao0@huawei.com> |
---|
| 498 | +Description: When ATGC is on, it controls age weight to balance weight proportion |
---|
| 499 | + in between aging and valid blocks, the value should be in range of |
---|
| 500 | + [0, 100], by default it was initialized as 60(%). |
---|
| 501 | + |
---|
| 502 | +What: /sys/fs/f2fs/<disk>/atgc_age_threshold |
---|
| 503 | +Date: May 2021 |
---|
| 504 | +Contact: "Chao Yu" <yuchao0@huawei.com> |
---|
| 505 | +Description: When ATGC is on, it controls age threshold to bypass GCing young |
---|
| 506 | + candidates whose age is not beyond the threshold, by default it was |
---|
| 507 | + initialized as 604800 seconds (equals to 7 days). |
---|
| 508 | + |
---|
| 509 | +What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments |
---|
| 510 | +Date: July 2021 |
---|
| 511 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 512 | +Description: Show how many segments have been reclaimed by GC during a specific |
---|
| 513 | + GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy, |
---|
| 514 | + 3: GC idle AT, 4: GC urgent high, 5: GC urgent low 6: GC urgent mid) |
---|
| 515 | + You can re-initialize this value to "0". |
---|
| 516 | + |
---|
| 517 | +What: /sys/fs/f2fs/<disk>/gc_segment_mode |
---|
| 518 | +Date: July 2021 |
---|
| 519 | +Contact: "Daeho Jeong" <daehojeong@google.com> |
---|
| 520 | +Description: You can control for which gc mode the "gc_reclaimed_segments" node shows. |
---|
| 521 | + Refer to the description of the modes in "gc_reclaimed_segments". |
---|
| 522 | + |
---|
| 523 | +What: /sys/fs/f2fs/<disk>/hot_data_age_threshold |
---|
| 524 | +Date: November 2022 |
---|
| 525 | +Contact: "Ping Xiong" <xiongping1@xiaomi.com> |
---|
| 526 | +Description: When DATA SEPARATION is on, it controls the age threshold to indicate |
---|
| 527 | + the data blocks as hot. By default it was initialized as 262144 blocks |
---|
| 528 | + (equals to 1GB). |
---|
| 529 | + |
---|
| 530 | +What: /sys/fs/f2fs/<disk>/warm_data_age_threshold |
---|
| 531 | +Date: November 2022 |
---|
| 532 | +Contact: "Ping Xiong" <xiongping1@xiaomi.com> |
---|
| 533 | +Description: When DATA SEPARATION is on, it controls the age threshold to indicate |
---|
| 534 | + the data blocks as warm. By default it was initialized as 2621440 blocks |
---|
| 535 | + (equals to 10GB). |
---|
| 536 | + |
---|
| 537 | +What: /sys/fs/f2fs/<disk>/last_age_weight |
---|
| 538 | +Date: January 2023 |
---|
| 539 | +Contact: "Ping Xiong" <xiongping1@xiaomi.com> |
---|
| 540 | +Description: When DATA SEPARATION is on, it controls the weight of last data block age. |
---|