qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [QEMU] [PATCH v5 4/8] scsi: Propagate unrealize() callb


From: Sam Eiderman
Subject: Re: [Qemu-devel] [QEMU] [PATCH v5 4/8] scsi: Propagate unrealize() callback to scsi-hd
Date: Sun, 25 Aug 2019 16:35:14 +0300

> @@ -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);
>  }

- address@hidden
+ address@hidden

Sure, I'll resubmit

Sam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]