qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org
Subject: [PATCH 1/4] block: rename the bdrv_co_block_status static function
Date: Wed,  5 Apr 2023 12:32:13 +0200	[thread overview]
Message-ID: <20230405103216.128103-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20230405103216.128103-1-pbonzini@redhat.com>

bdrv_block_status exists as a wrapper for bdrv_block_status_above,
but the name of the (hypothetical) coroutine version, bdrv_co_block_status,
is squatted by a random static function.  Rename it to bdrv_do_block_status.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/io.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/block/io.c b/block/io.c
index db438c765757..e86090b7692b 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2230,7 +2230,7 @@ int bdrv_flush_all(void)
  * set to the host mapping and BDS corresponding to the guest offset.
  */
 static int coroutine_fn GRAPH_RDLOCK
-bdrv_co_block_status(BlockDriverState *bs, bool want_zero,
+bdrv_do_block_status(BlockDriverState *bs, bool want_zero,
                      int64_t offset, int64_t bytes,
                      int64_t *pnum, int64_t *map, BlockDriverState **file)
 {
@@ -2391,7 +2391,7 @@ bdrv_co_block_status(BlockDriverState *bs, bool want_zero,
 
     if (ret & BDRV_BLOCK_RAW) {
         assert(ret & BDRV_BLOCK_OFFSET_VALID && local_file);
-        ret = bdrv_co_block_status(local_file, want_zero, local_map,
+        ret = bdrv_do_block_status(local_file, want_zero, local_map,
                                    *pnum, pnum, &local_map, &local_file);
         goto out;
     }
@@ -2419,7 +2419,7 @@ bdrv_co_block_status(BlockDriverState *bs, bool want_zero,
         int64_t file_pnum;
         int ret2;
 
-        ret2 = bdrv_co_block_status(local_file, want_zero, local_map,
+        ret2 = bdrv_do_block_status(local_file, want_zero, local_map,
                                     *pnum, &file_pnum, NULL, NULL);
         if (ret2 >= 0) {
             /* Ignore errors.  This is just providing extra information, it
@@ -2487,7 +2487,7 @@ bdrv_co_common_block_status_above(BlockDriverState *bs,
         return 0;
     }
 
-    ret = bdrv_co_block_status(bs, want_zero, offset, bytes, pnum, map, file);
+    ret = bdrv_do_block_status(bs, want_zero, offset, bytes, pnum, map, file);
     ++*depth;
     if (ret < 0 || *pnum == 0 || ret & BDRV_BLOCK_ALLOCATED || bs == base) {
         return ret;
@@ -2503,7 +2503,7 @@ bdrv_co_common_block_status_above(BlockDriverState *bs,
     for (p = bdrv_filter_or_cow_bs(bs); include_base || p != base;
          p = bdrv_filter_or_cow_bs(p))
     {
-        ret = bdrv_co_block_status(p, want_zero, offset, bytes, pnum, map,
+        ret = bdrv_do_block_status(p, want_zero, offset, bytes, pnum, map,
                                    file);
         ++*depth;
         if (ret < 0) {
-- 
2.39.2



  reply	other threads:[~2023-04-05 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 10:32 [PATCH 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}* Paolo Bonzini
2023-04-05 10:32 ` Paolo Bonzini [this message]
2023-04-21 14:55   ` [PATCH 1/4] block: rename the bdrv_co_block_status static function Eric Blake
2023-04-05 10:32 ` [PATCH 2/4] block: complete public block status API Paolo Bonzini
2023-04-21 14:58   ` Eric Blake
2023-04-05 10:32 ` [PATCH 3/4] block: switch to co_wrapper for bdrv_is_allocated_* Paolo Bonzini
2023-04-21 14:59   ` Eric Blake
2023-04-05 10:32 ` [PATCH 4/4] block: convert more bdrv_is_allocated* and bdrv_block_status* calls to coroutine versions Paolo Bonzini
2023-04-21 15:01   ` Eric Blake
2023-04-21  9:34 ` [PATCH 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}* Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230405103216.128103-2-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).