aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-10-06 15:17:15 +0200
committerEric Blake <eblake@redhat.com>2021-10-15 15:55:28 -0500
commite192179bb2c080f0130a7ff427c2572909fc31ed (patch)
tree5e4e8490fb299ccad527cb9b69c26b5ef95f5606
parent06f0325c5b62f80bab1c9eb50edc814158d6005e (diff)
downloadqemu-e192179bb2c080f0130a7ff427c2572909fc31ed.zip
qemu-e192179bb2c080f0130a7ff427c2572909fc31ed.tar.gz
qemu-e192179bb2c080f0130a7ff427c2572909fc31ed.tar.bz2
block-backend: convert blk_co_copy_range to int64_t bytes
Function is updated so that parameter type becomes wider, so all callers should be OK with it. Look at blk_co_copy_range() itself: bytes is passed only to blk_check_byte_request() and bdrv_co_copy_range(), which already have int64_t bytes parameter, so we are OK. Note that requests exceeding INT_MAX are still restricted by blk_check_byte_request(). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211006131718.214235-10-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: grammar tweaks] Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r--block/block-backend.c2
-rw-r--r--include/sysemu/block-backend.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index ee20ae5..0746be8 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2418,7 +2418,7 @@ void blk_unregister_buf(BlockBackend *blk, void *host)
int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
BlockBackend *blk_out, int64_t off_out,
- int bytes, BdrvRequestFlags read_flags,
+ int64_t bytes, BdrvRequestFlags read_flags,
BdrvRequestFlags write_flags)
{
int r;
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 3294d1b..9ccf9f1 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -270,7 +270,7 @@ void blk_unregister_buf(BlockBackend *blk, void *host);
int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
BlockBackend *blk_out, int64_t off_out,
- int bytes, BdrvRequestFlags read_flags,
+ int64_t bytes, BdrvRequestFlags read_flags,
BdrvRequestFlags write_flags);
const BdrvChild *blk_root(BlockBackend *blk);