]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/blkback: Support 'feature-barrier' aka old-style BARRIER requests.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 10 Oct 2011 04:42:22 +0000 (00:42 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 10 Oct 2011 16:48:38 +0000 (12:48 -0400)
commit58d862f3ca0e3b48a75e6c97d89e5bb65e8d6dfe
tree6f65d36b1f4be77a1fd2d2fc89dbc4078c40156b
parent7a03845d8cd1023a5a6a18e4890550e902bdddef
xen/blkback: Support 'feature-barrier' aka old-style BARRIER requests.

We emulate the barrier requests by draining the outstanding bio's
and then sending the WRITE_FLUSH command. To drain the I/Os
we use the refcnt that is used during disconnect to wait for all
the I/Os before disconnecting from the frontend. We latch on its
value and if it reaches either the threshold for disconnect or when
there are no more outstanding I/Os, then we have drained all I/Os.

Suggested-by: Christopher Hellwig <hch@infradead.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h
drivers/block/xen-blkback/xenbus.c