Blame SOURCES/kvm-block-Make-bdrv_get_cumulative_perm-public.patch

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