All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/hotplug: remove xen-hotplug-cleanup
@ 2018-10-30 23:56 Marek Marczykowski-Górecki
  2018-10-31  9:37 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Marczykowski-Górecki @ 2018-10-30 23:56 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Marek Marczykowski-Górecki

Since udev is no longer used to call hotplug scripts (neither in dom0
nor driver domain), this scripts is no longer referenced anywhere. libxl
(xl devd or else) has own cleanup code.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 tools/hotplug/Linux/Makefile            |  1 -
 tools/hotplug/Linux/xen-hotplug-cleanup | 45 -------------------------
 2 files changed, 46 deletions(-)
 delete mode 100644 tools/hotplug/Linux/xen-hotplug-cleanup

diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index 3b51fe4a62..3a90990594 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -11,7 +11,6 @@ XEN_SCRIPTS += vif-setup
 XEN_SCRIPTS-$(CONFIG_LIBNL) += remus-netbuf-setup
 XEN_SCRIPTS += block
 XEN_SCRIPTS += block-enbd block-nbd
-XEN_SCRIPTS += xen-hotplug-cleanup
 XEN_SCRIPTS += external-device-migrate
 XEN_SCRIPTS += vscsi
 XEN_SCRIPTS += block-iscsi
diff --git a/tools/hotplug/Linux/xen-hotplug-cleanup b/tools/hotplug/Linux/xen-hotplug-cleanup
deleted file mode 100644
index fcaa8fc8c6..0000000000
--- a/tools/hotplug/Linux/xen-hotplug-cleanup
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/bash
-
-dir=$(dirname "$0")
-. "$dir/xen-hotplug-common.sh"
-
-# Claim the lock protecting ${XEN_SCRIPT_DIR}/block.  This stops a race whereby
-# paths in the store would disappear underneath that script as it attempted to
-# read from the store checking for device sharing.
-# Any other scripts that do similar things will have to have their lock
-# claimed too.
-# This is pretty horrible, but there's not really a nicer way of solving this.
-claim_lock "block"
-
-# split backend/DEVCLASS/VMID/DEVID on slashes
-path_array=( ${XENBUS_PATH//\// } )
-# get /vm/UUID path
-vm=$(xenstore_read_default "/local/domain/${path_array[2]}/vm" "")
-# construct /vm/UUID/device/DEVCLASS/DEVID
-if [ "$vm" != "" ]; then
-  vm_dev="$vm/device/${path_array[1]}/${path_array[3]}"
-
-  # if the vm path does not exist and the device class is 'vbd' then we may have
-  # a tap2 device
-  $(xenstore-read "$vm_dev" 2>/dev/null) || \
-  {
-     if [ "${path_array[1]}" = "vbd" ]; then
-        vm_dev="$vm/device/tap2/${path_array[3]}"
-     fi
-  }
-else
-  vm_dev=
-fi
-
-# remove device frontend store entries
-xenstore-rm -t \
-  $(xenstore-read "$XENBUS_PATH/frontend" 2>/dev/null) 2>/dev/null || true
-
-# remove device backend store entries
-xenstore-rm -t "$XENBUS_PATH"        2>/dev/null || true
-xenstore-rm -t "error/$XENBUS_PATH"  2>/dev/null || true
-
-# remove device path from /vm/UUID
-[ "$vm_dev" != "" ] && xenstore-rm -t "$vm_dev" 2>/dev/null || true
-
-release_lock "block"
-- 
2.17.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/hotplug: remove xen-hotplug-cleanup
  2018-10-30 23:56 [PATCH] tools/hotplug: remove xen-hotplug-cleanup Marek Marczykowski-Górecki
@ 2018-10-31  9:37 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2018-10-31  9:37 UTC (permalink / raw)
  To: Marek Marczykowski-Górecki; +Cc: xen-devel, Ian Jackson, Wei Liu

On Wed, Oct 31, 2018 at 12:56:59AM +0100, Marek Marczykowski-Górecki wrote:
> Since udev is no longer used to call hotplug scripts (neither in dom0
> nor driver domain), this scripts is no longer referenced anywhere. libxl
> (xl devd or else) has own cleanup code.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-31  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 23:56 [PATCH] tools/hotplug: remove xen-hotplug-cleanup Marek Marczykowski-Górecki
2018-10-31  9:37 ` Wei Liu

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.