diff options
author | Chao Yu <chao2.yu@samsung.com> | 2013-11-22 09:09:59 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-23 10:18:02 +0900 |
commit | 74de593af77b109f202c47e090c9e134c8882869 (patch) | |
tree | f7afcd5d6ac031268442cb0b5d21a003ebcd10ee /fs/f2fs/segment.h | |
parent | d4d288bc72c020d335868ce217695c4d5dfd74d0 (diff) | |
download | op-kernel-dev-74de593af77b109f202c47e090c9e134c8882869.zip op-kernel-dev-74de593af77b109f202c47e090c9e134c8882869.tar.gz |
f2fs: read contiguous sit entry pages by merging for mount performance
Previously we read sit entries page one by one, this method lost the chance
of reading contiguous page together. So we read pages as contiguous as
possible for better mount performance.
change log:
o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
suggested.
o add mark_page_accessed() before release page to delay VM reclaiming.
o remove '*order' for simplification of function as Jaegeuk Kim suggested.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
[Jaegeuk Kim: fix a bug on the block address calculation]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 38f6196..b84dd23 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -78,6 +78,8 @@ (segno / SIT_ENTRY_PER_BLOCK) #define START_SEGNO(sit_i, segno) \ (SIT_BLOCK_OFFSET(sit_i, segno) * SIT_ENTRY_PER_BLOCK) +#define SIT_BLK_CNT(sbi) \ + ((TOTAL_SEGS(sbi) + SIT_ENTRY_PER_BLOCK - 1) / SIT_ENTRY_PER_BLOCK) #define f2fs_bitmap_size(nr) \ (BITS_TO_LONGS(nr) * sizeof(unsigned long)) #define TOTAL_SEGS(sbi) (SM_I(sbi)->main_segments) |