Ian Campbell
2011-Apr-05 16:34 UTC
[Xen-devel] [PATCH] libxl: remove impossible check for backend != DISK_BACKEND_QDISK
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1302021247 -3600 # Node ID 281207ed3fb3e1bf49c91ff3bcd76af1a3ab00af # Parent 403080639e20aaf8f5a768f8f583fe0700afe84e 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. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Maybe I''m mistaken here, since the DISK_BACKEND_TAP case can fall through, but only if !libxl__blktap_enabled. I''m not sure I understand the intention of this code to actually remove the fall-through case though. I''m not convinced DEVICE_TAP is even valid -- it seems to create a tap entry in xenstore (e.g. is a blktap1 thing). The usage in libxl_device_disk_del seems particularly dubious to me. diff -r 403080639e20 -r 281207ed3fb3 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Tue Apr 05 17:26:32 2011 +0100 +++ b/tools/libxl/libxl.c Tue Apr 05 17:34:07 2011 +0100 @@ -1015,12 +1015,7 @@ int libxl_device_disk_add(libxl_ctx *ctx flexarray_append(back, "params"); flexarray_append(back, libxl__sprintf(&gc, "%s:%s", libxl__device_disk_string_of_format(disk->format), disk->pdev_path)); - - 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; break; default: LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "unrecognized disk backend type: %d\n", disk->backend); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Apparently Analagous Threads
- [PATCH] libxl: attempt to cleanup tapdisk processes on disk backend destroy
- [PATCH 1/2] 4.1.2 blktap2 cleanup fixes.
- [PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
- [PATCH] libxl: make nic 'bridge' parameter optional - do not fill default
- [PATCH] libxl: vcpu_avail is a bitmask, use it as such