f2fs: update max_orphans inode number
PATCH 1/1 f2fs: update max_orphans inode number
This patch update max_orphans inode number, remove nat bits blocks
Signed-off-by Yunlei He <[email protected]>
--- fs/f2fs/checkpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/checkpoint.c +2 -2
@@ -1357,8 +1357,8 @@ void init_ino_entry_info(struct f2fs_sb_info *sbi) } sbi->max_orphans = (sbi->blocks_per_seg -F2FS_CP_PACKS - -NR_CURSEG_TYPE -__cp_payload (sbi)) * -F2FS_ORPHANS_PER_BLOCK ; +NR_CURSEG_TYPE -__cp_payload (sbi) - +NM_I (sbi)->nat_bits_blocks) *F2FS_ORPHANS_PER_BLOCK ; }int __init create_checkpoint_caches (void )
Signature · 6 lines
2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 1 line · Yunlei He
This patch update
max_orphansinode number, remove nat bits blocks
We will disable nat bits cache and end up persistence of nat bits blocks once there is no enough space in checkpoint region during doing checkpoint. So it's not needed to update max orphan number according to .nat_bits_blocks.
Thanks,
Quoted 12 lines
Signed-off-by Yunlei He <[email protected]>--- fs/f2fs/checkpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/f2fs/checkpoint.c +0
-0
fs/f2fs/checkpoint.c void init_ino_entry_info(struct f2fs_sb_info *sbi) · line 1364
Quoted 10 lines
fs/f2fs/checkpoint.c +2
-2@@ -1357,8 +1357,8 @@ void init_ino_entry_info(struct f2fs_sb_info *sbi) } sbi->max_orphans = (sbi->blocks_per_seg -F2FS_CP_PACKS - -NR_CURSEG_TYPE -__cp_payload (sbi)) * -F2FS_ORPHANS_PER_BLOCK ; +NR_CURSEG_TYPE -__cp_payload (sbi) - +NM_I (sbi)->nat_bits_blocks) *F2FS_ORPHANS_PER_BLOCK ; }int __init create_checkpoint_caches (void )
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot