diff options
author | Vladimir Sementsov-Ogievskiy | 2019-06-04 18:15:06 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2019-08-27 15:58:42 +0200 |
commit | ac850bf099f8a356788d487c5205345dfd755fca (patch) | |
tree | 4a28c7ae9b6ff9c90ad8231885eabc7a42df49f6 /qemu-img.c | |
parent | block/io: refactor padding (diff) | |
download | qemu-ac850bf099f8a356788d487c5205345dfd755fca.tar.gz qemu-ac850bf099f8a356788d487c5205345dfd755fca.tar.xz qemu-ac850bf099f8a356788d487c5205345dfd755fca.zip |
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 <vsementsov@virtuozzo.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20190604161514.262241-5-vsementsov@virtuozzo.com
Message-Id: <20190604161514.262241-5-vsementsov@virtuozzo.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c index 7daa05e51a..4ee436fc94 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2388,7 +2388,7 @@ static int img_convert(int argc, char **argv) const char *preallocation = qemu_opt_get(opts, BLOCK_OPT_PREALLOC); - if (drv && !drv->bdrv_co_pwritev_compressed) { + if (drv && !block_driver_can_compress(drv)) { error_report("Compression not supported for this file format"); ret = -1; goto out; @@ -2459,7 +2459,7 @@ static int img_convert(int argc, char **argv) } out_bs = blk_bs(s.target); - if (s.compressed && !out_bs->drv->bdrv_co_pwritev_compressed) { + if (s.compressed && !block_driver_can_compress(out_bs->drv)) { error_report("Compression not supported for this file format"); ret = -1; goto out; |