From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Dave Chinner <david@fromorbit.com>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: reflink should flush after an unaligned directio cow write
Date: Wed, 21 Nov 2018 08:30:34 -0800 [thread overview]
Message-ID: <20181121163034.GA27540@infradead.org> (raw)
In-Reply-To: <20181121011706.GO6792@magnolia>
On Tue, Nov 20, 2018 at 05:17:06PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> If userspace hands us a not-block-aligned directio write, we'll fall
> back to a buffered write for the read-modify-write operation.
> Unfortunately, we don't flush the page cache after a successful
> fallback CoW, which means we break userspace's expectation that the data
> has been sent to the drive.
There is not such expectation. Even with O_DIRECT you need an explicit
O_DSYNC to guarantee that. Note that generic_file_direct_write doesn't
force O_DSYNC either.
prev parent reply other threads:[~2018-11-22 3:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 1:17 [PATCH] xfs: reflink should flush after an unaligned directio cow write Darrick J. Wong
2018-11-21 16:30 ` Christoph Hellwig [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=20181121163034.GA27540@infradead.org \
--to=hch@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--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).