lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 22 Nov 2016 17:36:38 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <yuchao0@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH 1/3] f2fs: count dirty inodes to flush node pages during
 checkpoint

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