On Thu, Apr 18, 2013 at 1:54 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 18/04/2013 11:38, Dmitry Fleytman ha scritto: > > > > > +static void > > > +pvscsi_free_queue(PVSCSIRequestList *req_list) > > > > This shouldn't be needed. > > > > > > > > Doesn't one need to clear completion queue on reset command arrival from > > driver? > > > > It should happen in qbus_reset_all. The scsi-disk device will cancel > pending requests, and these will be moved from the pending_queue to the > completion_queue. I think you can call pvscsi_process_completion_queue > instead of pvscsi_free_queue. > > Paolo > > Ok, sounds reasonable. I'll send the updated patch soon. > > > > > +{ > > > + PVSCSIRequest *pvscsi_req; > > > + > > > + while (!QTAILQ_EMPTY(req_list)) { > > > + pvscsi_req = QTAILQ_FIRST(req_list); > > > + QTAILQ_REMOVE(req_list, pvscsi_req, next); > > > + g_free(pvscsi_req); > > > + } > > > +} > > > + > >