]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/blkback: persistent-grants fixes
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 2 Nov 2012 15:43:04 +0000 (16:43 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 5 Dec 2012 17:05:41 +0000 (12:05 -0500)
commit31996f721aa53ff6e899fb159e062f8b98175f30
treea5e87e43e5108ca6b23066227fbb919048a2a48a
parentf143875eb5ac3768a553c63bef10798abd61a16a
xen/blkback: persistent-grants fixes

This patch contains fixes for persistent grants implementation v2:

 * handle == 0 is a valid handle, so initialize grants in blkback
   setting the handle to BLKBACK_INVALID_HANDLE instead of 0. Reported
   by Konrad Rzeszutek Wilk.

 * new_map is a boolean, use "true" or "false" instead of 1 and 0.
   Reported by Konrad Rzeszutek Wilk.

 * blkfront announces the persistent-grants feature as
   feature-persistent-grants, use feature-persistent instead which is
   consistent with blkback and the public Xen headers.

 * Add a consistency check in blkfront to make sure we don't try to
   access segments that have not been set.

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
[v1: The new_map int->bool had already been changed]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit cb5bd4d19b46c220b1ac8462a3da01767dd99488)
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/xenbus.c
drivers/block/xen-blkfront.c