diff options
| author | Pavel Butsykin <pbutsykin@virtuozzo.com> | 2016-07-22 11:17:42 +0300 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2016-09-05 19:06:48 +0200 |
| commit | 29a298af9d2479cc230505b18d5a5c2da0ab578e (patch) | |
| tree | f5467388319fa4f7c475a1078a6f73dfb895920c /qemu-img.c | |
| parent | 751e2f0698c284b4924d83ec63fa4e834bf4c80d (diff) | |
| download | focaccia-qemu-29a298af9d2479cc230505b18d5a5c2da0ab578e.tar.gz focaccia-qemu-29a298af9d2479cc230505b18d5a5c2da0ab578e.zip | |
block/io: reuse bdrv_co_pwritev() for write compressed
For bdrv_pwrite_compressed() it looks like most of the code creating coroutine is duplicated in bdrv_prwv_co(). So we can just add a flag (BDRV_REQ_WRITE_COMPRESSED) and use bdrv_prwv_co() as a generic one. In the end we get coroutine oriented function for write compressed by using bdrv_co_pwritev/blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED flag. Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Jeff Cody <jcody@redhat.com> CC: Markus Armbruster <armbru@redhat.com> CC: Eric Blake <eblake@redhat.com> CC: John Snow <jsnow@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
| -rw-r--r-- | qemu-img.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c index ef0157aa8a..c2ea494928 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2034,7 +2034,7 @@ static int img_convert(int argc, char **argv) const char *preallocation = qemu_opt_get(opts, BLOCK_OPT_PREALLOC); - if (!drv->bdrv_write_compressed) { + if (!drv->bdrv_write_compressed && !drv->bdrv_co_pwritev_compressed) { error_report("Compression not supported for this file format"); ret = -1; goto out; |