mirror of
https://git.proxmox.com/git/pve-qemu
synced 2025-08-24 15:01:52 +00:00

Notable changes, most interestingly the two build system changes: * avoid making 'migration' target depend on 'libproxmox_backup_qemu': Having pbs-state.c be part of the 'migration_files' makes the 'migration' target depend on 'libproxmox_backup_qemu'. Adding the dependency to 'migration' and 'libmigration' would not be enough however, because pbs-state.c depends on savevm.c (for register_savevm_live()), and savevm.c is not itself part of the 'migration_files' and would need to be moved too. Otherwise, linking the 'test-xbzrle' unit test is broken. Instead, don't declare pbs-state.c to be part of the 'migration_files'. * meson: pbs-restore + vma: add qemuutil dependency explicitly Both pbs-restore and vma use "qemu/osdep.h" so the dependency is present. Being explicit is required after commit 414b180d42 ("meson: Pass objects and dependencies to declare_dependency()"). * QAPI docs "Notes:" to ".. note::" conversion following commit d461c27973 ("qapi: convert "Note" sections to plain rST"). * Removal of QERR_* macros following commit a95921f171 ("qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition") and friends. * Signature change for .save_setup callbacks following commit 01c3ac681b ("migration: Add Error** argument to .save_setup() handler"). * Removal of separate .bdrv_file_open callbacks following commit 44b424dc4a ("block: remove separate bdrv_file_open callback") * Adapt dirty bitmap migration error handling following commit dd03167725 ("migration: Add Error** argument to add_bitmaps_to_list()") * Adapt savevm async to removed block migration following commit eef0bae3a7 ("migration: Remove block migration") Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
85 lines
2.7 KiB
Diff
85 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Fiona Ebner <f.ebner@proxmox.com>
|
|
Date: Wed, 27 Mar 2024 11:15:39 +0100
|
|
Subject: [PATCH] alloc-track: avoid seemingly superfluous child permission
|
|
update
|
|
|
|
Doesn't seem necessary nowadays (maybe after commit "alloc-track: fix
|
|
deadlock during drop" where the dropping is not rescheduled and delayed
|
|
anymore or some upstream change). Should there really be some issue,
|
|
instead of having a drop state, this could also be just based off the
|
|
fact whether there is still a backing child.
|
|
|
|
Dumping the cumulative (shared) permissions for the BDS with a debug
|
|
print yields the same values after this patch and with QEMU 8.1,
|
|
namely 3 and 5.
|
|
|
|
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
|
|
---
|
|
block/alloc-track.c | 26 --------------------------
|
|
1 file changed, 26 deletions(-)
|
|
|
|
diff --git a/block/alloc-track.c b/block/alloc-track.c
|
|
index fc7d58a5d0..b56425b7f0 100644
|
|
--- a/block/alloc-track.c
|
|
+++ b/block/alloc-track.c
|
|
@@ -25,15 +25,9 @@
|
|
|
|
#define TRACK_OPT_AUTO_REMOVE "auto-remove"
|
|
|
|
-typedef enum DropState {
|
|
- DropNone,
|
|
- DropInProgress,
|
|
-} DropState;
|
|
-
|
|
typedef struct {
|
|
BdrvDirtyBitmap *bitmap;
|
|
uint64_t granularity;
|
|
- DropState drop_state;
|
|
} BDRVAllocTrackState;
|
|
|
|
static QemuOptsList runtime_opts = {
|
|
@@ -137,8 +131,6 @@ static int track_open(BlockDriverState *bs, QDict *options, int flags,
|
|
goto fail;
|
|
}
|
|
|
|
- s->drop_state = DropNone;
|
|
-
|
|
fail:
|
|
if (ret < 0) {
|
|
bdrv_graph_wrlock();
|
|
@@ -289,18 +281,8 @@ track_child_perm(BlockDriverState *bs, BdrvChild *c, BdrvChildRole role,
|
|
BlockReopenQueue *reopen_queue, uint64_t perm, uint64_t shared,
|
|
uint64_t *nperm, uint64_t *nshared)
|
|
{
|
|
- BDRVAllocTrackState *s = bs->opaque;
|
|
-
|
|
*nshared = BLK_PERM_ALL;
|
|
|
|
- /* in case we're currently dropping ourselves, claim to not use any
|
|
- * permissions at all - which is fine, since from this point on we will
|
|
- * never issue a read or write anymore */
|
|
- if (s->drop_state == DropInProgress) {
|
|
- *nperm = 0;
|
|
- return;
|
|
- }
|
|
-
|
|
if (role & BDRV_CHILD_DATA) {
|
|
*nperm = perm & DEFAULT_PERM_PASSTHROUGH;
|
|
} else {
|
|
@@ -326,14 +308,6 @@ track_co_change_backing_file(BlockDriverState *bs, const char *backing_file,
|
|
* kinda fits better, but in the long-term, a special parameter would be
|
|
* nice (or done via qemu-server via upcoming blockdev-replace QMP command).
|
|
*/
|
|
- if (backing_file == NULL) {
|
|
- BDRVAllocTrackState *s = bs->opaque;
|
|
- bdrv_drained_begin(bs);
|
|
- s->drop_state = DropInProgress;
|
|
- bdrv_child_refresh_perms(bs, bs->file, &error_abort);
|
|
- bdrv_drained_end(bs);
|
|
- }
|
|
-
|
|
return 0;
|
|
}
|
|
|