2013年1月30日星期三

f2fs: flash-fridendly file system

by Joo-oung Hwang from Samsung

It is basically some measurement on the FTL device (optimal segment size, optimal concurrent write threads, etc.) and then some natual (known techniques) tweaks on LFS. 


Samsung has the benefit of both doing device and hearing the requirement directly from end users

Log-structured file system approach for flash storage (with tweaks specially designed for flash/FTLdevices)

Traditional LFS has the wnadering tree problem (to write one data block, you have to write 4-5 metadata blocks)

FTL address mapping methods:
1. block mapping (too large guranity)
2. page mapping (high memory and processor cost)
3. hybrid mapping (aka log block mapping)  include three parts
    BAST (block associative sector translation)
     FAST (fully associative)
    SAST (set associative)
 
     basically you have log block (which use page mapping) and data block (which use whole block mapping).
     You will have to merge log blocks to data blocks periodically: full merge, partial merge (a.k.a cop merge), switch merge
     
     They did some measurments to show that FTL works best for >4M segment size and at most 6 concurrent writing(active) log blocks (for most devices, also supported by IBM measurements)


Differences from traditional LFS:
1. alignment with FTL

2. avoid metadata update propagation by introducing indirection layer for indexing structure, this indrection data is on fixed location

3. multi-level hash tree to implement directory (known technique)