All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, "# v4 . 10+" <stable@vger.kernel.org>
Subject: [PATCH 5/5] f2fs: fix wrong max cost initialization
Date: Sat, 25 Mar 2017 00:59:33 -0700	[thread overview]
Message-ID: <20170325075933.21072-5-jaegeuk@kernel.org> (raw)
In-Reply-To: <20170325075933.21072-1-jaegeuk@kernel.org>

This patch fixes missing increased max cost caused by a patch that we increased
cose of data segments in greedy algorithm.

Cc: <stable@vger.kernel.org> # v4.10+
Fixes: b9cd20619 "f2fs: node segment is prior to data segment selected victim"
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 9d4158d55dbb..c52656ccbde5 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -186,7 +186,7 @@ static unsigned int get_max_cost(struct f2fs_sb_info *sbi,
 	if (p->alloc_mode == SSR)
 		return sbi->blocks_per_seg;
 	if (p->gc_mode == GC_GREEDY)
-		return sbi->blocks_per_seg * p->ofs_unit;
+		return 2 * sbi->blocks_per_seg * p->ofs_unit;
 	else if (p->gc_mode == GC_CB)
 		return UINT_MAX;
 	else /* No other gc_mode */
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, "# v4 . 10+" <stable@vger.kernel.org>
Subject: [PATCH 5/5] f2fs: fix wrong max cost initialization
Date: Sat, 25 Mar 2017 00:59:33 -0700	[thread overview]
Message-ID: <20170325075933.21072-5-jaegeuk@kernel.org> (raw)
In-Reply-To: <20170325075933.21072-1-jaegeuk@kernel.org>

This patch fixes missing increased max cost caused by a patch that we increased
cose of data segments in greedy algorithm.

Cc: <stable@vger.kernel.org> # v4.10+
Fixes: b9cd20619 "f2fs: node segment is prior to data segment selected victim"
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 9d4158d55dbb..c52656ccbde5 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -186,7 +186,7 @@ static unsigned int get_max_cost(struct f2fs_sb_info *sbi,
 	if (p->alloc_mode == SSR)
 		return sbi->blocks_per_seg;
 	if (p->gc_mode == GC_GREEDY)
-		return sbi->blocks_per_seg * p->ofs_unit;
+		return 2 * sbi->blocks_per_seg * p->ofs_unit;
 	else if (p->gc_mode == GC_CB)
 		return UINT_MAX;
 	else /* No other gc_mode */
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  parent reply	other threads:[~2017-03-25  8:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25  7:59 [PATCH 1/5] f2fs: relax node version check for victim data in gc Jaegeuk Kim
2017-03-25  7:59 ` [PATCH 2/5] f2fs: write small sized IO to hot log Jaegeuk Kim
2017-03-25  7:59   ` Jaegeuk Kim
2017-03-25  7:59 ` [PATCH 3/5] f2fs: allocate node and hot data in the beginning of partition Jaegeuk Kim
2017-03-25  7:59   ` Jaegeuk Kim
2017-03-25  7:59 ` [PATCH 4/5] f2fs: start SSR much eariler to avoid FG_GC Jaegeuk Kim
2017-03-25  7:59   ` Jaegeuk Kim
2017-03-25  7:59 ` Jaegeuk Kim [this message]
2017-03-25  7:59   ` [PATCH 5/5] f2fs: fix wrong max cost initialization Jaegeuk Kim
2017-03-25  9:05 ` [f2fs-dev] [PATCH 1/5] f2fs: relax node version check for victim data in gc Chao Yu
2017-03-25  9:05   ` Chao Yu
2017-03-25 21:27   ` [f2fs-dev] " Jaegeuk Kim
2017-03-25 21:27     ` Jaegeuk Kim
2017-03-27  8:18     ` [f2fs-dev] " Chao Yu
2017-03-27  8:18       ` Chao Yu
2017-03-29  7:04     ` heyunlei
2017-03-29  7:04       ` heyunlei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170325075933.21072-5-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.