This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH 1 of 7] libxl: remove impossible check for backend !=

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 7] libxl: remove impossible check for backend != DISK_BACKEND_QDISK
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 07 Apr 2011 10:52:27 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 07 Apr 2011 02:54:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1302169946@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1302169946@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302167172 -3600
# Node ID 29af1669de3ab2e7d41078eb33a0dfa9b69f09bb
# Parent  bbb1ffd81018b0b7677c8b526de118d4501f6d39
libxl: remove impossible check for backend != DISK_BACKEND_QDISK

In this case we are already in the DISK_BACKEND_QDISK case of a switch
statement on the same variable.

It is possible that we fell through from the DISK_BACKEND_TAP case
(although I'm about to remove that in a subsequent patch), however in
that case we are explicitly falling back from blktap2 to qdisk so
DEVICE_QDISK is still the right answer.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r bbb1ffd81018 -r 29af1669de3a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Apr 07 09:56:46 2011 +0100
+++ b/tools/libxl/libxl.c       Thu Apr 07 10:06:12 2011 +0100
@@ -1016,12 +1016,7 @@ int libxl_device_disk_add(libxl_ctx *ctx
             flexarray_append(back, "params");
             flexarray_append(back, libxl__sprintf(&gc, "%s:%s",
-            if (libxl__blktap_enabled(&gc) && 
-                 disk->backend != DISK_BACKEND_QDISK)
-                device.backend_kind = DEVICE_TAP;
-            else
-                device.backend_kind = DEVICE_QDISK;
+            device.backend_kind = DEVICE_QDISK;
             LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "unrecognized disk backend type: 
%d\n", disk->backend);

Xen-devel mailing list