diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/segment.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 6d16ecf9d29e..9e13db05e3f0 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -672,6 +672,10 @@ static void add_discard_addrs(struct f2fs_sb_info *sbi, struct cp_control *cpc) break; end = __find_rev_next_zero_bit(dmap, max_blocks, start + 1); + if (force && start && end != max_blocks + && (end - start) < cpc->trim_minlen) + continue; + __add_discard_entry(sbi, cpc, se, start, end); } } |