mirror of https://github.com/xqemu/xqemu.git
block/raw: add bdrv_co_write_zeroes
Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
4105eaaab9
commit
8bf9344ad6
|
@ -42,6 +42,13 @@ static int coroutine_fn raw_co_is_allocated(BlockDriverState *bs,
|
||||||
return bdrv_co_is_allocated(bs->file, sector_num, nb_sectors, pnum);
|
return bdrv_co_is_allocated(bs->file, sector_num, nb_sectors, pnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int coroutine_fn raw_co_write_zeroes(BlockDriverState *bs,
|
||||||
|
int64_t sector_num,
|
||||||
|
int nb_sectors)
|
||||||
|
{
|
||||||
|
return bdrv_co_write_zeroes(bs->file, sector_num, nb_sectors);
|
||||||
|
}
|
||||||
|
|
||||||
static int64_t raw_getlength(BlockDriverState *bs)
|
static int64_t raw_getlength(BlockDriverState *bs)
|
||||||
{
|
{
|
||||||
return bdrv_getlength(bs->file);
|
return bdrv_getlength(bs->file);
|
||||||
|
@ -128,6 +135,7 @@ static BlockDriver bdrv_raw = {
|
||||||
.bdrv_co_readv = raw_co_readv,
|
.bdrv_co_readv = raw_co_readv,
|
||||||
.bdrv_co_writev = raw_co_writev,
|
.bdrv_co_writev = raw_co_writev,
|
||||||
.bdrv_co_is_allocated = raw_co_is_allocated,
|
.bdrv_co_is_allocated = raw_co_is_allocated,
|
||||||
|
.bdrv_co_write_zeroes = raw_co_write_zeroes,
|
||||||
.bdrv_co_discard = raw_co_discard,
|
.bdrv_co_discard = raw_co_discard,
|
||||||
|
|
||||||
.bdrv_probe = raw_probe,
|
.bdrv_probe = raw_probe,
|
||||||
|
|
Loading…
Reference in New Issue