aboutsummaryrefslogtreecommitdiff
path: root/xen-hvm.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2016-11-23 10:39:12 +0000
committerStefano Stabellini <sstabellini@kernel.org>2016-11-23 10:47:48 -0800
commit7875efb9f641ed0e79320bf258ee69cd0bf03716 (patch)
tree37ca801d5af3eb4eaf68f9d3988f89e59d86e00e /xen-hvm.c
parent00227fefd2059464cd2f59aed29944874c630e2f (diff)
xen_disk: split discard input to match internal representation
The guest sends discard requests as u64 sector/count pairs, but the block layer operates internally with s64/s32 pairs. The conversion leads to IO errors in the guest, the discard request is not processed. domU.cfg: 'vdev=xvda, format=qcow2, backendtype=qdisk, target=/x.qcow2' domU: mkfs.ext4 -F /dev/xvda Discarding device blocks: failed - Input/output error Fix this by splitting the request into chunks of BDRV_REQUEST_MAX_SECTORS. Add input range checking to avoid overflow. Fixes f313520 ("xen_disk: add discard support") Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'xen-hvm.c')
0 files changed, 0 insertions, 0 deletions