Il 05/06/2014 03:58, Fam Zheng ha scritto:
-if (req->elem->out_sg[0].iov_len < sizeof(*req->out) ||
+if (req->elem->out_sg[0].iov_len < sizeof(req->out) ||
This is not needed anymore.
req->elem->in_sg[req->elem->in_num - 1].iov_len < sizeof(*req->in)) {
error_report
The virtio code currently assumes that the outhdr is in its own iovec.
This is not guaranteed by the spec, so we should relax this assumption.
Convert the VirtIOBlockReq.out field to structrue so that we can use
iov_to_buf and then discard the header from the beginning of iovec.
Suggested-by: Pao