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-
Il 18/09/2014 04:36, Fam Zheng ha scritto:
> +QTAILQ_FOREACH_SAFE(ref, &req->cancel_deps, next, next) {
> +SCSIRequest *r = ref->req;
> +assert(r->cancel_dep_count);
> +r->cancel_dep_count--;
> +if (!r->cancel_dep_count && req->bus->info->cancel_dep_complete) {
>
Devices can call this function to start an asynchronous cancellation.
The bus->info->cancel will be called later.
Two fields are added to SCSIRequest to respectively keep track of:
1) The list of (TMF) requests that are waiting for this request to be
canceled.
2) The number of (IO) request