aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/io.c10
-rw-r--r--block/qcow2.c2
2 files changed, 7 insertions, 5 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;
diff --git a/block/qcow2.c b/block/qcow2.c
index fadf342..6ad6bdc 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -66,7 +66,7 @@ typedef struct {
} QEMU_PACKED QCowExtension;
#define QCOW2_EXT_MAGIC_END 0
-#define QCOW2_EXT_MAGIC_BACKING_FORMAT 0xE2792ACA
+#define QCOW2_EXT_MAGIC_BACKING_FORMAT 0xe2792aca
#define QCOW2_EXT_MAGIC_FEATURE_TABLE 0x6803f857
#define QCOW2_EXT_MAGIC_CRYPTO_HEADER 0x0537be77
#define QCOW2_EXT_MAGIC_BITMAPS 0x23852875