summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2019-04-23 14:57:05 +0200
committerKevin Wolf2019-06-04 16:55:58 +0200
commitd93e57268892d555d7c71ec30b25276b0d8132b6 (patch)
treeb8fc2dd5e290b52204aaabbcd3cf3f966834eaef /include/block/block.h
parentblock/qcow2-refcount: add trace-point to qcow2_process_discards (diff)
downloadqemu-d93e57268892d555d7c71ec30b25276b0d8132b6.tar.gz
qemu-d93e57268892d555d7c71ec30b25276b0d8132b6.tar.xz
qemu-d93e57268892d555d7c71ec30b25276b0d8132b6.zip
block/io: bdrv_pdiscard: support int64_t bytes parameter
This fixes at least one overflow in qcow2_process_discards, which passes 64bit region length to bdrv_pdiscard where bytes (or sectors in the past) parameter is int since its introduction in 0b919fae. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 13ea050a5b..f9415ed740 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -434,8 +434,8 @@ void bdrv_drain_all(void);
AIO_WAIT_WHILE(bdrv_get_aio_context(bs_), \
cond); })
-int bdrv_pdiscard(BdrvChild *child, int64_t offset, int bytes);
-int bdrv_co_pdiscard(BdrvChild *child, int64_t offset, int bytes);
+int bdrv_pdiscard(BdrvChild *child, int64_t offset, int64_t bytes);
+int bdrv_co_pdiscard(BdrvChild *child, int64_t offset, int64_t bytes);
int bdrv_has_zero_init_1(BlockDriverState *bs);
int bdrv_has_zero_init(BlockDriverState *bs);
bool bdrv_unallocated_blocks_are_zero(BlockDriverState *bs);