* Patch "f2fs: avoid to issue redundant discard commands" has been added to the 4.9-stable tree
@ 2017-03-10 8:19 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-10 8:19 UTC (permalink / raw)
To: jaegeuk, damien.lemoal, gregkh; +Cc: stable, stable-commits
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.9-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.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8b107f5b97772c7c0c218302e9a4d15b4edf50b4 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Mon, 27 Feb 2017 11:57:11 -0800
Subject: f2fs: avoid to issue redundant discard commands
From: Jaegeuk Kim <jaegeuk@kernel.org>
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]
Fixes: 36abef4e796d38 ("f2fs: introduce mode=lfs mount option")
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/f2fs/segment.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -813,6 +813,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 jaegeuk@kernel.org are
queue-4.9/f2fs-add-ovp-valid_blocks-check-for-bg-gc-victim-to-fg_gc.patch
queue-4.9/f2fs-avoid-to-issue-redundant-discard-commands.patch
queue-4.9/f2fs-fix-multiple-f2fs_add_link-calls-having-same-name.patch
queue-4.9/f2fs-fix-a-problem-of-using-memory-after-free.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-10 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 8:19 Patch "f2fs: avoid to issue redundant discard commands" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).