yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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