diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-02-02 15:52:59 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-11 23:15:02 +0100 |
commit | 5ac206cf4f9aad871aa1f1dd653a3404092db56c (patch) | |
tree | f9d487406816b58c5e3b1b52a376d459245be803 /fs/f2fs/segment.h | |
parent | f2fs: mark gc_thread as NULL when thread creation is failed (diff) | |
download | linux-5ac206cf4f9aad871aa1f1dd653a3404092db56c.tar.xz linux-5ac206cf4f9aad871aa1f1dd653a3404092db56c.zip |
f2fs: make an accessor to get sections for particular block type
Introduce accessor to get the sections based upon the block type
(node,dents...) and modify the functions : should_do_checkpoint,
has_not_enough_free_secs to use this accessor function to get
the node sections and dent sections.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 66a288a52fd3..a9417b94d6bc 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -459,13 +459,8 @@ static inline int get_ssr_segment(struct f2fs_sb_info *sbi, int type) static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi) { - unsigned int pages_per_sec = (1 << sbi->log_blocks_per_seg) * - sbi->segs_per_sec; - int node_secs = ((get_pages(sbi, F2FS_DIRTY_NODES) + pages_per_sec - 1) - >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; - int dent_secs = ((get_pages(sbi, F2FS_DIRTY_DENTS) + pages_per_sec - 1) - >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; - + int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES); + int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS); if (sbi->por_doing) return false; |