projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19a5f5e
)
f2fs: skip clean segment for gc
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 7 Jun 2016 01:49:54 +0000
(18:49 -0700)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 8 Jun 2016 17:25:52 +0000
(10:25 -0700)
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
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/gc.c
b/fs/f2fs/gc.c
index 67fd2855ccc92216f757a32dbfef57311fd91322..e1d274cdecb8d3c0780ca47a1d81525e3e459b4e 100644
(file)
--- 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));