* [PATCH] block: Document lack of ordering of submit_bio/generic_make_request
@ 2012-09-13 3:40 joseph.glanville
2012-09-13 18:14 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: joseph.glanville @ 2012-09-13 3:40 UTC (permalink / raw)
To: linux-kernel
Cc: Tejun Heo, Jens Axboe, Philipp Reisner, NeilBrown,
Kent Overstreet, Vivek Goyal, Joseph Glanville
From: Joseph Glanville <joseph.glanville@orionvm.com.au>
It is worth noting here that the block layer makes no attempt
to preserve the order of requests and that upper layers like
journaling filesystems that require such ordering need to do so
explicity.
Signed-off-by: Joseph Glanville <joseph.glanville@orionvm.com.au>
---
block/blk-core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index 4b4dbdf..14b8be6 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1749,6 +1749,11 @@ end_io:
* bio happens to be merged with someone else, and may resubmit the bio to
* a lower device by calling into generic_make_request recursively, which
* means the bio should NOT be touched after the call to ->make_request_fn.
+ *
+ * Ordering is not guaranteed, callers of generic_make_request()
+ * that require ordering should ensure dependencies are first drained
+ * before submission of dependent bios.
+ *
*/
void generic_make_request(struct bio *bio)
{
@@ -1808,6 +1813,7 @@ EXPORT_SYMBOL(generic_make_request);
* submit_bio() is very similar in purpose to generic_make_request(), and
* uses that function to do most of the work. Both are fairly rough
* interfaces; @bio must be presetup and ready for I/O.
+ * Note: submit_bio() doesn't ensure ordering, see generic_make_request()
*
*/
void submit_bio(int rw, struct bio *bio)
--
1.7.12
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: Document lack of ordering of submit_bio/generic_make_request
2012-09-13 3:40 [PATCH] block: Document lack of ordering of submit_bio/generic_make_request joseph.glanville
@ 2012-09-13 18:14 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-09-13 18:14 UTC (permalink / raw)
To: joseph.glanville
Cc: linux-kernel, Jens Axboe, Philipp Reisner, NeilBrown,
Kent Overstreet, Vivek Goyal
On Thu, Sep 13, 2012 at 01:40:30PM +1000, joseph.glanville@orionvm.com.au wrote:
> From: Joseph Glanville <joseph.glanville@orionvm.com.au>
>
> It is worth noting here that the block layer makes no attempt
> to preserve the order of requests and that upper layers like
> journaling filesystems that require such ordering need to do so
> explicity.
>
> Signed-off-by: Joseph Glanville <joseph.glanville@orionvm.com.au>
Acked-by: Tejun Heo <tj@kernel.org>
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-13 18:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 3:40 [PATCH] block: Document lack of ordering of submit_bio/generic_make_request joseph.glanville
2012-09-13 18:14 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox