Patch "f2fs: avoid to issue redundant discard commands" has been added to the 4.10-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
f2fs: avoid to issue redundant discard commands
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
f2fs-avoid-to-issue-redundant-discard-commands.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
8b107f5b97772c7c0c218302e9a4d15b4edf50b4Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Mon, 27 Feb 2017 11:57:11 -0800
Subject: f2fs: avoid to issue redundant discard commands
From: Jaegeuk Kim <[email protected]>
commit 8b107f5b97772c7c0c218302e9a4d15b4edf50b4 upstream.
If segs_per_sec is over 1 like under SMR, previously f2fs issues discard commands redundantly on the same section, since we didn't move end position for the previous discard command.
E.g.,
start end
| |
prefree_bitmap = [01111100111100]And, after issue discard for this section,
end start
| |
prefree_bitmap = [01111100111100]Select this section again by searching from (end + 1),
start end
| |
prefree_bitmap = [01111100111100]--- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+)
fs/f2fs/segment.c +2 -0
@@ -935,6 +935,8 @@ next: start = start_segno + sbi->segs_per_sec;if (start < end) goto next; +else + end = start -1 ; }mutex_unlock (&dirty_i->seglist_lock);
Patches currently in stable-queue which might be from [email protected] are
queue-4.10/f2fs-add-ovp-valid_blocks-check-for-bg-gc-victim-to-fg_gc.patch queue-4.10/f2fs-avoid-to-issue-redundant-discard-commands.patch queue-4.10/f2fs-fix-zoned-block-device-support.patch queue-4.10/f2fs-fix-multiple-f2fs_add_link-calls-having-same-name.patch queue-4.10/f2fs-fix-a-problem-of-using-memory-after-free.patch