From: Alex Bligh <alex@alex.org.uk>
To: linux-kernel@vger.kernel.org
Cc: Alex Bligh <alex@alex.org.uk>
Subject: REQ_FLUSH, REQ_FUA and open/close of block devices
Date: Thu, 19 May 2011 16:06:27 +0100 [thread overview]
Message-ID: <10C5890F8F477E959B993BFA@nimrod.local> (raw)
I am doing some work on making REQ_FLUSH and REQ_FUA work with block devices
and have some patches that make them perform as expected with nbd if
an nbd device is mounted (e.g. -t ext3, -odata-journal,barriers=1), and
I see the relevant REQ_FLUSH and REQ_FUA appearing much as expected.
However, if I do a straight dd to the device (which generates an open()
and a close()), I see no barrier activity at all (i.e. no REQ_FLUSH and
no REQ_FUA). It is surprising to me that a close() on a raw device does
not generate a REQ_FLUSH. I cannot imagine it is a performance overhead.
I would have thought this would useful anyway (if I've written
to a raw device I'd rather expect it to hit it when I do the close()),
but my specific application is ensuring cache coherency on live migrate
of virtual servers: if migrating from node A to node B, then when the
hypervisor closes the block device on node A, I want to be sure that any
locally cached write data is written to the remote disk before it
unfreezes node B.
Should a close() of a dirty block device result in a REQ_FLUSH?
--
Alex Bligh
next reply other threads:[~2011-05-19 15:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 15:06 Alex Bligh [this message]
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
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=10C5890F8F477E959B993BFA@nimrod.local \
--to=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
all inboxes | Powered by JetHome®