]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools: remove blktap2 related code and documentation
authorWei Liu <wei.liu2@citrix.com>
Mon, 15 Aug 2016 10:32:56 +0000 (11:32 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 May 2019 15:19:45 +0000 (16:19 +0100)
Blktap2 is effectively dead for a few years.

Notable changes in this patch:

0. Unhook blktap2 from build system
1. libxl no longer supports TAP disk backend, with appropriate assertions
   added and some code paths now return ERROR_FAIL
2. Tap is no longer a supported backend
3. Remove blktap2 entry from MAINTAINERS

A patch to remove blktap2 directory will come later.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
24 files changed:
.gitignore
.hgignore
INSTALL
MAINTAINERS
config/Tools.mk.in
docs/man/xl-disk-configuration.5.pod
tools/Makefile
tools/Rules.mk
tools/config.h.in
tools/configure
tools/configure.ac
tools/golang/xenlight/xenlight.go
tools/libxl/Makefile
tools/libxl/check-xl-disk-parse
tools/libxl/libxl_blktap2.c [deleted file]
tools/libxl/libxl_device.c
tools/libxl/libxl_disk.c
tools/libxl/libxl_dm.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_noblktap2.c [deleted file]
tools/libxl/xenlight.pc.in
tools/xenstore/hashtable.c
tools/xenstore/hashtable.h
tools/xenstore/hashtable_private.h

index 3822bb75ba67f8232e6cafec031af831656bd67a..049ccb87e1c02e18913be0119d2853bf6a00252f 100644 (file)
@@ -115,20 +115,6 @@ tools/libs/foreignmemory/headers.chk
 tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
 tools/libs/devicemodel/xendevicemodel.pc
-tools/blktap2/control/xenblktapctl.pc
-tools/blktap2/daemon/blktapctrl
-tools/blktap2/drivers/img2qcow
-tools/blktap2/drivers/lock-util
-tools/blktap2/drivers/qcow-create
-tools/blktap2/drivers/qcow2raw
-tools/blktap2/drivers/tapdisk
-tools/blktap2/drivers/tapdisk-client
-tools/blktap2/drivers/tapdisk-diff
-tools/blktap2/drivers/tapdisk-stream
-tools/blktap2/drivers/tapdisk2
-tools/blktap2/drivers/td-util
-tools/blktap2/vhd/vhd-update
-tools/blktap2/vhd/vhd-util
 tools/console/xenconsole
 tools/console/xenconsoled
 tools/console/client/_paths.h
@@ -383,7 +369,6 @@ tools/libxl/*.pyc
 tools/libxl/libxl-save-helper
 tools/libxl/test_timedereg
 tools/libxl/test_fdderegrace
-tools/blktap2/control/tap-ctl
 tools/firmware/etherboot/eb-roms.h
 tools/firmware/etherboot/gpxe-git-snapshot.tar.gz
 tools/misc/xenwatchdogd
index ded8cef5329f2c6fd199c8f5e58e1e571f389684..10025c87930b029bd7a7d27b0bef2a7f0d28252c 100644 (file)
--- a/.hgignore
+++ b/.hgignore
 ^stubdom/stubdompath\.sh$
 ^stubdom/vtpm/vtpm_manager\.h$
 ^tools/.*/build/lib.*/.*\.py$
-^tools/blktap2/control/tap-ctl$
-^tools/blktap2/drivers/img2qcow$
-^tools/blktap2/drivers/lock-util$
-^tools/blktap2/drivers/qcow-create$
-^tools/blktap2/drivers/qcow2raw$
-^tools/blktap2/drivers/tapdisk-client$
-^tools/blktap2/drivers/tapdisk-diff$
-^tools/blktap2/drivers/tapdisk-stream$
-^tools/blktap2/drivers/tapdisk2$
-^tools/blktap2/drivers/td-util$
-^tools/blktap2/vhd/vhd-update$
-^tools/blktap2/vhd/vhd-util$
 ^tools/check/\..*$
 ^tools/console/xenconsole$
 ^tools/console/xenconsoled$
diff --git a/INSTALL b/INSTALL
index 1665ddd6a43aa7204d11c0abd08c64564ec10c6a..aa08562b8a6c4f548c923360a0e8334d1fb4b5ac 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -144,10 +144,6 @@ this detection and the sysv runlevel scripts have to be used.
   --with-systemd=DIR
   --with-systemd-modules-load=DIR
 
-The old backend drivers are disabled because qdisk is now the default.
-This option can be used to build them anyway.
-  --enable-blktap2
-
 Build various stubom components, some are only example code. Its usually
 enough to specify just --enable-stubdom and leave these options alone.
   --enable-ioemu-stubdom
index 1f422d96a80033c95e437584281bbbe783f96525..8a1e0402585740ba471cad4f6ef183f9228370cf 100644 (file)
@@ -192,10 +192,6 @@ F: xen/include/asm-arm/
 F:     xen/include/public/arch-arm/
 F:     xen/include/public/arch-arm.h
 
-BLKTAP2
-S:     Orphaned
-F:     tools/blktap2/
-
 Continuous Integration (CI)
 M:     Doug Goldstein <cardoe@cardoe.com>
 W:     https://gitlab.com/xen-project/xen
index 84ddb1a5427cbee8e63c8877d3033babd524f39f..189fda1596a8f85312a195f9de1b0199f132b702 100644 (file)
@@ -53,7 +53,6 @@ CONFIG_SEABIOS      := @seabios@
 CONFIG_IPXE         := @ipxe@
 CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
-CONFIG_BLKTAP2      := @blktap2@
 CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
 CONFIG_LIBNL        := @libnl@
 
index eea893ef9117bc845bea2305fd2cdd3c886949b8..7965d5dd73f3c47fcb393ee9e37d884489abc969 100644 (file)
@@ -232,7 +232,7 @@ Specifies the backend implementation to use
 
 =item Supported values
 
-phy, tap, qdisk
+phy, qdisk
 
 =item Mandatory
 
index 99cbc950dc6c604e9796158c154a803edfd12abf..7b1f6c4d28681292a0204f49220acd9495792acb 100644 (file)
@@ -20,7 +20,6 @@ SUBDIRS-y += console
 SUBDIRS-y += xenmon
 SUBDIRS-y += xenstat
 SUBDIRS-$(CONFIG_Linux) += memshr 
-SUBDIRS-$(CONFIG_BLKTAP2) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(CONFIG_Linux) += libvchan
index f5613f73a753e6869e984c3b6ade29c59cc183a2..cf8935d6a3eab7da3cf9a3c36e1233b46cddfa4a 100644 (file)
@@ -25,7 +25,6 @@ XEN_XENLIGHT       = $(XEN_ROOT)/tools/libxl
 XEN_XLUTIL         = $(XEN_XENLIGHT)
 XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
 XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
-XEN_BLKTAP2        = $(XEN_ROOT)/tools/blktap2
 XEN_LIBVCHAN       = $(XEN_ROOT)/tools/libvchan
 
 CFLAGS_xeninclude = -I$(XEN_INCLUDE)
@@ -174,21 +173,8 @@ else
 CFLAGS += -O2 -fomit-frame-pointer
 endif
 
-ifeq ($(CONFIG_BLKTAP2),y)
-CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude)
-SHDEPS_libblktapctl =
-LDLIBS_libblktapctl = $(SHDEPS_libblktapctl) $(XEN_BLKTAP2)/control/libblktapctl$(libextension)
-SHLIB_libblktapctl  = $(SHDEPS_libblktapctl) -Wl,-rpath-link=$(XEN_BLKTAP2)/control
-else
-CFLAGS_libblktapctl =
-SHDEPS_libblktapctl =
-LDLIBS_libblktapctl =
-SHLIB_libblktapctl  =
-PKG_CONFIG_REMOVE += xenblktapctl
-endif
-
 CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
-SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl)
+SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
 LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_XENLIGHT)/libxenlight$(libextension)
 SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_XENLIGHT)
 
index 5987f087b85f2898e68a1f96c9226e0bc7441a33..5a5944ebe110e03cd6d5e1a35f5d2296d799fdc3 100644 (file)
@@ -3,9 +3,6 @@
 /* Enabling support partial device tree in libxl */
 #undef ENABLE_PARTIAL_DEVICE_TREE
 
-/* Blktap2 enabled */
-#undef HAVE_BLKTAP2
-
 /* Define to 1 if you have the declaration of `fdt_first_subnode', and to 0 if
    you don't. */
 #undef HAVE_DECL_FDT_FIRST_SUBNODE
@@ -27,9 +24,6 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the `aio' library (-laio). */
-#undef HAVE_LIBAIO
-
 /* Define to 1 if you have the `fdt' library (-lfdt). */
 #undef HAVE_LIBFDT
 
index 0be0be75de6a7fdaacbd3314a04ea5135127d1c1..1baacea9aca9edeff900979aea0d443eb3d1e8e9 100755 (executable)
@@ -704,7 +704,6 @@ BCC
 LD86
 AS86
 qemu_traditional
-blktap2
 LINUX_BACKEND_MODULES
 seabios
 ovmf
