summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-04-28 01:56:08 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2017-05-03 13:04:56 -0400
commit1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9 (patch)
treee10bc36ec318ab4c4b8d9b5c9aad579d9f516b4f /fs/f2fs/f2fs.h
parentc473f1a9658b6c23d576136d5a49b1c731ef1767 (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 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 37360b9ad263..f0481fb52142 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -130,6 +130,7 @@ enum {
130#define CP_SYNC 0x00000004 130#define CP_SYNC 0x00000004
131#define CP_RECOVERY 0x00000008 131#define CP_RECOVERY 0x00000008
132#define CP_DISCARD 0x00000010 132#define CP_DISCARD 0x00000010
133#define CP_TRIMMED 0x00000020
133 134
134#define DEF_BATCHED_TRIM_SECTIONS 2048 135#define DEF_BATCHED_TRIM_SECTIONS 2048
135#define BATCHED_TRIM_SEGMENTS(sbi) \ 136#define BATCHED_TRIM_SEGMENTS(sbi) \