Re: [Qemu-devel] [PATCH v3 04/21] scsi: introduce SCSIBusOps

2011-05-20 Thread Paolo Bonzini
On 05/20/2011 05:53 PM, Christoph Hellwig wrote: qbus_create_inplace(&bus->qbus,&scsi_bus_info, host, NULL); >bus->busnr = next_scsi_bus++; >bus->tcq = tcq; >bus->ndev = ndev; > -bus->complete = complete; > +bus->ops = *ops; Normally bus->ops would be a p

Re: [Qemu-devel] [PATCH v3 04/21] scsi: introduce SCSIBusOps

2011-05-20 Thread Christoph Hellwig
> qbus_create_inplace(&bus->qbus, &scsi_bus_info, host, NULL); > bus->busnr = next_scsi_bus++; > bus->tcq = tcq; > bus->ndev = ndev; > -bus->complete = complete; > +bus->ops = *ops; Normally bus->ops would be a pointer, so you can just assign it to the address passed in

[Qemu-devel] [PATCH v3 04/21] scsi: introduce SCSIBusOps

2011-05-17 Thread Paolo Bonzini
There are more operations than a SCSI bus can handle, besides completing commands. One example, which this series will introduce, is cleaning up after a request is cancelled. More long term, a "SCSI bus" can represent the LUNs attached to a target; in this case, while all commands will ultimately