block: Implement blk_pwrite_zeroes() using generated_co_wrapper

Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220705161527.1054072-13-afaria@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
Alberto Faria 2022-07-05 17:15:20 +01:00 committed by Hanna Reitz
parent 2c9715fa28
commit 1c95dc914a
3 changed files with 20 additions and 10 deletions

View file

@ -1411,14 +1411,6 @@ typedef struct BlkRwCo {
BdrvRequestFlags flags;
} BlkRwCo;
int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset,
int64_t bytes, BdrvRequestFlags flags)
{
IO_OR_GS_CODE();
return blk_pwritev_part(blk, offset, bytes, NULL, 0,
flags | BDRV_REQ_ZERO_WRITE);
}
int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags)
{
GLOBAL_STATE_CODE();