mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
1477b6c803
commit
d93e572688
2 changed files with 10 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue