qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [sneak preview] major scsi overhaul


From: Hannes Reinecke
Subject: Re: [Qemu-devel] [sneak preview] major scsi overhaul
Date: Thu, 26 Nov 2009 08:31:20 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Gerd Hoffmann wrote:
> On 11/24/09 14:51, Paul Brook wrote:
>> On Tuesday 24 November 2009, Gerd Hoffmann wrote:
>>> On 11/16/09 19:53, Paul Brook wrote:
>>>> Capping the amount of memory required for a transfer *is*
>>>> implemented, in
>>>> both LSI and virtio-blk.  The exception being SCSI passthrough where
>>>> the
>>>> kernel API makes it impossible.
>>>
>>> Well.  Figured while doing more testing:  The allowed request size is
>>> limited by the kernel, so scsi-generic requests larger than (currently)
>>> 128k fail.
>>>
>>> Now, how to handle *that*?  Is there some way to signal to the guest
>>> that the request was to big?
>>
>> Same as real hardware.  Probably also want to populate the Block
>> Limits VPD
>> page appropriately
> 
> Some experiements later.
> 
> Linux reads the block limits vpd, but seems to ignore the hard limit.
> 
Ah. Maybe we should fix that up then ...

> Answering large requests with "Illegal request, Invalid field in CDB"
> doesn't makes linux try smaller requests, instead it reports I/O errors
> to the syslog.
> 
> Hmm.
>
Can't we just put residuals to good use here?
Ie finish up the request up to the size we can handle, and return the
original request with the transfer size set correctly.
Then the SCSI stack of the guest should retry the leftovers, which
then we should be able to handle. Or redo from start until we are
able to.
Should be straightforward to implement, one would assume.
And we could probably encapsulate it entirely within the bdrv
as don't actually need to expose those limits when the block
driver layer is handling it correctly.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
address@hidden                        +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)




reply via email to

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