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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix "written length" field in the used ring
Date: Mon, 27 Apr 2015 15:28:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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



reply via email to

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