Skip to content

Commit 9ac00e7

Browse files
author
Jaegeuk Kim
committed
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>
1 parent c9667b1 commit 9ac00e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/f2fs/segment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,7 @@ void f2fs_clear_prefree_segments(struct f2fs_sb_info *sbi,
21932193
len = next_pos - cur_pos;
21942194

21952195
if (f2fs_sb_has_blkzoned(sbi) ||
2196-
(force && len < cpc->trim_minlen))
2196+
!force || len < cpc->trim_minlen)
21972197
goto skip;
21982198

21992199
f2fs_issue_discard(sbi, entry->start_blkaddr + cur_pos,

0 commit comments

Comments
 (0)