]> www.infradead.org Git - users/jedix/linux-maple.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>
Wed, 19 Oct 2011 20:31:27 +0000 (16:31 -0400)
commite65afcc958c01cd7ce0f82c3d32d62953165c36a
tree966d98eeca1d9e55be4695604dce28814bb79570
parent09a2a179fd4e17aa64845039108b746f7446ad94
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