@@ -809,7 +808,6 @@ enable_xsmpolicy
 enable_ovmf
 enable_seabios
 with_linux_backend_modules
-enable_blktap2
 enable_qemu_traditional
 enable_rombios
 with_system_qemu
@@ -1495,7 +1493,6 @@ Optional Features:
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
-  --enable-blktap2        Enable blktap2, (DEFAULT is off)
   --enable-qemu-traditional
                           Enable qemu traditional device model, (DEFAULT is on
                           for Linux or NetBSD x86, otherwise off)
@@ -4225,7 +4222,6 @@ xen-scsibk
 usbbk
 pciback
 xen-acpi-processor
-blktap2
 "
 ;;
 *)
@@ -4237,29 +4233,6 @@ fi
 LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`"
 
 
-# Check whether --enable-blktap2 was given.
-if test "${enable_blktap2+set}" = set; then :
-  enableval=$enable_blktap2;
-else
-
-        enable_blktap2="no"
-
-fi
-
-if test "x$enable_blktap2" = "xyes"; then :
-
-
-$as_echo "#define HAVE_BLKTAP2 1" >>confdefs.h
-
-    blktap2=y
-else
-
-    blktap2=n
-
-fi
-
-
-
 # Check whether --enable-qemu-traditional was given.
 if test "${enable_qemu_traditional+set}" = set; then :
   enableval=$enable_qemu_traditional;
@@ -8471,57 +8444,6 @@ fi
 
 
 
-if test "x$enable_blktap2" = "xyes"; then :
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for io_setup in -laio" >&5
-$as_echo_n "checking for io_setup in -laio... " >&6; }
-if ${ac_cv_lib_aio_io_setup+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-laio  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char io_setup ();
-int
-main ()
-{
-return io_setup ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_aio_io_setup=yes
-else
-  ac_cv_lib_aio_io_setup=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_io_setup" >&5
-$as_echo "$ac_cv_lib_aio_io_setup" >&6; }
-if test "x$ac_cv_lib_aio_io_setup" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBAIO 1
-_ACEOF
-
-  LIBS="-laio $LIBS"
-
-else
-  as_fn_error $? "Could not find libaio" "$LINENO" 5
-fi
-
-
-fi
 
 
 ac_fn_c_check_header_mongrel "$LINENO" "ext2fs/ext2fs.h" "ac_cv_header_ext2fs_ext2fs_h" "$ac_includes_default"
index fcf282e74e9411b35ad2b1ca70a9052726c58d69..3fe04907a2b42988d22f0a843f5cf83cac6e7069 100644 (file)
@@ -106,7 +106,6 @@ xen-scsibk
 usbbk
 pciback
 xen-acpi-processor
-blktap2
 "
 ;;
 *)
@@ -116,20 +115,6 @@ esac])
 LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`"
 AC_SUBST(LINUX_BACKEND_MODULES)
 
