summaryrefslogtreecommitdiffstats
path: root/include/linux/f2fs_fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim2017-02-09 19:38:09 +0100
committerJaegeuk Kim2017-02-27 18:59:54 +0100
commit22ad0b6ab46683975c6da032f1c2593066c7b3bd (patch)
treee4868123c476d3a4ebcdec04b50263ae49acd80a /include/linux/f2fs_fs.h
parentf2fs: replace rw semaphore extent_tree_lock with mutex lock (diff)
downloadkernel-qcow2-linux-22ad0b6ab46683975c6da032f1c2593066c7b3bd.tar.gz
kernel-qcow2-linux-22ad0b6ab46683975c6da032f1c2593066c7b3bd.tar.xz
kernel-qcow2-linux-22ad0b6ab46683975c6da032f1c2593066c7b3bd.zip
f2fs: add bitmaps for empty or full NAT blocks
This patches adds bitmaps to represent empty or full NAT blocks containing free nid entries. If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll use these bitmaps when building free nids. In order to avoid checkpointing burden, up-to-date bitmaps will be flushed only during umount time. So, normally we can get this gain, but when power-cut happens, we rely on fsck.f2fs which recovers this bitmap again. After this patch, we build free nids from nid #0 at mount time to make more full NAT blocks, but in runtime, we check empty NAT blocks to load free nids without loading any NAT pages from disk. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/f2fs_fs.h')
-rw-r--r--include/linux/f2fs_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index f0748524ca8c..1c92ace2e8f8 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -114,6 +114,7 @@ struct f2fs_super_block {
/*
* For checkpoint
*/
+#define CP_NAT_BITS_FLAG 0x00000080
#define CP_CRC_RECOVERY_FLAG 0x00000040
#define CP_FASTBOOT_FLAG 0x00000020
#define CP_FSCK_FLAG 0x00000010