linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	jlayton@redhat.com, dchinner@redhat.com,
	linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com
Subject: Re: Problems doing DIO to netfs cache on XFS from Ceph
Date: Thu, 3 Dec 2020 15:50:43 +0000	[thread overview]
Message-ID: <20201203155043.GI11935@casper.infradead.org> (raw)
In-Reply-To: <914680.1607004656@warthog.procyon.org.uk>

On Thu, Dec 03, 2020 at 02:10:56PM +0000, David Howells wrote:
> Note that I'm only doing async DIO reads and writes, so I was a bit surprised
> that XFS is doing a writeback at all - but I guess that IOCB_DIRECT is
> actually just a hint and the filesystem can turn it into buffered I/O if it
> wants.

That's almost the exact opposite of what is going on.  XFS sees that
you're going to do an O_DIRECT read, so it writes back the dirty memory
that's currently in the page cache so that your read doesn't read stale
data from disk.


  reply	other threads:[~2020-12-03 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:10 Problems doing DIO to netfs cache on XFS from Ceph David Howells
2020-12-03 15:50 ` Matthew Wilcox [this message]
2020-12-03 16:04 ` David Howells
2020-12-03 22:12 ` Dave Chinner
2020-12-03 23:05   ` Matthew Wilcox
2020-12-04  1:50     ` Yafang Shao

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=20201203155043.GI11935@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dchinner@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jlayton@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@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).