qemu-kvm/kvm-block-Introduce-bdrv_reopen_commit_post-step.patch
Danilo C. L. de Paula dd7aef2877 * Tue Mar 17 2020 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.2.0-15.el8
- kvm-block-nbd-Fix-hang-in-.bdrv_close.patch [bz#1640894]
- kvm-block-Generic-file-creation-fallback.patch [bz#1640894]
- kvm-file-posix-Drop-hdev_co_create_opts.patch [bz#1640894]
- kvm-iscsi-Drop-iscsi_co_create_opts.patch [bz#1640894]
- kvm-iotests-Add-test-for-image-creation-fallback.patch [bz#1640894]
- kvm-block-Fix-leak-in-bdrv_create_file_fallback.patch [bz#1640894]
- kvm-iotests-Use-complete_and_wait-in-155.patch [bz#1790482 bz#1805143]
- kvm-block-Introduce-bdrv_reopen_commit_post-step.patch [bz#1790482 bz#1805143]
- kvm-block-qcow2-Move-bitmap-reopen-into-bdrv_reopen_comm.patch [bz#1790482 bz#1805143]
- kvm-iotests-Refactor-blockdev-reopen-test-for-iothreads.patch [bz#1790482 bz#1805143]
- kvm-block-bdrv_reopen-with-backing-file-in-different-Aio.patch [bz#1790482 bz#1805143]
- kvm-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch [bz#1790482 bz#1805143]
- kvm-block-Make-bdrv_get_cumulative_perm-public.patch [bz#1790482 bz#1805143]
- kvm-block-Relax-restrictions-for-blockdev-snapshot.patch [bz#1790482 bz#1805143]
- kvm-iotests-Fix-run_job-with-use_log-False.patch [bz#1790482 bz#1805143]
- kvm-iotests-Test-mirror-with-temporarily-disabled-target.patch [bz#1790482 bz#1805143]
- kvm-block-Fix-cross-AioContext-blockdev-snapshot.patch [bz#1790482 bz#1805143]
- kvm-iotests-Add-iothread-cases-to-155.patch [bz#1790482 bz#1805143]
- kvm-qapi-Add-allow-write-only-overlay-feature-for-blockd.patch [bz#1790482 bz#1805143]
- kvm-exec-rom_reset-Free-rom-data-during-inmigrate-skip.patch [bz#1809380]
- Resolves: bz#1640894
  (Fix generic file creation fallback for qemu-img nvme:// image creation support)
- Resolves: bz#1790482
  (bitmaps in backing images can't be modified)
- Resolves: bz#1805143
  (allow late/lazy opening of backing chain for shallow blockdev-mirror)
- Resolves: bz#1809380
  (guest hang during reboot process after migration from RHEl7.8 to RHEL8.2.0.)
2020-03-17 00:52:27 +00:00

66 lines
2.3 KiB
Diff

From f7dd953c2d0380cef3c351afb03d68c6fcda1dca Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Fri, 13 Mar 2020 12:34:28 +0000
Subject: [PATCH 08/20] block: Introduce 'bdrv_reopen_commit_post' step
RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <20200313123439.10548-3-kwolf@redhat.com>
Patchwork-id: 94278
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 02/13] block: Introduce 'bdrv_reopen_commit_post' step
Bugzilla: 1790482 1805143
RH-Acked-by: John Snow <jsnow@redhat.com>
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
RH-Acked-by: Peter Krempa <pkrempa@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Add another step in the reopen process where driver can execute code
after permission changes are comitted.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Message-Id: <adc02cf591c3cb34e98e33518eb1c540a0f27db1.1582893284.git.pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 17e1e2be5f9e84e0298e28e70675655b43e225ea)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
block.c | 9 +++++++++
include/block/block_int.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/block.c b/block.c
index e1a4e38..a744bb5 100644
--- a/block.c
+++ b/block.c
@@ -3657,6 +3657,15 @@ cleanup_perm:
}
}
}
+
+ if (ret == 0) {
+ QTAILQ_FOREACH_REVERSE(bs_entry, bs_queue, entry) {
+ BlockDriverState *bs = bs_entry->state.bs;
+
+ if (bs->drv->bdrv_reopen_commit_post)
+ bs->drv->bdrv_reopen_commit_post(&bs_entry->state);
+ }
+ }
cleanup:
QTAILQ_FOREACH_SAFE(bs_entry, bs_queue, entry, next) {
if (ret) {
diff --git a/include/block/block_int.h b/include/block/block_int.h
index dd033d0..c168690 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -123,6 +123,7 @@ struct BlockDriver {
int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state,
BlockReopenQueue *queue, Error **errp);
void (*bdrv_reopen_commit)(BDRVReopenState *reopen_state);
+ void (*bdrv_reopen_commit_post)(BDRVReopenState *reopen_state);
void (*bdrv_reopen_abort)(BDRVReopenState *reopen_state);
void (*bdrv_join_options)(QDict *options, QDict *old_options);
--
1.8.3.1