Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417723
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/7] f2fs: skip clean segment for gc |
| Date | 2016-06-08 19:30 +0200 |
| Message-ID | <rHPsK-367-27@gated-at.bofh.it> (permalink) |
| References | <rHPsJ-367-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If a segment in a section is clean or prefreed, we don't need to get its summary
and do gc.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/gc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 67fd285..e1d274c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -795,6 +795,10 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
}
for (segno = start_segno; segno < end_segno; segno++) {
+
+ if (get_valid_blocks(sbi, segno, 1) == 0)
+ continue;
+
/* find segment summary of victim */
sum_page = find_get_page(META_MAPPING(sbi),
GET_SUM_BLOCK(sbi, segno));
--
2.8.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/7] f2fs: set mapping error for EIO Jaegeuk Kim <jaegeuk@kernel.org> - 2016-06-08 19:30 +0200 [PATCH 4/7] f2fs: skip clean segment for gc Jaegeuk Kim <jaegeuk@kernel.org> - 2016-06-08 19:30 +0200 [PATCH 7/7] f2fs: don't need to flush unlinked dentry pages Jaegeuk Kim <jaegeuk@kernel.org> - 2016-06-08 19:30 +0200 [PATCH 5/7] f2fs: introduce force_lfs mount option Jaegeuk Kim <jaegeuk@kernel.org> - 2016-06-08 19:30 +0200
csiph-web