From ac850bf099f8a356788d487c5205345dfd755fca Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 4 Jun 2019 19:15:06 +0300 Subject: block: define .*_part io handlers in BlockDriver Add handlers supporting qiov_offset parameter: bdrv_co_preadv_part bdrv_co_pwritev_part bdrv_co_pwritev_compressed_part This is used to reduce need of defining local_qiovs and hd_qiovs in all corners of block layer code. The following patches will increase usage of this new API part by part. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Stefan Hajnoczi Message-id: 20190604161514.262241-5-vsementsov@virtuozzo.com Message-Id: <20190604161514.262241-5-vsementsov@virtuozzo.com> Signed-off-by: Stefan Hajnoczi --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/backup.c') diff --git a/block/backup.c b/block/backup.c index 2baf7bed65..03637aeb11 100644 --- a/block/backup.c +++ b/block/backup.c @@ -674,7 +674,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, return NULL; } - if (compress && target->drv->bdrv_co_pwritev_compressed == NULL) { + if (compress && !block_driver_can_compress(target->drv)) { error_setg(errp, "Compression is not supported for this drive %s", bdrv_get_device_name(target)); return NULL; -- cgit v1.2.3