udev-block-add-change: don't exclude already attached devs

For example, attaching a device-mapper device to another VM increases
its "dmsetup info" open count in is_used(), which triggered its removal
from qvm-block.

(cherry picked from commit 6b32378158)
release3.1
Rusty Bird 8 years ago committed by Marek Marczykowski-Górecki
parent 580272ed41
commit 1777a1e589
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -11,6 +11,10 @@ MODE=w
QDB_KEY="/qubes-block-devices/$NAME"
xs_remove() {
if is_attached /sys$DEVPATH; then
return 0
fi
if [ "$QUBES_EXPOSED" == "1" ]; then
qubesdb-rm "$QDB_KEY/"
qubesdb-write /qubes-block-devices ''

Loading…
Cancel
Save