[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v1 1/2] tools: unhook blktap1 from the build and remove all references to it
This was disabled by default in Xen 4.4. Since xend has now been removed from the tree I don't believe anything is using it. We need to pass an explicit CONFIG_BLKTAP1=n to qemu-xen-traditional otherwise it defaults to y and doesn't build. This patch does all the ground work, the tools/blktap directory will be removed in the next (*huge*) patch. Note that this has no impact on blktap2, which is what libxl supports. blktap1 was only usable via xend which has already been removed. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- INSTALL | 1 - config/Tools.mk.in | 1 - tools/Makefile | 2 +- tools/configure | 29 +-------- tools/configure.ac | 4 +- tools/hotplug/Linux/Makefile | 1 - tools/hotplug/Linux/blktap | 94 ------------------------------ tools/hotplug/Linux/xen-backend.rules.in | 2 - 8 files changed, 3 insertions(+), 131 deletions(-) delete mode 100644 tools/hotplug/Linux/blktap diff --git a/INSTALL b/INSTALL index 71dd0eb..33f65ba 100644 --- a/INSTALL +++ b/INSTALL @@ -142,7 +142,6 @@ this detection and the sysv runlevel scripts have to be used. The old backend drivers are disabled because qdisk is now the default. This option can be used to build them anyway. - --enable-blktap1 --enable-blktap2 Build various stubom components, some are only example code. Its usually diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 89de5bd..30267fa 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -57,7 +57,6 @@ CONFIG_ROMBIOS := @rombios@ CONFIG_SEABIOS := @seabios@ CONFIG_QEMU_TRAD := @qemu_traditional@ CONFIG_QEMU_XEN := @qemu_xen@ -CONFIG_BLKTAP1 := @blktap1@ CONFIG_BLKTAP2 := @blktap2@ CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@ CONFIG_REMUS_NETBUF := @remus_netbuf@ diff --git a/tools/Makefile b/tools/Makefile index af9798a..1ad7a5d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -16,7 +16,6 @@ SUBDIRS-y += console SUBDIRS-y += xenmon SUBDIRS-y += xenstat SUBDIRS-$(CONFIG_Linux) += memshr -SUBDIRS-$(CONFIG_BLKTAP1) += blktap SUBDIRS-$(CONFIG_BLKTAP2) += blktap2 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd SUBDIRS-y += libfsimage @@ -169,6 +168,7 @@ subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find set -e; \ $(buildmakevars2shellvars); \ + export CONFIG_BLKTAP1=n; \ cd qemu-xen-traditional-dir; \ $(QEMU_ROOT)/xen-setup \ --extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \ diff --git a/tools/configure b/tools/configure index e971070..4117c83 100755 --- a/tools/configure +++ b/tools/configure @@ -700,7 +700,6 @@ rombios qemu_traditional blktap2 LINUX_BACKEND_MODULES -blktap1 debug seabios ovmf @@ -790,7 +789,6 @@ enable_xsmpolicy enable_ovmf enable_seabios enable_debug -enable_blktap1 with_linux_backend_modules enable_blktap2 enable_qemu_traditional @@ -1463,7 +1461,6 @@ Optional Features: --enable-ovmf Enable OVMF (default is DISABLED) --disable-seabios Disable SeaBIOS (default is ENABLED) --disable-debug Disable debug build of tools (default is ENABLED) - --enable-blktap1 Enable blktap1 tools (default is DISABLED) --enable-blktap2 Enable blktap2, (DEFAULT is on for Linux, otherwise off) --enable-qemu-traditional @@ -3991,29 +3988,6 @@ debug=$ax_cv_debug -# Check whether --enable-blktap1 was given. -if test "${enable_blktap1+set}" = set; then : - enableval=$enable_blktap1; -fi - - -if test "x$enable_blktap1" = "xno"; then : - - ax_cv_blktap1="n" - -elif test "x$enable_blktap1" = "xyes"; then : - - ax_cv_blktap1="y" - -elif test -z $ax_cv_blktap1; then : - - ax_cv_blktap1="n" - -fi -blktap1=$ax_cv_blktap1 - - - # Check whether --with-linux-backend-modules was given. if test "${with_linux_backend_modules+set}" = set; then : @@ -4037,7 +4011,6 @@ usbbk pciback xen-acpi-processor blktap2 -blktap " ;; *) @@ -7935,7 +7908,7 @@ fi -if test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"; then : +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; } diff --git a/tools/configure.ac b/tools/configure.ac index 1ac63a3..72e2465 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -89,7 +89,6 @@ AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation]) AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF]) AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS]) AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools]) -AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools]) AC_ARG_WITH([linux-backend-modules], AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"], @@ -113,7 +112,6 @@ usbbk pciback xen-acpi-processor blktap2 -blktap " ;; *) @@ -338,7 +336,7 @@ 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_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [ +AS_IF(test "x$enable_blktap2" = "xyes"], [ AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])]) ]) AC_SUBST(system_aio) diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile index 1706c05..b8490f9 100644 --- a/tools/hotplug/Linux/Makefile +++ b/tools/hotplug/Linux/Makefile @@ -19,7 +19,6 @@ XEN_SCRIPTS += vif-setup XEN_SCRIPTS-$(CONFIG_REMUS_NETBUF) += remus-netbuf-setup XEN_SCRIPTS += block XEN_SCRIPTS += block-enbd block-nbd -XEN_SCRIPTS-$(CONFIG_BLKTAP1) += blktap XEN_SCRIPTS += xen-hotplug-cleanup XEN_SCRIPTS += external-device-migrate XEN_SCRIPTS += vscsi diff --git a/tools/hotplug/Linux/blktap b/tools/hotplug/Linux/blktap deleted file mode 100644 index cd30a38..0000000 --- a/tools/hotplug/Linux/blktap +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2005, XenSource Ltd. - -dir=$(dirname "$0") -. "$dir/xen-hotplug-common.sh" -. "$dir/block-common.sh" - -findCommand "$@" - -## -# check_blktap_sharing file mode -# -# Perform the sharing check for the given blktap and mode. -# -check_blktap_sharing() -{ - local file="$1" - local mode="$2" - - local base_path="$XENBUS_BASE_PATH/$XENBUS_TYPE" - for dom in $(xenstore-list "$base_path") - do - for dev in $(xenstore-list "$base_path/$dom") - do - params=$(xenstore_read_default "$base_path/$dom/$dev/params" "" | cut -d: -f2) - if [ "$file" = "$params" ] - then - - if [ "$mode" = 'w' ] - then - if ! same_vm "$dom" - then - echo 'guest' - return - fi - else - local m=$(xenstore_read_default "$base_path/$dom/$dev/mode" "") - m=$(canonicalise_mode "$m") - - if [ "$m" = 'w' ] - then - if ! same_vm "$dom" - then - echo 'guest' - return - fi - fi - fi - fi - done - done - - echo 'ok' -} - - -t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING') -if [ -n "$t" ] -then - p=$(xenstore_read "$XENBUS_PATH/params") - p=${p#tapdisk:} - # if we have a ':', chew from head including : - if echo $p | grep -q \: - then - p=${p#*:} - fi -fi -# some versions of readlink cannot be passed a regular file -if [ -L "$p" ]; then - file=$(readlink -f "$p") || fatal "$p link does not exist." -else - file="$p" -fi - -if [ "$command" = 'add' ] -then - [ -e "$file" ] || { fatal $file does not exist; } - - FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id") - FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm") - mode=$(xenstore_read "$XENBUS_PATH/mode") - mode=$(canonicalise_mode "$mode") - - if [ "$mode" != '!' ] - then - result=$(check_blktap_sharing "$file" "$mode") - [ "$result" = 'ok' ] || ebusy "$file already in use by other domain" - fi - - success -fi - -exit 0 diff --git a/tools/hotplug/Linux/xen-backend.rules.in b/tools/hotplug/Linux/xen-backend.rules.in index 7d2f914..ee107af 100644 --- a/tools/hotplug/Linux/xen-backend.rules.in +++ b/tools/hotplug/Linux/xen-backend.rules.in @@ -1,4 +1,3 @@ -SUBSYSTEM=="xen-backend", KERNEL=="tap*", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/blktap $env{ACTION}" SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/block $env{ACTION}" SUBSYSTEM=="xen-backend", KERNEL=="vif2-*", RUN+="@XEN_SCRIPT_DIR@/vif2 $env{ACTION}" SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="online", RUN+="@XEN_SCRIPT_DIR@/vif-setup online type_if=vif" @@ -6,7 +5,6 @@ SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ENV{UDEV_CALL}="1", ACTION=="offline" SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="@XEN_SCRIPT_DIR@/vscsi $env{ACTION}" SUBSYSTEM=="xen-backend", ACTION=="remove", ENV{UDEV_CALL}="1", RUN+="@XEN_SCRIPT_DIR@/xen-hotplug-cleanup" KERNEL=="evtchn", NAME="xen/%k" -SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600" SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", MODE="0600" KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600" KERNEL=="gntdev", NAME="xen/%k", MODE="0600" -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |