linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/3] f2fs: skip GC when section is full
@ 2020-02-14 18:58 Jaegeuk Kim
  2020-02-14 18:58 ` [f2fs-dev] [PATCH 2/3] f2fs: add migration count iff migration happens Jaegeuk Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jaegeuk Kim @ 2020-02-14 18:58 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

This fixes skipping GC when segment is full in large section.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/gc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 53312d7bc78b..65c0687ee2bb 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1018,8 +1018,8 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
 		 * race condition along with SSR block allocation.
 		 */
 		if ((gc_type == BG_GC && has_not_enough_free_secs(sbi, 0, 0)) ||
-				get_valid_blocks(sbi, segno, false) ==
-							sbi->blocks_per_seg)
+				get_valid_blocks(sbi, segno, true) ==
+							BLKS_PER_SEC(sbi))
 			return submitted;
 
 		if (check_valid_map(sbi, segno, off) == 0)
-- 
2.25.0.265.gbab2e86ba0-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-02-25  2:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 18:58 [f2fs-dev] [PATCH 1/3] f2fs: skip GC when section is full Jaegeuk Kim
2020-02-14 18:58 ` [f2fs-dev] [PATCH 2/3] f2fs: add migration count iff migration happens Jaegeuk Kim
2020-02-17  1:41   ` Chao Yu
2020-02-17  1:43   ` Chao Yu
2020-02-14 18:58 ` [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called Jaegeuk Kim
2020-02-17  2:22   ` Chao Yu
2020-02-18 23:27     ` Jaegeuk Kim
2020-02-19  3:01       ` Chao Yu
2020-02-19  3:04         ` Jaegeuk Kim
2020-02-19  3:54           ` Chao Yu
2020-02-24 21:53             ` Jaegeuk Kim
2020-02-25  2:24               ` Chao Yu
2020-02-17  1:40 ` [f2fs-dev] [PATCH 1/3] f2fs: skip GC when section is full Chao Yu

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).