* [PATCH] f2fs: update max_orphans inode number
@ 2017-04-05 10:01 Yunlei He
2017-04-05 10:35 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Yunlei He @ 2017-04-05 10:01 UTC (permalink / raw)
To: jaegeuk, yuchao0, linux-f2fs-devel
This patch update max_orphans inode number, remove nat bits blocks
Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
fs/f2fs/checkpoint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 9aba0bb..64dd429 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -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)
--
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] f2fs: update max_orphans inode number
2017-04-05 10:01 [PATCH] f2fs: update max_orphans inode number Yunlei He
@ 2017-04-05 10:35 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2017-04-05 10:35 UTC (permalink / raw)
To: Yunlei He, jaegeuk, linux-f2fs-devel
On 2017/4/5 18:01, Yunlei He wrote:
> This patch update max_orphans inode 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,
>
> Signed-off-by: Yunlei He <heyunlei@huawei.com>
> ---
> fs/f2fs/checkpoint.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 9aba0bb..64dd429 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-05 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 10:01 [PATCH] f2fs: update max_orphans inode number Yunlei He
2017-04-05 10:35 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).