linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: calculate the f2fs_stat_info into base_mem
@ 2017-03-18  1:25 Kinglong Mee
  2017-03-20  3:10 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2017-03-18  1:25 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-f2fs-devel

The memory size of f2fs_stat_info also should be calculated.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/f2fs/debug.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index ee2d0a4..cf102d1 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -156,7 +156,11 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
 	if (si->base_mem)
 		goto get_cache;
 
-	si->base_mem = sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize;
+	/* build stat */
+	si->base_mem = sizeof(struct f2fs_stat_info);
+
+	/* build superb lock*/
+	si->base_mem += sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize;
 	si->base_mem += 2 * sizeof(struct f2fs_inode_info);
 	si->base_mem += sizeof(*sbi->ckpt);
 	si->base_mem += sizeof(struct percpu_counter) * NR_COUNT_TYPE;
-- 
2.9.3


------------------------------------------------------------------------------
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: calculate the f2fs_stat_info into base_mem
  2017-03-18  1:25 [PATCH] f2fs: calculate the f2fs_stat_info into base_mem Kinglong Mee
@ 2017-03-20  3:10 ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2017-03-20  3:10 UTC (permalink / raw)
  To: Kinglong Mee; +Cc: linux-f2fs-devel

On 03/18, Kinglong Mee wrote:
> The memory size of f2fs_stat_info also should be calculated.
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/f2fs/debug.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
> index ee2d0a4..cf102d1 100644
> --- a/fs/f2fs/debug.c
> +++ b/fs/f2fs/debug.c
> @@ -156,7 +156,11 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
>  	if (si->base_mem)
>  		goto get_cache;
>  
> -	si->base_mem = sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize;
> +	/* build stat */
> +	si->base_mem = sizeof(struct f2fs_stat_info);
> +
> +	/* build superb lock*/

Fixed  /* build superblock */

> +	si->base_mem += sizeof(struct f2fs_sb_info) + sbi->sb->s_blocksize;
>  	si->base_mem += 2 * sizeof(struct f2fs_inode_info);
>  	si->base_mem += sizeof(*sbi->ckpt);
>  	si->base_mem += sizeof(struct percpu_counter) * NR_COUNT_TYPE;
> -- 
> 2.9.3

------------------------------------------------------------------------------
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-03-20  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-18  1:25 [PATCH] f2fs: calculate the f2fs_stat_info into base_mem Kinglong Mee
2017-03-20  3:10 ` Jaegeuk Kim

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).