diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-10-06 15:17:09 +0200 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-10-15 15:47:18 -0500 |
commit | 34460feb63230daad12b0e0f31754f7ef5bc2be9 (patch) | |
tree | a2d58ff1d8bdc2e522aa094e1981304a38e28321 /include/sysemu/block-backend.h | |
parent | 9547907705c94fa0415427ce12be418f8b68b56d (diff) | |
download | qemu-34460feb63230daad12b0e0f31754f7ef5bc2be9.zip qemu-34460feb63230daad12b0e0f31754f7ef5bc2be9.tar.gz qemu-34460feb63230daad12b0e0f31754f7ef5bc2be9.tar.bz2 |
block-backend: convert blk_co_pwritev_part to int64_t bytes
We convert blk_do_pwritev_part() and some wrappers:
blk_co_pwritev_part(), blk_co_pwritev(), blk_co_pwrite_zeroes().
All functions are converted so that the parameter type becomes wider, so
all callers should be OK with it.
Look at blk_do_pwritev_part() body:
bytes is passed to:
- trace_blk_co_pwritev (we update it here)
- blk_check_byte_request, throttle_group_co_io_limits_intercept,
bdrv_co_pwritev_part - all already have int64_t argument.
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-4-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: grammar tweaks]
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r-- | include/sysemu/block-backend.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 442fd70..91457a0 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -129,11 +129,11 @@ int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset, int64_t bytes, QEMUIOVector *qiov, BdrvRequestFlags flags); int coroutine_fn blk_co_pwritev_part(BlockBackend *blk, int64_t offset, - unsigned int bytes, + int64_t bytes, QEMUIOVector *qiov, size_t qiov_offset, BdrvRequestFlags flags); int coroutine_fn blk_co_pwritev(BlockBackend *blk, int64_t offset, - unsigned int bytes, QEMUIOVector *qiov, + int64_t bytes, QEMUIOVector *qiov, BdrvRequestFlags flags); static inline int coroutine_fn blk_co_pread(BlockBackend *blk, int64_t offset, @@ -243,7 +243,7 @@ int blk_get_open_flags_from_root_state(BlockBackend *blk); void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, BlockCompletionFunc *cb, void *opaque); int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int bytes, BdrvRequestFlags flags); + int64_t bytes, BdrvRequestFlags flags); int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *buf, int bytes); int blk_truncate(BlockBackend *blk, int64_t offset, bool exact, |