-dnl Enable blktap2 on Linux only.
-AC_ARG_ENABLE([blktap2],
-    AS_HELP_STRING([--enable-blktap2],
-                   [Enable blktap2, (DEFAULT is off)]),,[
-        enable_blktap2="no"
-])
-AS_IF([test "x$enable_blktap2" = "xyes"], [
-AC_DEFINE([HAVE_BLKTAP2], [1], [Blktap2 enabled])
-    blktap2=y],[
-    blktap2=n
-])
-AC_SUBST(blktap2)
-
-
 AC_ARG_ENABLE([qemu-traditional],
     AS_HELP_STRING([--enable-qemu-traditional],
                    [Enable qemu traditional device model, (DEFAULT is on for Linux or NetBSD x86, otherwise off)]),,[
@@ -402,9 +387,6 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [
 AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"])
 ])
 AC_SUBST(zlib)
-AS_IF([test "x$enable_blktap2" = "xyes"], [
-AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
-])
 AC_SUBST(system_aio)
 AX_CHECK_EXTFS
 AX_CHECK_PTHREAD
index 9c37e59ec0b609a76d1baf93d2d51e88c504db1c..53534d047e2fbd8f8c2bfc0c8c838e73968a159c 100644 (file)
@@ -28,7 +28,7 @@ import "C"
  *  -lnl-route-3 -lnl-3
  *
  * To get back to static linking:
- * #cgo LDFLAGS: -lxenlight -lyajl_s -lxengnttab -lxenstore -lxenguest -lxentoollog -lxenevtchn -lxenctrl -lblktapctl -lxenforeignmemory -lxencall -lz -luuid -lutil
+ * #cgo LDFLAGS: -lxenlight -lyajl_s -lxengnttab -lxenstore -lxenguest -lxentoollog -lxenevtchn -lxenctrl -lxenforeignmemory -lxencall -lz -luuid -lutil
  */
 
 import (
index 5015ecbf27372fef551b5ff8e984f1230fde0b5f..6fdcbbddd6b667982a2a6fb7897d01139be7ac9e 100644 (file)
@@ -20,7 +20,7 @@ LIBUUID_LIBS += -luuid
 endif
 
 LIBXL_LIBS =
-LIBXL_LIBS = $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(LDLIBS_libxentoolcore) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
+LIBXL_LIBS = $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libxentoolcore) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
 ifeq ($(CONFIG_LIBNL),y)
 LIBXL_LIBS += $(LIBNL3_LIBS)
 endif
@@ -31,7 +31,6 @@ CFLAGS_LIBXL += $(CFLAGS_libxenevtchn)
 CFLAGS_LIBXL += $(CFLAGS_libxenctrl)
 CFLAGS_LIBXL += $(CFLAGS_libxenguest)
 CFLAGS_LIBXL += $(CFLAGS_libxenstore)
-CFLAGS_LIBXL += $(CFLAGS_libblktapctl) 
 ifeq ($(CONFIG_LIBNL),y)
 CFLAGS_LIBXL += $(LIBNL3_CFLAGS)
 endif
@@ -47,11 +46,6 @@ LIBXL_LIBS += $(LIBXL_LIBS-y)
 LIBXLU_LIBS = $(LDLIBS_libxenlight)
 
 LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o flexarray.o
-ifeq ($(CONFIG_BLKTAP2),y)
-LIBXL_OBJS-y += libxl_blktap2.o
-else
-LIBXL_OBJS-y += libxl_noblktap2.o
-endif
 
 ifeq ($(CONFIG_LIBNL),y)
 LIBXL_OBJS-y += libxl_netbuffer.o
index 03572e447175a208e5cb6aeb4776099c36a528ce..643f4f4ecb89ce3d58148e50e6da91017ac7bc1a 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 if [ -x ./xl ] ; then
-    export LD_LIBRARY_PATH=.:../libxc:../xenstore:../blktap2/control
+    export LD_LIBRARY_PATH=.:../libxc:../xenstore
     XL=./xl
 else
     XL=xl
diff --git a/tools/libxl/libxl_blktap2.c b/tools/libxl/libxl_blktap2.c
deleted file mode 100644 (file)
index 5c9a0a2..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2010      Advanced Micro Devices
- * Author Christoph Egger <Christoph.Egger@amd.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-#include "libxl_osdeps.h" /* must come before any other headers */
-#include "libxl_internal.h"
-
-#include "tap-ctl.h"
-
-int libxl__blktap_enabled(libxl__gc *gc)
-{
-    const char *msg;
-    return !tap_ctl_check(&msg);
-}
-
-char *libxl__blktap_devpath(libxl__gc *gc,
-                            const char *disk,
-                            libxl_disk_format format)
-{
-    const char *type;
-    char *params, *devname = NULL;
-    tap_list_t tap;
-    int err;
-
-    type = libxl__device_disk_string_of_format(format);
-    err = tap_ctl_find(type, disk, &tap);
-    if (err == 0) {
-        devname = GCSPRINTF("/dev/xen/blktap-2/tapdev%d", tap.minor);
-        if (devname)
-            return devname;
-    }
-
-    params = GCSPRINTF("%s:%s", type, disk);
-    err = tap_ctl_create(params, &devname);
-    if (!err) {
-        libxl__ptr_add(gc, devname);
-        return devname;
-    }
-
-    free(devname);
-    return NULL;
-}
-
-
-int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
-{
-    char *type, *disk;
-    int err;
-    tap_list_t tap;
-
-    type = libxl__strdup(gc, params);
-
-    disk = strchr(type, ':');
-    if (!disk) {
-        LOG(ERROR, "Unable to parse params %s", params);
-        return ERROR_INVAL;
-    }
-
-    *disk++ = '\0';
-
-    err = tap_ctl_find(type, disk, &tap);
-    if (err < 0) {
-        /* returns -errno */
-        LOGEV(ERROR, -err, "Unable to find type %s disk %s", type, disk);
-        return ERROR_FAIL;
-    }
-
-    err = tap_ctl_destroy(tap.id, tap.minor);
-    if (err < 0) {
-        LOGEV(ERROR, -err, "Failed to destroy tap device id %d minor %d",
-              tap.id, tap.minor);
-        return ERROR_FAIL;
-    }
-
-    return 0;
-}
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
index 87ddfc3ac70862a5d28d2b553221480b46e2a532..f8340ba815e294d310454096bc0f95bd77fae10c 100644 (file)
@@ -321,26 +321,9 @@ static int disk_try_backend(disk_try_backend_args *a,
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
-        if (a->disk->script) goto bad_script;
-
-        if (libxl_defbool_val(a->disk->colo_enable))
-            goto bad_colo;
-
-        if (a->disk->is_cdrom) {
-            LOG(DEBUG, "Disk vdev=%s, backend tap unsuitable for cdroms",
-                       a->disk->vdev);
-            return 0;
-        }
-        if (!libxl__blktap_enabled(a->gc)) {
-            LOG(DEBUG, "Disk vdev=%s, backend tap unsuitable because blktap "
-                       "not available", a->disk->vdev);
-            return 0;
-        }
-        if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
-              a->disk->format == LIBXL_DISK_FORMAT_VHD)) {
-            goto bad_format;
-        }
-        return backend;
+        LOG(DEBUG, "Disk vdev=%s, backend tap unsuitable because blktap "
+                   "not available", a->disk->vdev);
+        return 0;
 
     case LIBXL_DISK_BACKEND_QDISK:
         if (a->disk->script) goto bad_script;
