All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/3] f2fs: count dirty inodes to flush node pages during checkpoint
Date: Tue, 22 Nov 2016 17:36:38 -0800	[thread overview]
Message-ID: <20161123013637.GA14761@jaegeuk> (raw)
In-Reply-To: <55c9f7d0-c96f-d0a4-f1d3-edd344f530a8@huawei.com>

On Wed, Nov 23, 2016 at 09:27:26AM +0800, Chao Yu wrote:
> On 2016/10/18 5:56, Jaegeuk Kim wrote:
> > If there are a lot of dirty inodes, we need to flush all of them when doing
> > checkpoint. So, we need to count this for enough free space.
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/segment.h | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
> > index fecb856..a6efb5c 100644
> > --- a/fs/f2fs/segment.h
> > +++ b/fs/f2fs/segment.h
> > @@ -471,11 +471,12 @@ static inline bool need_SSR(struct f2fs_sb_info *sbi)
> >  {
> >  	int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES);
> >  	int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS);
> > +	int imeta_secs = get_blocktype_secs(sbi, F2FS_DIRTY_IMETA);
> >  
> >  	if (test_opt(sbi, LFS))
> >  		return false;
> >  
> > -	return free_sections(sbi) <= (node_secs + 2 * dent_secs +
> > +	return free_sections(sbi) <= (node_secs + 2 * dent_secs + imeta_secs +
> >  						reserved_sections(sbi) + 1);
> >  }
> >  
> > @@ -484,6 +485,7 @@ static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi,
> >  {
> >  	int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES);
> >  	int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS);
> > +	int imeta_secs = get_blocktype_secs(sbi, F2FS_DIRTY_IMETA);
> >  
> >  	node_secs += get_blocktype_secs(sbi, F2FS_DIRTY_IMETA);
> 
> This line should be removed if we start to count dirty meta with imeta_secs from
> now on.

Ah, yes.
Fixed.

Thanks,

> 
> Thanks,
> 
> >  
> > @@ -491,7 +493,8 @@ static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi,
> >  		return false;
> >  
> >  	return (free_sections(sbi) + freed) <=
> > -		(node_secs + 2 * dent_secs + reserved_sections(sbi) + needed);
> > +		(node_secs + 2 * dent_secs + imeta_secs +
> > +		reserved_sections(sbi) + needed);
> >  }
> >  
> >  static inline bool excess_prefree_segs(struct f2fs_sb_info *sbi)
> > 

      reply	other threads:[~2016-11-23  1:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 21:56 [PATCH 1/3] f2fs: count dirty inodes to flush node pages during checkpoint Jaegeuk Kim
2016-10-17 21:56 ` Jaegeuk Kim
2016-10-17 21:56 ` [PATCH 2/3] f2fs: call f2fs_balance_fs for setattr Jaegeuk Kim
2016-10-26 12:06   ` Chao Yu
2016-10-26 12:06     ` Chao Yu
2016-10-17 21:56 ` [PATCH 3/3] f2fs: keep dirty inodes selectively for checkpoint Jaegeuk Kim
2016-10-17 21:56   ` Jaegeuk Kim
2016-10-20  2:26   ` [PATCH 3/3 v2] " Jaegeuk Kim
2016-11-05  2:44     ` [f2fs-dev] " Chao Yu
2016-11-05  2:44       ` Chao Yu
2016-11-05  7:02       ` Jaegeuk Kim
2016-10-26 12:05 ` [PATCH 1/3] f2fs: count dirty inodes to flush node pages during checkpoint Chao Yu
2016-10-26 12:05   ` Chao Yu
2016-11-23  1:27 ` Chao Yu
2016-11-23  1:27   ` Chao Yu
2016-11-23  1:36   ` Jaegeuk Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123013637.GA14761@jaegeuk \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.