On 08/06/2017 13:05, Felipe Franciosi wrote: >> Weird. Doesn't QEMU wait for response to GET_VRING_BASE? I think >> it does since we migrate the returned value. > > It does and that's what I said on my first message. On > GET_VRING_BASE, a vhost-user-scsi backend application will stop > picking up new requests and, _additionally_, quiesce the VQ (by > waiting for any outstanding I/O to complete or cancelling them) > before returning the last_avail_idx.
Yes, I understand now. > Such an application therefore doesn't _necessarily_ need a drain > call. However, we could extend vhost-user to include a message for > draining (which can be implemented as "wait for pending I/O to > complete" or "cancel all outstanding" depending on the > implementation). Ok, and I see that vhost_dev_stop also calls get_vring_base so my worries are appeased. :) Paolo