summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-31 00:26:03 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-04-03 04:27:49 -0400
commit5ec4e49f9bd753e2a6857a96e01f8ae5ff00b459 (patch)
tree25938d3e5e3e5c9bbb37de1ee6c2cd6ad23071a8 /fs/f2fs/f2fs.h
parent33afa7fde0defbb362328233e600e052d0a22cd5 (diff)
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>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 77e2eb061bfa..71eacd373916 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -410,6 +410,7 @@ struct f2fs_sb_info {
410 /* for cleaning operations */ 410 /* for cleaning operations */
411 struct mutex gc_mutex; /* mutex for GC */ 411 struct mutex gc_mutex; /* mutex for GC */
412 struct f2fs_gc_kthread *gc_thread; /* GC thread */ 412 struct f2fs_gc_kthread *gc_thread; /* GC thread */
413 unsigned int cur_victim_sec; /* current victim section num */
413 414
414 /* 415 /*
415 * for stat information. 416 * for stat information.
@@ -979,7 +980,6 @@ int lookup_journal_in_cursum(struct f2fs_summary_block *,
979 int, unsigned int, int); 980 int, unsigned int, int);
980void flush_sit_entries(struct f2fs_sb_info *); 981void flush_sit_entries(struct f2fs_sb_info *);
981int build_segment_manager(struct f2fs_sb_info *); 982int build_segment_manager(struct f2fs_sb_info *);
982void reset_victim_segmap(struct f2fs_sb_info *);
983void destroy_segment_manager(struct f2fs_sb_info *); 983void destroy_segment_manager(struct f2fs_sb_info *);
984 984
985/* 985/*