[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 18/28] file-posix: try BLKSECTGET on block devices too, do not
From: |
Halil Pasic |
Subject: |
Re: [PULL 18/28] file-posix: try BLKSECTGET on block devices too, do not round to power of 2 |
Date: |
Mon, 6 Sep 2021 16:24:20 +0200 |
On Fri, 25 Jun 2021 16:18:12 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> bs->sg is only true for character devices, but block devices can also
> be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET
> returns bytes in an int for /dev/sgN devices, and sectors in a short
> for block devices, so account for that in the code.
>
> The maximum transfer also need not be a power of 2 (for example I have
> seen disks with 1280 KiB maximum transfer) so there's no need to pass
> the result through pow2floor.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
We have found that this patch leads to in guest I/O errors when DASD
is used as a source device. I.e. libvirt domain xml wise something like:
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native' iothread='1'/>
<source dev='/dev/disk/by-id/ccw-XXXXXXX'/>
<backingStore/>
<target dev='vdb' bus='virtio'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0008'/>
</disk>
I don't think it is the fault of this patch: it LGTM. But it correlates
100%, furthermore the problem seems to be related to the value of
bl.max_iov which now comes from sysfs.
We are still investigating what is actually wrong. Just wanted to give
everybody a heads-up that this does seem to cause a nasty regression on
s390x, even if the code itself is perfect.
Regards,
Halil
- Re: [PULL 18/28] file-posix: try BLKSECTGET on block devices too, do not round to power of 2,
Halil Pasic <=