]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: vdi - use block layer ops in vdi_create, instead of posix calls
authorJeff Cody <jcody@redhat.com>
Wed, 23 Jul 2014 21:22:58 +0000 (17:22 -0400)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Aug 2014 13:07:14 +0000 (15:07 +0200)
commit70747862f129ea0af5e3910f204cc93174c549e4
tree48512ce35a289b218f16084107a8e9365e018362
parent9a4d5ca60772e09d0cbac01f1b4778aa68e00eaa
block: vdi - use block layer ops in vdi_create, instead of posix calls

Use the block layer to create, and write to, the image file in the
VDI .bdrv_create() operation.

This has a couple of benefits: Images can now be created over protocols,
and hacks such as NOCOW are not needed in the image format driver, and
the underlying file protocol appropriate for the host OS can be relied
upon.

Also some minor cleanup for error handling.

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vdi.c