4567474e95
Notable changes: * bdrv_co_p{discard,readv,writev,write_zeroes} function signatures changed, to using int64_t for offsets/bytes and some still had int rather than BrdvRequestFlags for the flags. * job_cancel_sync now has a force parameter. Commit messages in 73895f3838cd7fdaf185cf1dbc47be58844a966f 4cfb3f05627ad82af473e7f7ae113c3884cd04e3 sound like using force=true makes more sense. * Added 3 patches coming in via qemu-stable tag, most important one is to work around a librbd issue. * Added another 3 patches from qemu-devel to fix issue leading to crash when live migrating with iothread. * cluster_size calculation helper changed (see patch pve/0026). * QAPI's if conditionals now use 'CONFIG_FOO' rather than 'defined(CONFIG_FOO)' Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Peter Lieven <pl@kamp.de>
|
|
Date: Thu, 13 Jan 2022 15:44:25 +0100
|
|
Subject: [PATCH] block/rbd: fix handling of holes in .bdrv_co_block_status
|
|
|
|
the assumption that we can't hit a hole if we do not diff against a snapshot was wrong.
|
|
|
|
We can see a hole in an image if we diff against base if there exists an older snapshot
|
|
of the image and we have discarded blocks in the image where the snapshot has data.
|
|
|
|
Fix this by simply handling a hole like an unallocated area. There are no callbacks
|
|
for unallocated areas so just bail out if we hit a hole.
|
|
|
|
Fixes: 0347a8fd4c3faaedf119be04c197804be40a384b
|
|
Suggested-by: Ilya Dryomov <idryomov@gmail.com>
|
|
Cc: qemu-stable@nongnu.org
|
|
Signed-off-by: Peter Lieven <pl@kamp.de>
|
|
Message-Id: <20220113144426.4036493-2-pl@kamp.de>
|
|
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
|
|
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
---
|
|
block/rbd.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/block/rbd.c b/block/rbd.c
|
|
index def96292e0..20bb896c4a 100644
|
|
--- a/block/rbd.c
|
|
+++ b/block/rbd.c
|
|
@@ -1279,11 +1279,11 @@ static int qemu_rbd_diff_iterate_cb(uint64_t offs, size_t len,
|
|
RBDDiffIterateReq *req = opaque;
|
|
|
|
assert(req->offs + req->bytes <= offs);
|
|
- /*
|
|
- * we do not diff against a snapshot so we should never receive a callback
|
|
- * for a hole.
|
|
- */
|
|
- assert(exists);
|
|
+
|
|
+ /* treat a hole like an unallocated area and bail out */
|
|
+ if (!exists) {
|
|
+ return 0;
|
|
+ }
|
|
|
|
if (!req->exists && offs > req->offs) {
|
|
/*
|