summaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2023-06-13 13:35:31 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2023-06-26 06:21:41 -0700
commit9ac00e7cef106b66611e131f59f61f5ae35cf726 (patch)
treeb03117ef6a6ea7547e9c4b66983309d7cc11e917 /fs/f2fs/segment.c
parentc9667b19e2cf13735fe2620f9d97b788897cd4af (diff)
f2fs: do not issue small discard commands during checkpoint
If there're huge # of small discards, this will increase checkpoint latency insanely. Let's issue small discards only by trim. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 8c7af8b4fc47..0457d620011f 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -2193,7 +2193,7 @@ find_next:
len = next_pos - cur_pos;
if (f2fs_sb_has_blkzoned(sbi) ||
- (force && len < cpc->trim_minlen))
+ !force || len < cpc->trim_minlen)
goto skip;
f2fs_issue_discard(sbi, entry->start_blkaddr + cur_pos,