]> 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>
Tue, 11 Oct 2011 19:01:43 +0000 (15:01 -0400)
commita1253dfff5331e289c0eca6beb8d9ceff967b8d3
tree244d0707c4f6c991614a1fd21e3d64bef7640667
parent680585607504bc82e7788250a490f1a091742d8d
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