@@ -213,11 +221,18 @@ static void scsi_qdev_realize(DeviceState *qdev, Error **errp) static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp) { SCSIDevice *dev = SCSI_DEVICE(qdev);
Error *local_err = NULL;
if (dev->vmsentry) { qemu_del_vm_change_state_handler(dev->vmsentry); }
scsi_device_unrealize(dev, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
}
scsi_device_purge_requests(dev, SENSE_CODE(NO_SENSE));
(I see this code for the first time, but) I suppose I’d put the scsi_device_unrealize() after scsi_device_purge_requests().
Max
blockdev_mark_auto_del(dev->conf.blk);
}
- shmuel.eiderman@oracle.com + sameid@google.com
Sure, I'll resubmit
Sam