Re: [Qemu-devel] [PATCH 1/3] scsi-bus: Unify request unref in scsi_req_cancel

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 04:36, Fam Zheng ha scritto: > Before, scsi_req_cancel will take ownership of the canceled request and > unref it. This is because we didn't know if AIO CB will be called or not > during the cancelling, so we set the io_canceled flag before calling it, > and skip to unref in the poten

[Qemu-devel] [PATCH 1/3] scsi-bus: Unify request unref in scsi_req_cancel

2014-09-17 Thread Fam Zheng
Before, scsi_req_cancel will take ownership of the canceled request and unref it. This is because we didn't know if AIO CB will be called or not during the cancelling, so we set the io_canceled flag before calling it, and skip to unref in the potentially called callbacks, which is not very nice. N