Re: [Qemu-devel] [PATCH 2/3] scsi-disk: identify AIO callbacks more clearly

2015-08-06 Thread Fam Zheng
On Thu, 08/06 12:01, Paolo Bonzini wrote: > /* Actually issue a read to the block device. */ > -static void scsi_do_read(void *opaque, int ret) > +static void scsi_do_read(SCSIDiskReq *r, int ret) > { > -SCSIDiskReq *r = opaque; > SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req

[Qemu-devel] [PATCH 2/3] scsi-disk: identify AIO callbacks more clearly

2015-08-06 Thread Paolo Bonzini
Functions that are not callbacks should assert that aiocb is NULL and have a non-opaque argument (usually a pointer to SCSIDiskReq). AIO callbacks should assert that aiocb is not NULL and take care of calling block_acct done. They also have an opaque argument. Signed-off-by: Paolo Bonzini ---