- kvm-migration-multifd-move-macros-to-multifd-header.patch [RHEL-59697] - kvm-migration-refactor-channel-discovery-mechanism.patch [RHEL-59697] - kvm-migration-Add-save_postcopy_prepare-savevm-handler.patch [RHEL-59697] - kvm-migration-ram-Implement-save_postcopy_prepare.patch [RHEL-59697] - kvm-tests-qtest-migration-consolidate-set-capabilities.patch [RHEL-59697] - kvm-migration-write-zero-pages-when-postcopy-enabled.patch [RHEL-59697] - kvm-migration-enable-multifd-and-postcopy-together.patch [RHEL-59697] - kvm-migration-Add-qtest-for-migration-over-RDMA.patch [RHEL-59697] - kvm-qtest-migration-rdma-Enforce-RLIMIT_MEMLOCK-128MB-re.patch [RHEL-59697] - kvm-qtest-migration-rdma-Add-test-for-rdma-migration-wit.patch [RHEL-59697] - kvm-tests-qtest-migration-add-postcopy-tests-with-multif.patch [RHEL-59697] - kvm-file-posix-Fix-aio-threads-performance-regression-af.patch [RHEL-96854] - kvm-block-remove-outdated-comments-about-AioContext-lock.patch [RHEL-88561] - kvm-block-move-drain-outside-of-read-locked-bdrv_reopen_.patch [RHEL-88561] - kvm-block-snapshot-move-drain-outside-of-read-locked-bdr.patch [RHEL-88561] - kvm-block-move-drain-outside-of-read-locked-bdrv_inactiv.patch [RHEL-88561] - kvm-block-mark-bdrv_parent_change_aio_context-GRAPH_RDLO.patch [RHEL-88561] - kvm-block-mark-change_aio_ctx-callback-and-instances-as-.patch [RHEL-88561] - kvm-block-mark-bdrv_child_change_aio_context-GRAPH_RDLOC.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_change_aio_context-.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_try_change_aio_cont.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_attach_child_common.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_set_backing_hd_drai.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_root_attach_child.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_attach_child.patch [RHEL-88561] - kvm-block-move-drain-outside-of-quorum_add_child.patch [RHEL-88561] - kvm-block-move-drain-outside-of-bdrv_root_unref_child.patch [RHEL-88561] - kvm-block-move-drain-outside-of-quorum_del_child.patch [RHEL-88561] - kvm-blockdev-drain-while-unlocked-in-internal_snapshot_a.patch [RHEL-88561] - kvm-blockdev-drain-while-unlocked-in-external_snapshot_a.patch [RHEL-88561] - kvm-block-mark-bdrv_drained_begin-and-friends-as-GRAPH_U.patch [RHEL-88561] - kvm-iotests-graph-changes-while-io-remove-image-file-aft.patch [RHEL-88561] - kvm-iotests-graph-changes-while-io-add-test-case-with-re.patch [RHEL-88561] - Resolves: RHEL-59697 (Allow multifd+postcopy features being enabled together, but only use multifd during precopy ) - Resolves: RHEL-96854 (Performance Degradation(aio=threads) between Upstream Commit b75c5f9 and 984a32f) - Resolves: RHEL-88561 (qemu graph deadlock during job-dismiss)
104 lines
4.2 KiB
Diff
104 lines
4.2 KiB
Diff
From 1c72dbd318b6c15d7a7cbc14a270056a5cb6b182 Mon Sep 17 00:00:00 2001
|
|
From: Fiona Ebner <f.ebner@proxmox.com>
|
|
Date: Fri, 30 May 2025 17:10:43 +0200
|
|
Subject: [PATCH 18/33] block: mark change_aio_ctx() callback and instances as
|
|
GRAPH_RDLOCK(_PTR)
|
|
|
|
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
RH-MergeRequest: 393: block: do not drain while holding the graph lock
|
|
RH-Jira: RHEL-88561
|
|
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
RH-Acked-by: Hanna Czenczek <hreitz@redhat.com>
|
|
RH-Commit: [6/21] 9b1d5045f18b3393c5a35ce854da0dfd6fc2803b (kmwolf/centos-qemu-kvm)
|
|
|
|
This is a small step in preparation to mark bdrv_drained_begin() as
|
|
GRAPH_UNLOCKED. More concretely, it is in preparation to move the
|
|
drain out of bdrv_change_aio_context() and marking that function as
|
|
GRAPH_RDLOCK.
|
|
|
|
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
|
|
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
|
|
Message-ID: <20250530151125.955508-7-f.ebner@proxmox.com>
|
|
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
(cherry picked from commit 844d550d09ac29ff2b1b49069587ae6a989df31d)
|
|
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
---
|
|
block.c | 7 ++++---
|
|
block/block-backend.c | 6 +++---
|
|
blockjob.c | 6 +++---
|
|
include/block/block_int-common.h | 6 +++---
|
|
4 files changed, 13 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/block.c b/block.c
|
|
index 18a6be3bd6..f7b21d8f27 100644
|
|
--- a/block.c
|
|
+++ b/block.c
|
|
@@ -1226,9 +1226,10 @@ static int bdrv_child_cb_inactivate(BdrvChild *child)
|
|
return 0;
|
|
}
|
|
|
|
-static bool bdrv_child_cb_change_aio_ctx(BdrvChild *child, AioContext *ctx,
|
|
- GHashTable *visited, Transaction *tran,
|
|
- Error **errp)
|
|
+static bool GRAPH_RDLOCK
|
|
+bdrv_child_cb_change_aio_ctx(BdrvChild *child, AioContext *ctx,
|
|
+ GHashTable *visited, Transaction *tran,
|
|
+ Error **errp)
|
|
{
|
|
BlockDriverState *bs = child->opaque;
|
|
return bdrv_change_aio_context(bs, ctx, visited, tran, errp);
|
|
diff --git a/block/block-backend.c b/block/block-backend.c
|
|
index a402db13f2..6a6949edeb 100644
|
|
--- a/block/block-backend.c
|
|
+++ b/block/block-backend.c
|
|
@@ -136,9 +136,9 @@ static void blk_root_drained_end(BdrvChild *child);
|
|
static void blk_root_change_media(BdrvChild *child, bool load);
|
|
static void blk_root_resize(BdrvChild *child);
|
|
|
|
-static bool blk_root_change_aio_ctx(BdrvChild *child, AioContext *ctx,
|
|
- GHashTable *visited, Transaction *tran,
|
|
- Error **errp);
|
|
+static bool GRAPH_RDLOCK
|
|
+blk_root_change_aio_ctx(BdrvChild *child, AioContext *ctx, GHashTable *visited,
|
|
+ Transaction *tran, Error **errp);
|
|
|
|
static char *blk_root_get_parent_desc(BdrvChild *child)
|
|
{
|
|
diff --git a/blockjob.c b/blockjob.c
|
|
index 32007f31a9..34185d7715 100644
|
|
--- a/blockjob.c
|
|
+++ b/blockjob.c
|
|
@@ -144,9 +144,9 @@ static TransactionActionDrv change_child_job_context = {
|
|
.clean = g_free,
|
|
};
|
|
|
|
-static bool child_job_change_aio_ctx(BdrvChild *c, AioContext *ctx,
|
|
- GHashTable *visited, Transaction *tran,
|
|
- Error **errp)
|
|
+static bool GRAPH_RDLOCK
|
|
+child_job_change_aio_ctx(BdrvChild *c, AioContext *ctx, GHashTable *visited,
|
|
+ Transaction *tran, Error **errp)
|
|
{
|
|
BlockJob *job = c->opaque;
|
|
BdrvStateChildJobContext *s;
|
|
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
|
|
index a9c0daa2a4..307dc56ed8 100644
|
|
--- a/include/block/block_int-common.h
|
|
+++ b/include/block/block_int-common.h
|
|
@@ -987,9 +987,9 @@ struct BdrvChildClass {
|
|
bool backing_mask_protocol,
|
|
Error **errp);
|
|
|
|
- bool (*change_aio_ctx)(BdrvChild *child, AioContext *ctx,
|
|
- GHashTable *visited, Transaction *tran,
|
|
- Error **errp);
|
|
+ bool GRAPH_RDLOCK_PTR (*change_aio_ctx)(BdrvChild *child, AioContext *ctx,
|
|
+ GHashTable *visited,
|
|
+ Transaction *tran, Error **errp);
|
|
|
|
/*
|
|
* I/O API functions. These functions are thread-safe.
|
|
--
|
|
2.39.3
|
|
|