cryptospore / rpms / qemu-kvm

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