]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: change GC bitmaps to apply the section granularity
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Sun, 31 Mar 2013 04:26:03 +0000 (13:26 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Wed, 3 Apr 2013 08:27:49 +0000 (17:27 +0900)
commit2e0e9495bb10d79ea36fd7158177171a6afa9041
tree25938d3e5e3e5c9bbb37de1ee6c2cd6ad23071a8
parentec040aed4d4ee47477772300e373567a2788ecdd
f2fs: change GC bitmaps to apply the section granularity

This patch removes a bitmap for victim segments selected by foreground GC, and
modifies the other bitmap for victim segments selected by background GC.

1) foreground GC bitmap
 : We don't need to manage this, since we just only one previous victim section
   number instead of the whole victim history.
   The f2fs uses the victim section number in order not to allocate currently
   GC'ed section to current active logs.

2) background GC bitmap
 : This bitmap is used to avoid selecting victims repeatedly by background GCs.
   In addition, the victims are able to be selected by foreground GCs, since
   there is no need to read victim blocks during foreground GCs.

   By the fact that the foreground GC reclaims segments in a section unit, it'd
   be better to manage this bitmap based on the section granularity.

Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/checkpoint.c
fs/f2fs/debug.c
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/segment.h
fs/f2fs/super.c