static int vhdx_allocate_block(BlockDriverState *bs, BDRVVHDXState *s,

                                    uint64_t *new_offset)

{

    *new_offset = bdrv_getlength(bs->file->bs);



    /* per the spec, the address for a block is in units of 1MB */

    *new_offset = ROUND_UP(*new_offset, 1024 * 1024);



    return bdrv_truncate(bs->file, *new_offset + s->block_size,

                         PREALLOC_MODE_OFF, NULL);

}

static int vhdx_allocate_block(BlockDriverState *bs, BDRVVHDXState *s,

                                    uint64_t *new_offset)

{

    *new_offset = bdrv_getlength(bs->file->bs);



    

    *new_offset = ROUND_UP(*new_offset, 1024 * 1024);



    return bdrv_truncate(bs->file, *new_offset + s->block_size,

                         PREALLOC_MODE_OFF, NULL);

}

    *new_offset = bdrv_getlength(bs->file->bs);
static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,

                                    uint64_t *VAR_2)

{

    *VAR_2 = bdrv_getlength(VAR_0->file->VAR_0);



    

    *VAR_2 = ROUND_UP(*VAR_2, 1024 * 1024);



    return bdrv_truncate(VAR_0->file, *VAR_2 + VAR_1->block_size,

                         PREALLOC_MODE_OFF, NULL);

}

static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,
uint64_t *VAR_2)
{ *VAR_2 = bdrv_getlength(VAR_0->file->VAR_0); *VAR_2 = ROUND_UP(*VAR_2, 1024 * 1024); return bdrv_truncate(VAR_0->file, *VAR_2 + VAR_1->block_size,
PREALLOC_MODE_OFF, NULL); }