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
)
This commit is contained in:
parent
580272ed41
commit
1777a1e589
@ -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…
Reference in New Issue
Block a user