On Wed, 06/04 10:42, Paolo Bonzini wrote: > Il 04/06/2014 09:53, Fam Zheng ha scritto: > >>> For the sake of restarting requests, we also need dataplane to populate > >>> the > >>> "out" field for dataplane. We can also take the occasion to change it > >>> from > >>> "struct virtio_blk_outhdr *" to "struct virtio_blk_outhdr" for > >>> non-dataplane > >>> and use iov_discard_front on the elem (see dataplane's process_request > >>> function). > >Using pointer avoids copying, what's the advantage of converting to "sturct > >virtio_blk_outhdr" for non-dataplane code? For thread-safety? > > The virtio code currently assumes that the outhdr is in its own iovec. This > is not guaranteed by the spec, it's just that the drivers do it because QEMU > required it. >
I see, thanks. Will convert it. IIUC, this also applies to inhdr? Do we need to fix them as well? Fam