summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-04-28 13:56:08 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-05-08 16:31:15 -0700
commita725708ca434461dbaaefa7ec5004373ec3ba054 (patch)
treeda67cd0b736e0a0870cedd6fc3c1123c50ed65e9 /include/linux
parent30d60edd7becac313a6a3adb9733ea123695b2f6 (diff)
f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard
Introduce CP_TRIMMED_FLAG to indicate all invalid block were trimmed before umount, so once we do mount with image which contain the flag, we don't record invalid blocks as undiscard one, when fstrim is being triggered, we can avoid issuing redundant discard commands. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux')
-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 661200e6d281..2b7183c5c9a3 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_TRIMMED_FLAG 0x00000100
#define CP_NAT_BITS_FLAG 0x00000080
#define CP_CRC_RECOVERY_FLAG 0x00000040
#define CP_FASTBOOT_FLAG 0x00000020