diff mbox

[4/4] libxl: remove code added to use the 'phy' backend with CDROM devices

Message ID 1460051129-20817-5-git-send-email-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné April 7, 2016, 5:45 p.m. UTC
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_device.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Wei Liu April 8, 2016, 1:30 p.m. UTC | #1
On Thu, Apr 07, 2016 at 07:45:29PM +0200, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  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)
>
Ian Jackson April 8, 2016, 3:07 p.m. UTC | #2
Roger Pau Monne writes ("[PATCH 4/4] libxl: remove code added to use the 'phy' backend with CDROM devices"):
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

This is, AFAICT, a partial revert.  The commit message ought to say
which commit (by commit hash and by title) is being reverted.

Also, like any commit, it should explain why the change is being
made...

Thanks,
Ian.
diff mbox

Patch

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);