@@ -746,19 +729,11 @@ int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
     const char *be_path = NULL;
     const char *fe_path = NULL;
     const char *libxl_path = libxl__device_libxl_path(gc, dev);
-    const char *tapdisk_path = NULL;
-    const char *tapdisk_params = NULL;
     xs_transaction_t t = 0;
     int rc;
     uint32_t domid;
     int libxl_only = dev->backend_kind == LIBXL__DEVICE_KIND_NONE;
 
-    if (!libxl_only) {
-        be_path = libxl__device_backend_path(gc, dev);
-        fe_path = libxl__device_frontend_path(gc, dev);
-        tapdisk_path = GCSPRINTF("%s/%s", be_path, "tapdisk-params");
-    }
-
     rc = libxl__get_domid(gc, &domid);
     if (rc) goto out;
 
@@ -766,12 +741,6 @@ int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
         rc = libxl__xs_transaction_start(gc, &t);
         if (rc) goto out;
 
-        /* May not exist if this is not a tap device */
-        if (tapdisk_path) {
-            rc = libxl__xs_read_checked(gc, t, tapdisk_path, &tapdisk_params);
-            if (rc) goto out;
-        }
-
         if (domid == LIBXL_TOOLSTACK_DOMID) {
             /*
              * The toolstack domain is in charge of removing the
@@ -794,9 +763,6 @@ int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
         if (rc < 0) goto out;
     }
 
-    if (tapdisk_params)
-        rc = libxl__device_destroy_tapdisk(gc, tapdisk_params);
-
 out:
     libxl__xs_transaction_abort(gc, &t);
     return rc;
index 79e30f8d52bf63a1b42d584722eeab3ba5616a41..bc9e2d5a74e223601c08dc708ccadac4078cc9dd 100644 (file)
@@ -321,7 +321,6 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
 
-        do_backend_phy:
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
@@ -333,27 +332,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
                 break;
 
             case LIBXL_DISK_BACKEND_TAP:
-                if (dev == NULL) {
-                    dev = libxl__blktap_devpath(gc, disk->pdev_path,
-                                                disk->format);
-                    if (!dev) {
-                        LOGD(ERROR, domid, "Failed to get blktap devpath for %p",
-                             disk->pdev_path);
-                        rc = ERROR_FAIL;
-                        goto out;
-                    }
-                }
-                flexarray_append(back, "tapdisk-params");
-                flexarray_append(back, GCSPRINTF("%s:%s",
-                    libxl__device_disk_string_of_format(disk->format),
-                    disk->pdev_path));
-
-                /* tap backends with scripts are rejected by
-                 * libxl__device_disk_set_backend */
-                assert(!disk->script);
-
-                /* now create a phy device to export the device to the guest */
-                goto do_backend_phy;
+                LOG(ERROR, "blktap is not supported");
+                rc = ERROR_FAIL;
+                goto out;
             case LIBXL_DISK_BACKEND_QDISK:
                 flexarray_append(back, "params");
                 flexarray_append(back, GCSPRINTF("%s:%s",
index 086e5663113d9c25350a2b0e1157926cb985cd19..209deedce6e74ee7ddc5f8ca12a75aa0c1f1670e 100644 (file)
@@ -1812,20 +1812,9 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
                     continue;
                 }
 
-                /*
-                 * We can't call libxl__blktap_devpath from
-                 * libxl__device_disk_find_local_path for now because
-                 * the bootloader is called before the disks are set
-                 * up, so this function would set up a blktap node,
-                 * but there's no TAP tear-down on error conditions in
-                 * the bootloader path.
-                 */
-                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
-                    target_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
-                                                        disks[i].format);
-                else
-                    target_path = libxl__device_disk_find_local_path(gc,
-                                                 guest_domid, &disks[i], true);
+                assert(disks[i].backend != LIBXL_DISK_BACKEND_TAP);
+                target_path = libxl__device_disk_find_local_path(gc,
+                                    guest_domid, &disks[i], true);
 
                 if (!target_path) {
                     LOGD(WARN, guest_domid, "No way to get local access disk to image: %s\n"
index 25f113404b13adfddffdf5471843e50328fa5bee..698cf70356e15cd98d69b2e163fe1de6de154ce0 100644 (file)
@@ -1892,32 +1892,6 @@ struct libxl__cpuid_policy {
     char *policy[4];
 };
 
-/*
- * blktap2 support
- */
-
-/* libxl__blktap_enabled:
- *    return true if blktap/blktap2 support is available.
- */
-_hidden int libxl__blktap_enabled(libxl__gc *gc);
-
-/* libxl__blktap_devpath:
- *    Argument: path and disk image as specified in config file.
- *      The type specifies whether this is aio, qcow, qcow2, etc.
- *    returns device path xenstore wants to have. returns NULL
- *      if no device corresponds to the disk.
- */
-_hidden char *libxl__blktap_devpath(libxl__gc *gc,
-                                    const char *disk,
-                                    libxl_disk_format format);
-
-/* libxl__device_destroy_tapdisk:
- *   Destroys any tapdisk process associated with the backend represented
- *   by be_path.
- *   Always logs on failure.
- */
-_hidden int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params);
-
 /* Calls poll() again - useful to check whether a signaled condition
  * is still true.  Cannot fail.  Returns currently-true revents. */
 _hidden short libxl__fd_poll_recheck(libxl__egc *egc, int fd, short events);
diff --git a/tools/libxl/libxl_noblktap2.c b/tools/libxl/libxl_noblktap2.c
deleted file mode 100644 (file)
index 5a86ed1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010      Advanced Micro Devices
- * Author Christoph Egger <Christoph.Egger@amd.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-#include "libxl_osdeps.h" /* must come before any other headers */
-
-#include "libxl_internal.h"
-
-int libxl__blktap_enabled(libxl__gc *gc)
-{
-    return 0;
-}
-
-char *libxl__blktap_devpath(libxl__gc *gc,
-                            const char *disk,
-                            libxl_disk_format format)
-{
-    return NULL;
-}
-
-int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
-{
-    return 0;
-}
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
index 86c38a5634db0516c2e02ca5a4f0430b9b13a2a3..c0f769fd2086f2a53f9fd6d13beb5af514fbb969 100644 (file)
@@ -9,4 +9,4 @@ Description: The Xenlight library for Xen hypervisor
 Version: @@version@@
 Cflags: -I${includedir}
 Libs: @@libsflag@@${libdir} -lxenlight
-Requires.private: xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenblktapctl
+Requires.private: xentoollog,xenevtchn,xencontrol,xenguest,xenstore
index 0ba1d552f10d2d9bb789c6626b66b991ff0290e3..394b1cf9d0cba94dd1354ba1803e07e29d19b1f3 100644 (file)
@@ -1,10 +1,5 @@
 /* Copyright (C) 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */
 
-/*
- * There are duplicates of this code in:
- *  - tools/blktap2/drivers/hashtable.c
- */
-
 #include "hashtable.h"
 #include "hashtable_private.h"
 #include <stdlib.h>
index 4d6822354e4fea9373884eb14ac2d9d67b7e607e..b90781abd4a75e6f910cf1450c8ad159bdeac33a 100644 (file)
@@ -1,10 +1,5 @@
 /* Copyright (C) 2002 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */
 
-/*
- * There are duplicates of this code in:
- *  - tools/blktap2/drivers/hashtable.h
- */
-
 #ifndef __HASHTABLE_CWC22_H__
 #define __HASHTABLE_CWC22_H__
 
index a08559d5dfbe5056ff499ab70d8a0ad2efe07237..3e95f600577540095d20b2551d1198556cf36361 100644 (file)
@@ -1,10 +1,5 @@
 /* Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> */
 
-/*
- * There are duplicates of this code in:
- *  - tools/blktap2/drivers/hashtable_private.h
- */
-
 #ifndef __HASHTABLE_PRIVATE_CWC22_H__
 #define __HASHTABLE_PRIVATE_CWC22_H__