diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-04-28 13:56:08 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-05-03 10:04:56 -0700 |
commit | 1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9 (patch) | |
tree | e10bc36ec318ab4c4b8d9b5c9aad579d9f516b4f /include/trace | |
parent | c473f1a9658b6c23d576136d5a49b1c731ef1767 (diff) | |
download | linux-1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9.tar.bz2 |
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/trace')
-rw-r--r-- | include/trace/events/f2fs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 2e8f68f244d4..c78a223a0d9c 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -44,6 +44,7 @@ TRACE_DEFINE_ENUM(CP_FASTBOOT); TRACE_DEFINE_ENUM(CP_SYNC); TRACE_DEFINE_ENUM(CP_RECOVERY); TRACE_DEFINE_ENUM(CP_DISCARD); +TRACE_DEFINE_ENUM(CP_TRIMMED); #define show_block_type(type) \ __print_symbolic(type, \ @@ -125,7 +126,8 @@ TRACE_DEFINE_ENUM(CP_DISCARD); { CP_FASTBOOT, "Fastboot" }, \ { CP_SYNC, "Sync" }, \ { CP_RECOVERY, "Recovery" }, \ - { CP_DISCARD, "Discard" }) + { CP_DISCARD, "Discard" }, \ + { CP_UMOUNT | CP_TRIMMED, "Umount,Trimmed" }) struct victim_sel_policy; struct f2fs_map_blocks; |