lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  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]
Date:   Mon, 13 Nov 2017 22:01:29 -0800
From:   Christoph Hellwig <hch@...radead.org>
To:     Dave Chinner <david@...morbit.com>
Cc:     Dan Williams <dan.j.williams@...el.com>, Jan Kara <jack@...e.cz>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        linux-nvdimm@...ts.01.org, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] fs, dax: unify IOMAP_F_DIRTY read vs write handling
 policy in the dax core

On Tue, Nov 14, 2017 at 03:12:28PM +1100, Dave Chinner wrote:
> On Mon, Nov 13, 2017 at 05:27:54PM -0800, Dan Williams wrote:
> > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> > index b43be199fbdf..888b60189983 100644
> > --- a/fs/xfs/xfs_iomap.c
> > +++ b/fs/xfs/xfs_iomap.c
> > @@ -1087,9 +1087,9 @@ xfs_file_iomap_begin(
> >  		trace_xfs_iomap_found(ip, offset, length, 0, &imap);
> >  	}
> >  
> > -	if ((flags & IOMAP_WRITE) && xfs_ipincount(ip) &&
> > -	    (ip->i_itemp->ili_fsync_fields & ~XFS_ILOG_TIMESTAMP))
> > -		iomap->flags |= IOMAP_F_DIRTY;
> > +	if (xfs_ipincount(ip))
> > +		if (ip->i_itemp->ili_fsync_fields & ~XFS_ILOG_TIMESTAMP)
> > +			iomap->flags |= IOMAP_F_DIRTY;
> 
> Please make a helper for this, and use it in xfs_file_fsync() where
> the same dirty checks are done. e.g.

Let's keep that sort of cleanup separate.  I initially considered
it when doing the MAP_SYNC work, but fsync works a little different
in that it looks at ili_last_lsn, so your little helper below won't
work as-is.  You can send it as an incremental patch later and we
can see if we can come up with something workable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