On 04/26/2017 09:46 AM, Eric Farman wrote: > A virtio-scsi request that goes through the host sd driver and > exceeds the maximum transfer size is automatically broken up > for us. But the equivalent request going to the sg driver > presumes that any length requirements have already been honored. > Let's use the max_sectors field from the device and break up > all virtio-scsi requests (both sd and sg) to avoid problem from > the host drivers. > > Signed-off-by: Eric Farman <far...@linux.vnet.ibm.com> > --- > pc-bios/s390-ccw/s390-ccw.h | 4 ++++ > pc-bios/s390-ccw/virtio-scsi.c | 19 ++++++++++++++----- > 2 files changed, 18 insertions(+), 5 deletions(-) > > diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h > index ded67bc..e1f3751 100644 > --- a/pc-bios/s390-ccw/s390-ccw.h > +++ b/pc-bios/s390-ccw/s390-ccw.h > @@ -42,6 +42,10 @@ typedef unsigned long long __u64; > #ifndef NULL > #define NULL 0 > #endif > +#ifndef MIN > +#define MIN(a, b) (((a) < (b)) ? (a) : (b)); > +#endif
osdep.h defines MIN() for ALL files, so this hunk is spurious. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature