aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-28 18:00:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-28 18:00:21 +0100
commit0c4fa5bc1aa47d30a8def2dc8345284400d123f1 (patch)
treeabd904caf3650f2a4c604fc77484f5b701848a5d /block
parent0a58e39fe90c50b313a5148c095f8dbb6111a6d6 (diff)
parentafac471b71da92d91cc56fb64c0719b8a4a2d96b (diff)
downloadqemu-0c4fa5bc1aa47d30a8def2dc8345284400d123f1.zip
qemu-0c4fa5bc1aa47d30a8def2dc8345284400d123f1.tar.gz
qemu-0c4fa5bc1aa47d30a8def2dc8345284400d123f1.tar.bz2
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-28' into staging
Block patches for 5.1.0: - Fix block I/O for split transfers - Fix iotest 197 for non-qcow2 formats # gpg: Signature made Tue 28 Jul 2020 14:45:28 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2020-07-28: iotests/197: Fix for non-qcow2 formats iotests/028: Add test for cross-base-EOF reads block: Fix bdrv_aligned_p*v() for qiov_offset != 0 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r--block/io.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/block/io.c b/block/io.c
index b6564e3..ad3a51e 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1524,12 +1524,13 @@ static int coroutine_fn bdrv_aligned_preadv(BdrvChild *child,
assert(num);
ret = bdrv_driver_preadv(bs, offset + bytes - bytes_remaining,
- num, qiov, bytes - bytes_remaining, 0);
+ num, qiov,
+ qiov_offset + bytes - bytes_remaining, 0);
max_bytes -= num;
} else {
num = bytes_remaining;
- ret = qemu_iovec_memset(qiov, bytes - bytes_remaining, 0,
- bytes_remaining);
+ ret = qemu_iovec_memset(qiov, qiov_offset + bytes - bytes_remaining,
+ 0, bytes_remaining);
}
if (ret < 0) {
goto out;
@@ -2032,7 +2033,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
}
ret = bdrv_driver_pwritev(bs, offset + bytes - bytes_remaining,
- num, qiov, bytes - bytes_remaining,
+ num, qiov,
+ qiov_offset + bytes - bytes_remaining,
local_flags);
if (ret < 0) {
break;