[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_ze
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v2 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes() |
Date: |
Mon, 27 Apr 2020 11:23:13 +0300 |
We are generally moving to int64_t for both offset and bytes parameters
on all io paths. Prepare bdrv_co_do_pwrite_zeroes() now.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block/io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/io.c b/block/io.c
index 4796476835..c8c30e3699 100644
--- a/block/io.c
+++ b/block/io.c
@@ -42,7 +42,7 @@
static void bdrv_parent_cb_resize(BlockDriverState *bs);
static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
- int64_t offset, int bytes, BdrvRequestFlags flags);
+ int64_t offset, int64_t bytes, BdrvRequestFlags flags);
static void bdrv_parent_drained_begin(BlockDriverState *bs, BdrvChild *ignore,
bool ignore_bds_parents)
@@ -1743,7 +1743,7 @@ int coroutine_fn bdrv_co_preadv_part(BdrvChild *child,
}
static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
- int64_t offset, int bytes, BdrvRequestFlags flags)
+ int64_t offset, int64_t bytes, BdrvRequestFlags flags)
{
BlockDriver *drv = bs->drv;
QEMUIOVector qiov;
@@ -1773,7 +1773,7 @@ static int coroutine_fn
bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
assert(max_write_zeroes >= bs->bl.request_alignment);
while (bytes > 0 && !ret) {
- int num = bytes;
+ int64_t num = bytes;
/* Align request. Block drivers can expect the "bulk" of the request
* to be aligned, and that unaligned requests do not cross cluster
--
2.21.0
- Re: [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes, (continued)
[PATCH v2 02/17] block: use int64_t as bytes type in tracked requests, Vladimir Sementsov-Ogievskiy, 2020/04/27
Re: [PATCH v2 02/17] block: use int64_t as bytes type in tracked requests, Vladimir Sementsov-Ogievskiy, 2020/04/27
Re: [PATCH v2 02/17] block: use int64_t as bytes type in tracked requests, Eric Blake, 2020/04/29
[PATCH v2 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes(),
Vladimir Sementsov-Ogievskiy <=
[PATCH v2 03/17] block/io: use int64_t bytes parameter in bdrv_check_byte_request(), Vladimir Sementsov-Ogievskiy, 2020/04/27
[PATCH v2 06/17] block/io: support int64_t bytes in bdrv_aligned_pwritev(), Vladimir Sementsov-Ogievskiy, 2020/04/27
Re: [PATCH v2 06/17] block/io: support int64_t bytes in bdrv_aligned_pwritev(), Vladimir Sementsov-Ogievskiy, 2020/04/30