From 4449d51d985b6c000107ce30ba84ec0c49160735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 1 Feb 2015 04:05:05 +0100 Subject: [PATCH] udev: prevent race with kpartx -d udevd calls (internal) blkid, which opens the device, so kpartx -d cannot remove it. --- system-config/00-qubes-ignore-devices.rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system-config/00-qubes-ignore-devices.rules b/system-config/00-qubes-ignore-devices.rules index dfa511d..1cfed73 100644 --- a/system-config/00-qubes-ignore-devices.rules +++ b/system-config/00-qubes-ignore-devices.rules @@ -2,5 +2,9 @@ ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="1" # ENV{DM_NAME} not available yet +# Template VM disks ACTION!="remove", SUBSYSTEM=="block", ATTR{dm/name}=="snapshot-*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="1" ACTION!="remove", SUBSYSTEM=="block", ATTR{dm/name}=="origin-*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="1" +# kpartx used for creating empty volatile.img, udevd tries to access the device +# and prevent kpartx from removing them +ACTION!="remove", SUBSYSTEM=="block", ATTR{dm/name}=="loop*p*", ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="1"