summaryrefslogtreecommitdiffstats
path: root/include/linux/f2fs_fs.h
diff options
context:
space:
mode:
authorChao Yu2017-04-28 07:56:08 +0200
committerJaegeuk Kim2017-05-03 19:04:56 +0200
commit1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9 (patch)
treee10bc36ec318ab4c4b8d9b5c9aad579d9f516b4f /include/linux/f2fs_fs.h
parentf2fs: allow cpc->reason to indicate more than one reason (diff)
downloadkernel-qcow2-linux-1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9.tar.gz
kernel-qcow2-linux-1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9.tar.xz
kernel-qcow2-linux-1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9.zip
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/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 093549e10ee2..b6feed6547ce 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