]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkback: implement swapping of active vbd
authorAnkur Arora <ankur.a.arora@oracle.com>
Thu, 30 Aug 2018 10:34:54 +0000 (03:34 -0700)
committerBrian Maly <brian.maly@oracle.com>
Mon, 8 Oct 2018 15:43:36 +0000 (11:43 -0400)
commit29159e4b2fbcfecae15d08656b46393729f92697
treeba6186ec4056d3ae70eb307fba0de4be437f5325
parentf75e99776d19aa7e018c734555f6ea897cd5bd96
xen-blkback: implement swapping of active vbd

Currently we disallow any change of major:minor of the vbd once created.
The danger is in the user switching backends where the contents of the
backend device are dissimilar.
However, changing the vbd can be quite useful -- for instance by switching
from a backend which is not multi-pathed (or raid'd) to one that is.

As for blkback itself, it is used purely as a passthrough device so there
is no state outside struct vbd which would be impacted with this change.

This patch allows a vbd swap, communicating the state of the swap via the
xenbus paths:

.../vbd/<domain>/51712/oracle/active-physical-device = "<major>:<minor>"
.../vbd/<domain>/51712/oracle/physical-device-change-status = "<error>"

Orabug: 28651655

Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/block/xen-blkback/xenbus.c
include/xen/interface/io/blkif.h