Re: [Qemu-devel] [PATCH] scsi: always call notifier on async cancellation

2015-12-17 Thread Fam Zheng
On Thu, 12/17 09:41, Paolo Bonzini wrote: > > > On 17/12/2015 02:15, Fam Zheng wrote: > >> > if (notifier) { > >> > notifier_list_add(&req->cancel_notifiers, notifier); > >> > } > >> > -if (req->io_canceled) { > >> > -return; > >> > -} > >> > scsi_req_ref(r

Re: [Qemu-devel] [PATCH] scsi: always call notifier on async cancellation

2015-12-17 Thread Paolo Bonzini
On 17/12/2015 02:15, Fam Zheng wrote: >> > if (notifier) { >> > notifier_list_add(&req->cancel_notifiers, notifier); >> > } >> > -if (req->io_canceled) { >> > -return; >> > -} >> > scsi_req_ref(req); >> > scsi_req_dequeue(req); >> > req->io_cancel

Re: [Qemu-devel] [PATCH] scsi: always call notifier on async cancellation

2015-12-16 Thread Fam Zheng
On Wed, 12/16 19:33, Paolo Bonzini wrote: > This was found by code inspection. If the request is cancelled twice, > the notifier is never called on the second cancellation request, > and hence for example a TMF might never finish. > > Signed-off-by: Paolo Bonzini > --- > hw/scsi/scsi-bus.c | 3

[Qemu-devel] [PATCH] scsi: always call notifier on async cancellation

2015-12-16 Thread Paolo Bonzini
This was found by code inspection. If the request is cancelled twice, the notifier is never called on the second cancellation request, and hence for example a TMF might never finish. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/scs