cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Darrick J. Wong <darrick.wong@oracle.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] RFC: iomap write invalidation
Date: Tue, 21 Jul 2020 09:03:42 -0700	[thread overview]
Message-ID: <20200721160342.GC3151642@magnolia> (raw)
In-Reply-To: <20200721155201.GL15516@casper.infradead.org>

On Tue, Jul 21, 2020 at 04:52:01PM +0100, Matthew Wilcox wrote:
> On Tue, Jul 21, 2020 at 05:42:40PM +0200, Christoph Hellwig wrote:
> > On Tue, Jul 21, 2020 at 04:31:36PM +0100, Matthew Wilcox wrote:
> > > > Umm, no.  -ENOTBLK is internal - the file systems will retry using
> > > > buffered I/O and the error shall never escape to userspace (or even the
> > > > VFS for that matter).
> > > 
> > > Ah, I made the mistake of believing the comments that I could see in
> > > your patch instead of reading the code.
> > > 
> > > Can I suggest deleting this comment:
> > > 
> > >         /*
> > >          * No fallback to buffered IO on errors for XFS, direct IO will either
> > >          * complete fully or fail.
> > >          */
> > > 
> > > and rewording this one:
> > > 
> > >                 /*
> > >                  * Allow a directio write to fall back to a buffered
> > >                  * write *only* in the case that we're doing a reflink
> > >                  * CoW.  In all other directio scenarios we do not
> > >                  * allow an operation to fall back to buffered mode.
> > >                  */
> > > 
> > > as part of your revised patchset?
> > 
> > That isn't actually true.  In current mainline we only fallback on
> > reflink RMW cases, but with this series we also fall back for
> > invalidation failures.
> 
> ... that's why I'm suggesting that you delete the first one and rewrite
> the second one.  Because they aren't true.

/*
 * We allow only three outcomes of a directio: (1) it succeeds
 * completely; (2) it fails with a negative error code; or (3) it
 * returns -ENOTBLK to signal that we should fall back to buffered IO.
 *
 * The third scenario should only happen if iomap refuses to perform the
 * direct IO, or the direct write request requires CoW but is not aligned
 * to the filesystem block size.
 */

?

--D



      reply	other threads:[~2020-07-21 16:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  7:46 [Cluster-devel] RFC: iomap write invalidation Christoph Hellwig
2020-07-13  7:46 ` [Cluster-devel] [PATCH 1/2] iomap: Only invalidate page cache pages on direct IO writes Christoph Hellwig
2020-07-13  7:46 ` [Cluster-devel] [PATCH 2/2] iomap: fall back to buffered writes for invalidation failures Christoph Hellwig
2020-07-13 11:55   ` Matthew Wilcox
2020-07-14 11:00     ` Christoph Hellwig
2020-07-13 12:20   ` Goldwyn Rodrigues
2020-07-13 16:09     ` David Sterba
2020-07-13 15:39   ` Darrick J. Wong
2020-07-14 11:00     ` Christoph Hellwig
2020-07-14  1:41   ` Damien Le Moal
2020-07-15  1:47 ` [Cluster-devel] RFC: iomap write invalidation Dave Chinner
2020-07-20 21:51 ` Goldwyn Rodrigues
2020-07-21 14:53   ` Christoph Hellwig
2020-07-21 14:59     ` Darrick J. Wong
2020-07-21 15:04     ` Matthew Wilcox
2020-07-21 15:06       ` Christoph Hellwig
2020-07-21 15:14         ` Matthew Wilcox
2020-07-21 15:16           ` Christoph Hellwig
2020-07-21 15:27             ` Darrick J. Wong
2020-07-21 15:41               ` Christoph Hellwig
2020-07-21 15:59                 ` Darrick J. Wong
2020-07-21 16:01                   ` Christoph Hellwig
2020-07-21 16:05                     ` Darrick J. Wong
2020-07-21 15:31             ` Matthew Wilcox
2020-07-21 15:42               ` Christoph Hellwig
2020-07-21 15:52                 ` Matthew Wilcox
2020-07-21 16:03                   ` Darrick J. Wong [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=20200721160342.GC3151642@magnolia \
    --to=darrick.wong@oracle.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 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).