]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Let qcow2_create() handle protocol layer
authorKevin Wolf <kwolf@redhat.com>
Tue, 9 Jan 2018 16:35:26 +0000 (17:35 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 9 Mar 2018 14:17:47 +0000 (15:17 +0100)
commitcbf2b7c4045550353a08c0b182beef7a72e4f813
treedcc6f622f6de7dada70ac9be84cd9d4258de48fe
parent8ca5bfdc46031a10475fce428446d3e3c1b89e5b
qcow2: Let qcow2_create() handle protocol layer

Currently, qcow2_create() only parses the QemuOpts and then calls
qcow2_co_create() for the actual image creation, which includes both the
creation of the actual file on the file system and writing a valid empty
qcow2 image into that file.

The plan is that qcow2_co_create() becomes the function that implements
the functionality for a future 'blockdev-create' QMP command, which only
creates the qcow2 layer on an already opened file node.

This is a first step towards that goal: Let's move out anything that
deals with the protocol layer from qcow2_co_create() into
qcow2_create().  This means that qcow2_co_create() doesn't need a file
name any more.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c