All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH v1 1/2] tools: unhook blktap1 from the build and remove all references to it
Date: Tue, 13 Jan 2015 11:31:51 +0000	[thread overview]
Message-ID: <1421148711.19103.19.camel@citrix.com> (raw)
In-Reply-To: <1421147771-22544-1-git-send-email-ian.campbell@citrix.com>

On Tue, 2015-01-13 at 11:16 +0000, Ian Campbell wrote:

Ugh, this really is v2, despite the subject (because of trimming patch
#2 I had to do the format-patch and send-mail separately, which broke my
usual finger macros)

> 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@citrix.com>
> ---
>  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"

  reply	other threads:[~2015-01-13 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 11:15 [PATCH v2 0/2] tools: remove blktap1 Ian Campbell
2015-01-13 11:16 ` [PATCH v1 1/2] tools: unhook blktap1 from the build and remove all references to it Ian Campbell
2015-01-13 11:31   ` Ian Campbell [this message]
2015-01-13 12:16   ` Wei Liu
2015-01-14 16:54   ` Ian Jackson
2015-01-15 15:16     ` Ian Campbell
2015-01-13 11:16 ` [PATCH v2 2/2] tools: remove blktap1 Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421148711.19103.19.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.