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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1404807412.13519.46.camel@yhuang-dev>
Date:	Tue, 08 Jul 2014 16:16:52 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Jaegeuk Kim <jaegeuk@...nel.org>
Cc:	Changman Lee <cm224.lee@...sung.com>,
	linux-f2fs-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: f2fs: Add f2fs_balance_fs for direct IO

Hi, Jaegeuk,

On Tue, 2014-07-08 at 00:58 -0700, Jaegeuk Kim wrote:
> Hi Huang,
> 
> It occurs a merge conflict.
> Please check the patch.

Sorry, my fault.  I think I need to base my patch on f2fs tree instead
of latest Linus' tree?

> Anyway, IMO, it needs to place f2fs_balance_fs somewhere in get_data_block.

Yes.  I think so too.  So you prefer to add f2fs_balance_fs in both
f2fs_direct_IO and get_data_block, or just add f2fs_blance_fs in
get_data_block only?

Best Regards,
Huang, Ying

> Thanks,
> 
> On Mon, Jul 07, 2014 at 01:46:28PM +0800, Huang Ying wrote:
> > Otherwise, if a large amount of direct IO writes were done, the
> > segment allocation may be failed because no enough segments are gced.
> > 
> > Signed-off-by: Huang, Ying <ying.huang@...el.com>
> > ---
> >  fs/f2fs/data.c |    6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > --- a/fs/f2fs/data.c
> > +++ b/fs/f2fs/data.c
> > @@ -1038,6 +1038,7 @@ static ssize_t f2fs_direct_IO(int rw, st
> >  {
> >  	struct file *file = iocb->ki_filp;
> >  	struct inode *inode = file->f_mapping->host;
> > +	struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
> >  
> >  	/* Let buffer I/O handle the inline data case. */
> >  	if (f2fs_has_inline_data(inode))
> > @@ -1046,8 +1047,11 @@ static ssize_t f2fs_direct_IO(int rw, st
> >  	if (check_direct_IO(inode, rw, iter, offset))
> >  		return 0;
> >  
> > +	if (rw == WRITE)
> > +		f2fs_balance_fs(sbi);
> > +
> >  	/* clear fsync mark to recover these blocks */
> > -	fsync_mark_clear(F2FS_SB(inode->i_sb), inode->i_ino);
> > +	fsync_mark_clear(sbi, inode->i_ino);
> >  
> >  	return blockdev_direct_IO(rw, iocb, inode, iter, offset,
> >  				  get_data_block);
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