qemu-kvm/kvm-block-Make-bdrv_get_cumulative_perm-public.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

68 lines
2.7 KiB
Diff

From 294ab4c4963295556d12ac15150b48c8536175a7 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Fri, 13 Mar 2020 12:34:33 +0000
Subject: [PATCH 13/20] block: Make bdrv_get_cumulative_perm() public
RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <20200313123439.10548-8-kwolf@redhat.com>
Patchwork-id: 94287
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 07/13] block: Make bdrv_get_cumulative_perm() public
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>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200310113831.27293-2-kwolf@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit c7a0f2be8f95b220cdadbba9a9236eaf115951dc)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
block.c | 6 ++----
include/block/block_int.h | 3 +++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index 39e4647..354d388 100644
--- a/block.c
+++ b/block.c
@@ -1850,8 +1850,6 @@ static int bdrv_child_check_perm(BdrvChild *c, BlockReopenQueue *q,
bool *tighten_restrictions, Error **errp);
static void bdrv_child_abort_perm_update(BdrvChild *c);
static void bdrv_child_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared);
-static void bdrv_get_cumulative_perm(BlockDriverState *bs, uint64_t *perm,
- uint64_t *shared_perm);
typedef struct BlockReopenQueueEntry {
bool prepared;
@@ -2075,8 +2073,8 @@ static void bdrv_set_perm(BlockDriverState *bs, uint64_t cumulative_perms,
}
}
-static void bdrv_get_cumulative_perm(BlockDriverState *bs, uint64_t *perm,
- uint64_t *shared_perm)
+void bdrv_get_cumulative_perm(BlockDriverState *bs, uint64_t *perm,
+ uint64_t *shared_perm)
{
BdrvChild *c;
uint64_t cumulative_perms = 0;
diff --git a/include/block/block_int.h b/include/block/block_int.h
index c168690..96e327b 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -1228,6 +1228,9 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
void *opaque, Error **errp);
void bdrv_root_unref_child(BdrvChild *child);
+void bdrv_get_cumulative_perm(BlockDriverState *bs, uint64_t *perm,
+ uint64_t *shared_perm);
+
/**
* Sets a BdrvChild's permissions. Avoid if the parent is a BDS; use
* bdrv_child_refresh_perms() instead and make the parent's
--
1.8.3.1