Skip to content

Commit e192179

Browse files
Vladimir Sementsov-Ogievskiyebblake
authored andcommitted
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 <[email protected]> Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> [eblake: grammar tweaks] Signed-off-by: Eric Blake <[email protected]>
1 parent 06f0325 commit e192179

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

block/block-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,7 @@ void blk_unregister_buf(BlockBackend *blk, void *host)
24182418

24192419
int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
24202420
BlockBackend *blk_out, int64_t off_out,
2421-
int bytes, BdrvRequestFlags read_flags,
2421+
int64_t bytes, BdrvRequestFlags read_flags,
24222422
BdrvRequestFlags write_flags)
24232423
{
24242424
int r;

include/sysemu/block-backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void blk_unregister_buf(BlockBackend *blk, void *host);
270270

271271
int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
272272
BlockBackend *blk_out, int64_t off_out,
273-
int bytes, BdrvRequestFlags read_flags,
273+
int64_t bytes, BdrvRequestFlags read_flags,
274274
BdrvRequestFlags write_flags);
275275

276276
const BdrvChild *blk_root(BlockBackend *blk);

0 commit comments

Comments
 (0)