* Question: block layer and REQ_FLUSH
@ 2011-05-24 12:19 Alex Bligh
0 siblings, 0 replies; only message in thread
From: Alex Bligh @ 2011-05-24 12:19 UTC (permalink / raw)
To: linux-kernel, Jan Kara; +Cc: Alex Bligh
Documentation/block/writeback_cache_control.txt says:
> The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
> the filesystem and will make sure the volatile cache of the storage device
> has been flushed before the actual I/O operation is started. This
> explicitly guarantees that previously completed write requests are on
> non-volatile storage before the flagged bio starts.
>From the block driver's point of view, is it only necessary to ensure
*completed* I/O operations are flushed to disk (as per the text), or
is it also necessary to ensure *in flight* requests (i.e. those that
have not been completed) are flushed to disk too? IE when the block
layer does the flush, does it also wait for in-flight I/O to complete?
IE if the time sequence is
WRITE1
WRITE2
WRITE3
Complete WRITE2 -> sent to volatile cache
WRITE4
REQ_FLUSH
Do I need to only ensure WRITE2 is flushed, or (as I suspect) do I
need to wait for all bios previously submitted to the driver to
complete? If so, from the driver's point of view anyway, should the
guarantee refer to "previously submitted write requests" as opposed
to "previously completed"?
--
Alex Bligh
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-24 12:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 12:19 Question: block layer and REQ_FLUSH Alex Bligh
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®