Skip to content

Commit d514038

Browse files
liuchao12onettboots
authored andcommitted
f2fs: enable fstrim to issue discard while using discard option
MIUI-1428085 The discard thread can only process 8 requests at a time by default. So fstrim need to handle the remaining discard requests while using discard option. Change-Id: I5eac38c34182607e8dceeb13273522b10ce02af8 Signed-off-by: liuchao12 <liuchao12@xiaomi.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: onettboots <blackcocopet@gmail.com>
1 parent 69608cf commit d514038

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

fs/f2fs/segment.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,15 +3162,6 @@ int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range)
31623162
if (err)
31633163
goto out;
31643164

3165-
/*
3166-
* We filed discard candidates, but actually we don't need to wait for
3167-
* all of them, since they'll be issued in idle time along with runtime
3168-
* discard option. User configuration looks like using runtime discard
3169-
* or periodic fstrim instead of it.
3170-
*/
3171-
if (f2fs_realtime_discard_enable(sbi))
3172-
goto out;
3173-
31743165
start_block = START_BLOCK(sbi, start_segno);
31753166
end_block = START_BLOCK(sbi, end_segno + 1);
31763167

0 commit comments

Comments
 (0)