linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Block device flush ordering
@ 2019-01-10 14:30 Kurt Miller
  2019-01-11  9:24 ` Stefan Ring
  2019-01-13 22:42 ` Dave Chinner
  0 siblings, 2 replies; 6+ messages in thread
From: Kurt Miller @ 2019-01-10 14:30 UTC (permalink / raw)
  To: linux-xfs, linux-ext4

For a well behaved block device that has a writeback cache,
what is the proper behavior of flush when there are more
then one outstanding flush operations? Is it;

Flush all writes seen since the last flush.
or
Flush all writes received prior to the flush including
those before any prior flush.

For example take the following order of requests presented
to the block device:

	writes 1-5
	flush 1
	write 6
	flush 2

Can flush 2 finish with success as soon as write 6 is flushed
(which may be before flush 1 success)? Or must it wait for
all prior write operations to flush (writes 1-6)?

This question has come up in our implementation of an NBD
user-space block device and have not found a definitive answer
on which behavior is correct for us to conform to. We want to
ensure we behave as required for file-system commit write
ordering.

Best,
-Kurt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-15 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-10 14:30 Block device flush ordering Kurt Miller
2019-01-11  9:24 ` Stefan Ring
2019-01-12  0:30   ` Kurt Miller
2019-01-13 22:42 ` Dave Chinner
2019-01-14 16:45   ` Christoph Hellwig
2019-01-15 14:35     ` Kurt Miller

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).