f2fs: doc: disk layout Signed-off-by: Chao Yu <chao@kernel.org>
diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst index 03b1efa..d07f18d 100644 --- a/Documentation/filesystems/f2fs.rst +++ b/Documentation/filesystems/f2fs.rst
@@ -992,3 +992,23 @@ So, the key idea is, user can do any file operations on /dev/vdc, and reclaim the space after the use, while the space is counted as /data. That doesn't require modifying partition size and filesystem format. + +Disk layout + ,-----------------------------------------> MAX_BLKADDR -, + | ,------------- TOTAL_BLKS ----------------------------, + | | | + | ,- seg0_blkaddr ,----- sit/nat/ssa/main blkaddress | + block | | (SEG0_BLKADDR) | | | | (e.g., MAIN_BLKADDR) | + address 0..x................ a b c d ............................. + | | + global seg# 0...................... m ............................. + | | | + | `------- MAIN_SEGS -----------' + `-------------- TOTAL_SEGS ---------------------------' + | | + seg# 0..........xx.................. + + = Note = + o GET_SEGNO_FROM_SEG0 : blk address -> global segno + o GET_SEGNO : blk address -> segno + o START_BLOCK : segno -> starting block address