Skip to content

Commit 9d27f7f

Browse files
committed
ext/block: do not suppress device-removed event on VM shutdown
Send all device-removed events on VM shutdown, skip only detaching devices, not events. QubesOS/qubes-issues#8537
1 parent ef09d2e commit 9d27f7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qubes/ext/block.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,10 @@ async def on_domain_shutdown(self, vm, event, **_kwargs):
646646
new_cache[domain.name] = {}
647647
if domain == vm:
648648
for dev_id, front_vm in self.devices_cache[domain.name].items():
649-
if front_vm is None:
650-
continue
651649
dev = BlockDevice(Port(vm, dev_id, "block"))
652650
vm.fire_event("device-removed:block", port=dev.port)
651+
if front_vm is None:
652+
continue
653653
await self.detach_and_notify(front_vm, dev.port)
654654
continue
655655
for dev_id, front_vm in self.devices_cache[domain.name].items():

0 commit comments

Comments
 (0)