virtio-scsi: reset SCSI devices from main loop thread

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2155748
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=51078944
Upstream status: merged
Signed-off-by: Stefan Hajnoczi stefanha@redhat.com

virtio-scsi with IOThread enabled has issues with hot unplug. These patches ensure that SCSIDevices are removed in a thread-safe way.

Hot unplug runs in the main thread and must take into account that the virtio-scsi device may be processing I/O in an IOThread. SCSI Task Management Functions that reset SCSI devices must do so from the main loop thread, just like other qdev lifecycle operations.

Edited by Miroslav Rezanina

Merge request reports

Loading