db5d2a4b77
where there is no good reason to keep them separate. It's a pain during rebase if there are multiple patches changing the same code over and over again. This was especially bad for the backup-related patches. If the history of patches really is needed, it can be extracted via git. Additionally, compilation with partial application of patches was broken since a long time, because one of the master key changes became part of an earlier patch during a past rebase. If only the same files were changed by a subsequent patch and the changes felt to belong together (obvious for later bug fixes, but also done for features e.g. adding master key support for PBS), the patches were squashed together. The PBS namespace support patch was split into the individual parts it changes, i.e. PBS block driver, pbs-restore binary and QMP backup infrastructure, and squashed into the respective patches. No code change is intended, git diff in the submodule should not show any difference between applying all patches before this commit and applying all patches after this commit. The query-proxmox-support QMP function has been left as part of the "PVE-Backup: Proxmox backup patches for QEMU" patch, because it's currently only used there. If it ever is used elsewhere too, it can be split out from there. The recent alloc-track and BQL-related savevm-async changes have been left separate for now, because it's not 100% clear they are the best approach yet. This depends on what upstream decides about the BQL stuff and whether and what kind of issues with the changes pop up. The qemu-img dd snapshot patch has been re-ordered to after the other qemu-img dd patches. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
81 lines
2.8 KiB
Diff
81 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Fabian Ebner <f.ebner@proxmox.com>
|
|
Date: Thu, 23 Jun 2022 14:00:05 +0200
|
|
Subject: [PATCH] Revert "block/rbd: workaround for ceph issue #53784"
|
|
|
|
This reverts commit fc176116cdea816ceb8dd969080b2b95f58edbc0 in
|
|
preparation to revert 0347a8fd4c3faaedf119be04c197804be40a384b.
|
|
|
|
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
|
|
---
|
|
block/rbd.c | 42 ++----------------------------------------
|
|
1 file changed, 2 insertions(+), 40 deletions(-)
|
|
|
|
diff --git a/block/rbd.c b/block/rbd.c
|
|
index a4749f3b1b..53e0396b51 100644
|
|
--- a/block/rbd.c
|
|
+++ b/block/rbd.c
|
|
@@ -1511,7 +1511,6 @@ static int coroutine_fn qemu_rbd_co_block_status(BlockDriverState *bs,
|
|
int status, r;
|
|
RBDDiffIterateReq req = { .offs = offset };
|
|
uint64_t features, flags;
|
|
- uint64_t head = 0;
|
|
|
|
assert(offset + bytes <= s->image_size);
|
|
|
|
@@ -1539,43 +1538,7 @@ static int coroutine_fn qemu_rbd_co_block_status(BlockDriverState *bs,
|
|
return status;
|
|
}
|
|
|
|
-#if LIBRBD_VERSION_CODE < LIBRBD_VERSION(1, 17, 0)
|
|
- /*
|
|
- * librbd had a bug until early 2022 that affected all versions of ceph that
|
|
- * supported fast-diff. This bug results in reporting of incorrect offsets
|
|
- * if the offset parameter to rbd_diff_iterate2 is not object aligned.
|
|
- * Work around this bug by rounding down the offset to object boundaries.
|
|
- * This is OK because we call rbd_diff_iterate2 with whole_object = true.
|
|
- * However, this workaround only works for non cloned images with default
|
|
- * striping.
|
|
- *
|
|
- * See: https://tracker.ceph.com/issues/53784
|
|
- */
|
|
-
|
|
- /* check if RBD image has non-default striping enabled */
|
|
- if (features & RBD_FEATURE_STRIPINGV2) {
|
|
- return status;
|
|
- }
|
|
-
|
|
-#pragma GCC diagnostic push
|
|
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
- /*
|
|
- * check if RBD image is a clone (= has a parent).
|
|
- *
|
|
- * rbd_get_parent_info is deprecated from Nautilus onwards, but the
|
|
- * replacement rbd_get_parent is not present in Luminous and Mimic.
|
|
- */
|
|
- if (rbd_get_parent_info(s->image, NULL, 0, NULL, 0, NULL, 0) != -ENOENT) {
|
|
- return status;
|
|
- }
|
|
-#pragma GCC diagnostic pop
|
|
-
|
|
- head = req.offs & (s->object_size - 1);
|
|
- req.offs -= head;
|
|
- bytes += head;
|
|
-#endif
|
|
-
|
|
- r = rbd_diff_iterate2(s->image, NULL, req.offs, bytes, true, true,
|
|
+ r = rbd_diff_iterate2(s->image, NULL, offset, bytes, true, true,
|
|
qemu_rbd_diff_iterate_cb, &req);
|
|
if (r < 0 && r != QEMU_RBD_EXIT_DIFF_ITERATE2) {
|
|
return status;
|
|
@@ -1594,8 +1557,7 @@ static int coroutine_fn qemu_rbd_co_block_status(BlockDriverState *bs,
|
|
status = BDRV_BLOCK_ZERO | BDRV_BLOCK_OFFSET_VALID;
|
|
}
|
|
|
|
- assert(req.bytes > head);
|
|
- *pnum = req.bytes - head;
|
|
+ *pnum = req.bytes;
|
|
return status;
|
|
}
|
|
|