qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the used ring
Date: Mon, 27 Apr 2015 16:04:00 +0200

On Mon, Apr 27, 2015 at 03:28:34PM +0200, Paolo Bonzini wrote:
> 
> 
> On 27/04/2015 15:23, Michael S. Tsirkin wrote:
> > On Mon, Apr 27, 2015 at 02:29:25PM +0200, Paolo Bonzini wrote:
> >> > qsgl->size is the size of the data field after the request or
> >> > response header (virtio-scsi currently supports only one such
> >> > field; bidirectional requests are not supported).  However,
> >> > the used ring's len field is not concerned about the field
> >> > after the request header, so do not count it unless req->mode
> >> > signals the request was a read.
> >> > 
> >> > Also, do not report that anything was written if the request
> >> > failed, and subtract any residual bytes in case of buffer underrun.
> >> > 
> >> > Signed-off-by: Paolo Bonzini <address@hidden>
> > Acked-by: Michael S. Tsirkin <address@hidden>
> > 
> > Pls merge through the storage tree.
> 
> Ok, I'll take it through the SCSI tree then.
> 
> > Also, can you pls fix up blk similarly?
> 
> Because virtio-blk uses a response footer and virtio-scsi uses a
> response header, fixing virtio-blk is much harder.  You need to add a
> new argument to virtqueue_push.  I'd really prefer someone else to do it...
> 
> Paolo

OK but what's the desired API?
Do you know the host length or might any part of iov
be dirty?

-- 
MST



reply via email to

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