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.
This commit is contained in:
parent
e7d7111f13
commit
6b32378158
@ -11,6 +11,10 @@ MODE=w
|
|||||||
QDB_KEY="/qubes-block-devices/$NAME"
|
QDB_KEY="/qubes-block-devices/$NAME"
|
||||||
|
|
||||||
xs_remove() {
|
xs_remove() {
|
||||||
|
if is_attached /sys$DEVPATH; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$QUBES_EXPOSED" == "1" ]; then
|
if [ "$QUBES_EXPOSED" == "1" ]; then
|
||||||
qubesdb-rm "$QDB_KEY/"
|
qubesdb-rm "$QDB_KEY/"
|
||||||
qubesdb-write /qubes-block-devices ''
|
qubesdb-write /qubes-block-devices ''
|
||||||
|
Loading…
Reference in New Issue
Block a user