]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkfront: If no barrier or flush is supported, use invalid operation.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 16 Sep 2011 19:15:14 +0000 (15:15 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 19 Oct 2011 20:31:22 +0000 (16:31 -0400)
commit4052bdcf29c94d33064b319981a1ccf8f46a4421
tree69beb72e14443aaa2d63bef191ae9bd86fe5b072
parente890fe456af90729ba214b7ee04210eaada5cc4c
xen-blkfront: If no barrier or flush is supported, use invalid operation.

Guard against issuing BLKIF_OP_WRITE_BARRIER or BLKIF_OP_FLUSH_CACHE
by checking whether we successfully negotiated with the backend.
The negotiation with the backend also sets the q->flush_flags which
fortunately for us is also used when submitting an bio to us. If
we don't support barriers or flushes it would be set to zero so
we should never end up having to deal with REQ_FLUSH | REQ_FUA.

However, other third party implementations of __make_request that
might be stacked on top of us might not be so smart, so lets fix this up.

Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c