qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 29/33] block: Make bdrv_filter_default_perms() static


From: Eric Blake
Subject: Re: [PATCH v2 29/33] block: Make bdrv_filter_default_perms() static
Date: Tue, 11 Feb 2020 09:48:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/4/20 11:08 AM, Max Reitz wrote:
Signed-off-by: Max Reitz <address@hidden>
---
  block.c                   | 12 ++++++------
  include/block/block_int.h | 10 ----------
  2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/block.c b/block.c
index 747a2973f5..091e9cc16a 100644
--- a/block.c
+++ b/block.c
@@ -2194,12 +2194,12 @@ int bdrv_child_refresh_perms(BlockDriverState *bs, 
BdrvChild *c, Error **errp)
      return bdrv_child_try_set_perm(c, perms, shared, errp);
  }
-void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,
-                               const BdrvChildClass *child_class,
-                               BdrvChildRole role,
-                               BlockReopenQueue *reopen_queue,
-                               uint64_t perm, uint64_t shared,
-                               uint64_t *nperm, uint64_t *nshared)
+static void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,
+                                      const BdrvChildClass *child_class,
+                                      BdrvChildRole role,
+                                      BlockReopenQueue *reopen_queue,
+                                      uint64_t perm, uint64_t shared,
+                                      uint64_t *nperm, uint64_t *nshared)
  {

Hmm - no comment here...

      *nperm = perm & DEFAULT_PERM_PASSTHROUGH;
      *nshared = (shared & DEFAULT_PERM_PASSTHROUGH) | DEFAULT_PERM_UNCHANGED;
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 7b51866678..5e3f512ae8 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -1254,16 +1254,6 @@ int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, 
uint64_t shared,
   */
  int bdrv_child_refresh_perms(BlockDriverState *bs, BdrvChild *c, Error 
**errp);
-/* Default implementation for BlockDriver.bdrv_child_perm() that can be used by
- * block filters: Forward CONSISTENT_READ, WRITE, WRITE_UNCHANGED and RESIZE to
- * all children */
-void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,

...and you lost the comment here. It's still a useful comment, so move it to the .c (and wing it to keep syntax check happy). With that,

Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]