f2fs-slack-space-recycling · shipping · also F2FS SSR, Slack Space Recycle

F2FS slack space recycling

F2FS slack space recycling allocates eligible free positions within an already used segment instead of requiring a fresh sequential segment.

Related Observatory article: Read on hesela.com

Slack Space Recycle (SSR) is the Linux name for what the FAST 2015 F2FS paper calls threaded logging, which writes blocks into invalidated holes of existing dirty segments instead of a clean segment. It reuses holes without first cleaning that segment but makes writes random, and the paper's adaptive policy switches to it when free sections fall below 5% of total sections by default. [3] [6]

Figure 8 separates fileserver at 94% fill from iozone near 100% fill. The below-5%-of-EXT4 result from round 3 belongs to iozone with normal logging; adaptive logging approached EXT4 as that experiment continued. Segments are 2 MB by default, and a section is a run of consecutive segments. [3] [7]

In Linux v6.16, f2fs_need_SSR returns false in LFS mode and true under high urgent GC or disabled checkpointing. Otherwise it compares free sections with dirty node, dentry and inode-metadata sections plus min_ssr_sections and reserved sections, and min_ssr_sections defaults to the reserved count. A free slot is a zero bit in the union of the current-valid and checkpoint-valid maps. [2]

Relations

related
F2FS, F2FS checkpoint, F2FS Segment Information Table, Host-side flash GC, Max filesystem

Advantages

  • Lets allocation continue without foreground cleaning when clean sections run short. [3]

Limitations

  • Writes into scattered holes reach the device as random writes, which can lower throughput. [3]
  • A block that is already invalid in the current map stays unusable while its checkpoint-valid bit is set. [2]

Citations

  1. Linux v6.16 fs/f2fs/segment.c: separate allocation/release helpers and SSR free-slot selection. (accessed 2026-10-22)
  2. Lee et al. (2015). F2FS: A New File System for Flash Storage. FAST 2015, sections 2.6 and 3.2.5, Figure 8. (accessed 2026-10-27)
  3. Linux v6.16 fs/f2fs/segment.h: LFS, SSR and AT_SSR allocation modes. (accessed 2026-10-22)
  4. Linux kernel documentation: WHAT IS Flash-Friendly File System (F2FS)? (accessed 2026-10-22)

Further reading

  1. Linux v6.12 fs/f2fs/segment.c: update_sit_entry, __next_free_blkoff and change_curseg. (accessed 2026-10-21)
  2. Hesela: F2FS invalid does not mean reusable yet; illustrative model and tests. (accessed 2026-10-21)
  3. Linux v6.12 fs/f2fs/segment.h: SSR allocation mode and Slack Space Recycle. (accessed 2026-10-21)
Sources & caveats
  • The 2026-10-27 correction separates the two workloads in section 3.2.5 and Figure 8; these historical results are not current-device guarantees. [3]
  • The 5% threshold, 94% fill and below 5% of EXT4 figures come from lee.
  • segment616h is Linux v6.16 fs/f2fs/segment.h, read on 2026-10-22 in the allocation-mode comment and enum.
  • reuse616 is Linux v6.16 fs/f2fs/segment.c, re-read on 2026-10-22 in f2fs_need_SSR, __next_free_blkoff and build_segment_manager.
  • f2fs-doc is the Linux kernel F2FS documentation page, read on 2026-10-22 in the layout section, and is the source of the 2 MB segment size.

JSON: /data/terms/f2fs-slack-space-recycling.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. F2FS slack space recycling. Hesela. 2026-12-01. https://hesela.dev/terms/f2fs-slack-space-recycling/