From: Christoph Hellwig <hch@infradead.org>
To: Alex Bligh <alex@alex.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: REQ_FLUSH, REQ_FUA and open/close of block devices
Date: Sun, 22 May 2011 08:04:05 -0400 [thread overview]
Message-ID: <20110522120405.GA30858@infradead.org> (raw)
In-Reply-To: <3A79A7FE44AE1DC20A2DB90D@nimrod.local>
On Sun, May 22, 2011 at 01:00:41PM +0100, Alex Bligh wrote:
> I think what you are saying is that when the request with REQ_FUA arrives,
> it will have been immediately preceded by a REQ_FLUSH. Therefore, I will
> only have the data attached to the request with REQ_FUA to flush anyway, so
> an fdatasync() does no harm performance wise. That's what I'm currently
> doing if sync_file_range() is not supported. It sounds like that's what I
> should be doing all the time. If you don't mind, I shall borrow your
> text above and put it in the source.
Sure, feel free to borrow it. Note that I have a mid-term plan to
actually use REQ_FUA without preceeding REQ_FLUSH in XFS, but even in
that case the write cache probably won't be too full.
Long term someone who cares enough should simple submit patches
for range fsync/fdatasync syscalls. We already have all the
infrastructure for it in the kernel, as it's used by the O_SYNC/O_DSYNC
implementation and nfsd, so it's just the actually syscall entry points
that need to be added.
next prev parent reply other threads:[~2011-05-22 12:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 15:06 REQ_FLUSH, REQ_FUA and open/close of block devices Alex Bligh
2011-05-20 12:20 ` Christoph Hellwig
2011-05-21 8:42 ` Alex Bligh
2011-05-22 10:44 ` Christoph Hellwig
2011-05-22 11:17 ` Alex Bligh
2011-05-22 11:26 ` Christoph Hellwig
2011-05-22 12:00 ` Alex Bligh
2011-05-22 12:04 ` Christoph Hellwig [this message]
2011-05-22 16:56 ` Jeff Garzik
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=20110522120405.GA30858@infradead.org \
--to=hch@infradead.org \
--cc=alex@alex.org.uk \
--cc=linux-kernel@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