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 11:57:01 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Gerd Hoffmann wrote:
>   Hi,
> 
>>> 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.
> 
> I'll try.
> 
>> Should be straightforward to implement, one would assume.
> 
> The infrastructure and the HBAs have to handle that already.  It
> frequently happens with MODE SENSE for example (guest passing a 256 byte
> buffer and we have less data to fill in).  So it should be easy.
> 
>> 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.
> 
> Hmm, I don't think so.  SG_IO just returns EINVAL.
> 
Yes, but we can hook into scsi_generic_map() to cap the resulting
iovec to the limits of the underlying block device.
Then we submit an iovec which matches the capabilities of the
underlying device.
Of course we should take care to update the resulting xferlen
values to match the actualy submitted data, but that should
be easily done.

Then the guest would see a partial request and retry the
remainder of the request, which (possibly after some iterations)
would result in all data transferred, albeit at a lower speed.

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]