qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/5] virtio-blk: Drop VirtIOBlockReq.read


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 5/5] virtio-blk: Drop VirtIOBlockReq.read
Date: Wed, 04 Jun 2014 10:42:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]