diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-03-31 13:26:03 +0900 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-05-02 14:34:06 +0200 |
commit | ee538a9bd19c26d687d8db5b56121548c88aab75 (patch) | |
tree | 8f793f430642ffed4d28ccfad9ed2fe9a3919aac /fs/f2fs/f2fs.h | |
parent | 0c245fe0ba1b73967e7b5048a8d75a92f74325b3 (diff) | |
download | kernel_samsung_tuna-ee538a9bd19c26d687d8db5b56121548c88aab75.zip kernel_samsung_tuna-ee538a9bd19c26d687d8db5b56121548c88aab75.tar.gz kernel_samsung_tuna-ee538a9bd19c26d687d8db5b56121548c88aab75.tar.bz2 |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index f751e4f..02276bb 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -410,6 +410,7 @@ struct f2fs_sb_info { /* for cleaning operations */ struct mutex gc_mutex; /* mutex for GC */ struct f2fs_gc_kthread *gc_thread; /* GC thread */ + unsigned int cur_victim_sec; /* current victim section num */ /* * for stat information. @@ -979,7 +980,6 @@ int lookup_journal_in_cursum(struct f2fs_summary_block *, int, unsigned int, int); void flush_sit_entries(struct f2fs_sb_info *); int build_segment_manager(struct f2fs_sb_info *); -void reset_victim_segmap(struct f2fs_sb_info *); void destroy_segment_manager(struct f2fs_sb_info *); /* |