Message ID | 1460132019-23719-5-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Apr 08, 2016 at 06:13:39PM +0200, Roger Pau Monne wrote: > This is a partial revert of 612f15, that allowed CDROM devices to use the > 'phy' PV backend. Due to limitations in the current implementation of the > libxl_cdrom_insert function, the PV backend used in conjunction with an > emulated CDROM device must always be Qdisk at the moment. This is due to > libxl_cdrom_insert not running disk hotplug scripts on plug and unplug of PV > CDROM backends (and possibly other yet to be identified issues). LGTM > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> > Acked-by: Wei Liu <wei.liu2@citrix.com> > --- > Cc: Ian Jackson <ian.jackson@eu.citrix.com> > Cc: Wei Liu <wei.liu2@citrix.com> > --- > Changes since v1: > - Added a proper commit message. > --- > tools/libxl/libxl_device.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c > index ce53520..82405a7 100644 > --- a/tools/libxl/libxl_device.c > +++ b/tools/libxl/libxl_device.c > @@ -191,20 +191,13 @@ static int disk_try_backend(disk_try_backend_args *a, > > switch (backend) { > case LIBXL_DISK_BACKEND_PHY: > - if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW || > - a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) { > + if (a->disk->format != LIBXL_DISK_FORMAT_RAW) { > goto bad_format; > } > > if (libxl_defbool_val(a->disk->colo_enable)) > goto bad_colo; > > - if (a->disk->format == LIBXL_DISK_FORMAT_EMPTY) { > - LOG(DEBUG, "Disk vdev=%s is empty, skipping physical device check", > - a->disk->vdev); > - return backend; > - } > - > if (a->disk->backend_domid != LIBXL_TOOLSTACK_DOMID) { > LOG(DEBUG, "Disk vdev=%s, is using a storage driver domain, " > "skipping physical device check", a->disk->vdev); > -- > 2.6.4 (Apple Git-63) >
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index ce53520..82405a7 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -191,20 +191,13 @@ static int disk_try_backend(disk_try_backend_args *a, switch (backend) { case LIBXL_DISK_BACKEND_PHY: - if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW || - a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) { + if (a->disk->format != LIBXL_DISK_FORMAT_RAW) { goto bad_format; } if (libxl_defbool_val(a->disk->colo_enable)) goto bad_colo; - if (a->disk->format == LIBXL_DISK_FORMAT_EMPTY) { - LOG(DEBUG, "Disk vdev=%s is empty, skipping physical device check", - a->disk->vdev); - return backend; - } - if (a->disk->backend_domid != LIBXL_TOOLSTACK_DOMID) { LOG(DEBUG, "Disk vdev=%s, is using a storage driver domain, " "skipping physical device check", a->disk->vdev);