aboutsummaryrefslogtreecommitdiff
path: root/block/commit.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2022-11-28 09:23:27 -0500
committerKevin Wolf <kwolf@redhat.com>2022-12-15 16:07:43 +0100
commitff7e261bb91ecf44df12a551582187ddf6b187fe (patch)
tree125762e90f4006de8ca25340b576fc33da6ade26 /block/commit.c
parent6f58ac55396bc624c78e73939d5fe6a44a13d150 (diff)
downloadqemu-ff7e261bb91ecf44df12a551582187ddf6b187fe.zip
qemu-ff7e261bb91ecf44df12a551582187ddf6b187fe.tar.gz
qemu-ff7e261bb91ecf44df12a551582187ddf6b187fe.tar.bz2
block-backend: replace bdrv_*_above with blk_*_above
Avoid mixing bdrv_* functions with blk_*, so create blk_* counterparts for bdrv_block_status_above and bdrv_is_allocated_above. Note that since blk_co_block_status_above only calls the g_c_w function bdrv_common_block_status_above and is marked as coroutine_fn, call directly bdrv_co_common_block_status_above() to avoid using a g_c_w. Same applies to blk_co_is_allocated_above. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20221128142337.657646-5-eesposit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/commit.c')
-rw-r--r--block/commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/commit.c b/block/commit.c
index 0029b31..b346341 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -155,8 +155,8 @@ static int coroutine_fn commit_run(Job *job, Error **errp)
break;
}
/* Copy if allocated above the base */
- ret = bdrv_is_allocated_above(blk_bs(s->top), s->base_overlay, true,
- offset, COMMIT_BUFFER_SIZE, &n);
+ ret = blk_co_is_allocated_above(s->top, s->base_overlay, true,
+ offset, COMMIT_BUFFER_SIZE, &n);
copy = (ret > 0);
trace_commit_one_iteration(s, offset, n, ret);
if (copy) {