From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Dan Williams <dan.j.williams@intel.com>, Jan Kara <jack@suse.cz>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core
Date: Mon, 13 Nov 2017 22:01:29 -0800 [thread overview]
Message-ID: <20171114060129.GB15810@infradead.org> (raw)
In-Reply-To: <20171114041228.GA4094@dastard>
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.
next prev parent reply other threads:[~2017-11-14 6:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 1:27 [PATCH] fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core Dan Williams
2017-11-14 2:14 ` Darrick J. Wong
2017-11-14 4:12 ` Dave Chinner
2017-11-14 6:01 ` Christoph Hellwig [this message]
2017-11-14 5:59 ` Christoph Hellwig
2017-11-14 9:31 ` Jan Kara
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=20171114060129.GB15810@infradead.org \
--to=hch@infradead.org \
--cc=dan.j.williams@intel.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-xfs@vger.kernel.org \
/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 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).