From 11365e353eaa2f0ac18ffdb0bf556d1905075cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 30 Mar 2015 04:54:37 +0200 Subject: [PATCH] udev: ignore temporary devices created during VM startup (cherry picked from commit c731fa5b28580c0e97e293f9b5f3fe8aee15147e) --- udev/udev-block-add-change | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/udev/udev-block-add-change b/udev/udev-block-add-change index fe90f29..a59356c 100755 --- a/udev/udev-block-add-change +++ b/udev/udev-block-add-change @@ -34,6 +34,13 @@ if [ "$MAJOR" -eq 7 -a ! -d /sys/$DEVPATH/loop ]; then xs_remove exit 0 fi +# ... and temporary device-mapper devices used during VM startup +if [[ "$DM_NAME" = 'loop'* ] && \ + [[ "`cat /sys/block/${DM_NAME%p*}/loop/backing_file`" = \ + '/var/lib/qubes/'*'/volatile.img' ]]; then + xs_remove + exit 0 +fi # Check if device is read-only if [ "`cat /sys/$DEVPATH/ro`" -eq 1 ]; then