diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-02-27 19:12:24 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-27 20:40:36 +0900 |
commit | 81c1a0f13e6306a76fc3743b8504085d96659a5f (patch) | |
tree | 977ddb17842f5ae24856c1fdf7192d1ae1666840 /fs/f2fs/checkpoint.c | |
parent | ab9fa662e4867455f44f4de96d29a7f09cf292c6 (diff) | |
download | linux-81c1a0f13e6306a76fc3743b8504085d96659a5f.tar.bz2 |
f2fs: readahead contiguous SSA blocks for f2fs_gc
If there are multi segments in one section, we will read those SSA blocks which
have contiguous address one by one in f2fs_gc. It may lost performance, let's
read ahead SSA blocks by merge multi read request.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 757b77b7118e..c8516ee24126 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -82,6 +82,7 @@ inline int get_max_meta_blks(struct f2fs_sb_info *sbi, int type) return NM_I(sbi)->max_nid / NAT_ENTRY_PER_BLOCK; case META_SIT: return SIT_BLK_CNT(sbi); + case META_SSA: case META_CP: return 0; default: @@ -90,7 +91,7 @@ inline int get_max_meta_blks(struct f2fs_sb_info *sbi, int type) } /* - * Readahead CP/NAT/SIT pages + * Readahead CP/NAT/SIT/SSA pages */ int ra_meta_pages(struct f2fs_sb_info *sbi, int start, int nrpages, int type) { @@ -125,8 +126,9 @@ int ra_meta_pages(struct f2fs_sb_info *sbi, int start, int nrpages, int type) goto out; prev_blk_addr = blk_addr; break; + case META_SSA: case META_CP: - /* get cp block addr */ + /* get ssa/cp block addr */ blk_addr = blkno; break; default: |