Il 18/09/2014 04:36, Fam Zheng ha scritto:
> @@ -552,7 +552,7 @@ SCSIRequest *scsi_req_alloc(const SCSIReqOps *reqops, 
> SCSIDevice *d,
>      SCSIBus *bus = scsi_bus_from_device(d);
>      BusState *qbus = BUS(bus);
>  
> -    req = g_malloc0(reqops->size);
> +    req = g_malloc0(reqops ? reqops->size : sizeof(SCSIRequest));

Let's just add a NotifierList to SCSIRequest instead, and pass a
Notifier to scsi_req_cancel_async.  There can be multiple aborts for the
same SCSIRequest, we can leave it to the HBA to create a Notifier for
each TMF.

The notifier can be embedded in a struct to track the request count, as
mentioned in the other message I just sent.

Paolo

Reply via email to