qemu-e2k/block
Jeff Cody 54e2690090 block: extend block-commit to accept a string for the backing file
On some image chains, QEMU may not always be able to resolve the
filenames properly, when updating the backing file of an image
after a block commit.

For instance, certain relative pathnames may fail, or drives may
have been specified originally by file descriptor (e.g. /dev/fd/???),
or a relative protocol pathname may have been used.

In these instances, QEMU may lack the information to be able to make
the correct choice, but the user or management layer most likely does
have that knowledge.

With this extension to the block-commit api, the user is able to change
the backing file of the overlay image as part of the block-commit
operation.

This allows the change to be 'safe', in the sense that if the attempt
to write the overlay image metadata fails, then the block-commit
operation returns failure, without disrupting the guest.

If the commit top is the active layer, then specifying the backing
file string will be treated as an error (there is no overlay image
to modify in that case).

If a backing file string is not specified in the command, the backing
file string to use is determined in the same manner as it was
previously.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-07-01 10:47:01 +02:00
..
Makefile.objs Block patches 2014-02-25 10:50:11 +00:00
backup.c qapi: adjust existing defines 2014-06-23 11:01:25 -04:00
blkdebug.c blkdebug: use BlockDriverState's AioContext 2014-06-04 09:56:11 +02:00
blkverify.c blkverify: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:11 +02:00
bochs.c block/bochs: Fix error handling for seek_to_sector() 2014-04-30 14:46:17 +02:00
cloop.c block/cloop: use PRIu32 format specifier for uint32_t 2014-04-23 11:34:10 +02:00
commit.c block: extend block-commit to accept a string for the backing file 2014-07-01 10:47:01 +02:00
cow.c block/cow: Avoid use of uninitialized cow_bs in error path 2014-07-01 10:15:34 +02:00
curl.c block: Drop superfluous conditionals around g_free() 2014-06-16 17:23:19 +08:00
dmg.c block: Use correct width in format strings 2014-04-30 14:46:17 +02:00
gluster.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
iscsi.c Fix new typos (found by codespell) 2014-06-24 20:01:24 +04:00
linux-aio.c block/linux-aio: fix memory and fd leak 2014-06-04 09:56:11 +02:00
mirror.c block: Add replaces argument to drive-mirror 2014-06-27 20:00:00 +02:00
nbd-client.c nbd: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:11 +02:00
nbd-client.h nbd: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:11 +02:00
nbd.c nbd: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:11 +02:00
nfs.c block/nfs: add knob to set readahead 2014-06-26 13:51:01 +02:00
parallels.c parallels: Sanity check for s->tracks (CVE-2014-0142) 2014-04-01 15:22:35 +02:00
qapi.c block: acquire AioContext in qmp_query_blockstats() 2014-06-27 18:20:29 +02:00
qcow.c block: Catch backing files assigned to non-COW drivers 2014-06-26 13:51:01 +02:00
qcow2-cache.c qcow2: Use negated overflow check mask 2013-10-11 16:50:00 +02:00
qcow2-cluster.c qcow2: Fix memory leak in COW error path 2014-05-28 14:28:46 +02:00
qcow2-refcount.c qapi event: convert BLOCK_IMAGE_CORRUPTED 2014-06-23 11:12:27 -04:00
qcow2-snapshot.c qcow2: Limit snapshot table size 2014-04-01 15:22:35 +02:00
qcow2.c block: Catch backing files assigned to non-COW drivers 2014-06-26 13:51:01 +02:00
qcow2.h qcow2: Limit snapshot table size 2014-04-01 15:22:35 +02:00
qed-check.c qed: mark image clean after repair succeeds 2012-08-10 10:25:12 +02:00
qed-cluster.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-gencb.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-l2-cache.c qed: do not evict in-use L2 table cache entries 2012-03-12 15:14:06 +01:00
qed-table.c qed: use BlockDriverState's AioContext 2014-06-04 09:56:11 +02:00
qed.c qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
qed.h qed.c: replace QEMUOptionParameter with QemuOpts 2014-06-16 17:23:21 +08:00
quorum.c quorum: Add the rewrite-corrupted parameter to quorum 2014-06-27 14:18:17 +02:00
raw-aio.h block/raw-win32: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:12 +02:00
raw-posix.c qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
raw-win32.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
raw_bsd.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
rbd.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
sheepdog.c sheepdog: fix NULL dereference in sd_create 2014-06-23 16:36:13 +08:00
snapshot.c Use error_is_set() only when necessary 2014-02-17 11:57:23 -05:00
ssh.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
stream.c qapi: adjust existing defines 2014-06-23 11:01:25 -04:00
vdi.c qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
vhdx-endian.c block: vhdx - move more endian translations to vhdx-endian.c 2013-11-07 13:58:59 +01:00
vhdx-log.c Fixed various typos 2014-03-25 14:09:50 +01:00
vhdx.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
vhdx.h vhdx.c: replace QEMUOptionParameter with QemuOpts 2014-06-16 17:23:21 +08:00
vmdk.c qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
vpc.c qemu-img create: add 'nocow' option 2014-07-01 10:15:12 +02:00
vvfat.c cleanup QEMUOptionParameter 2014-06-16 17:23:21 +08:00
win32-aio.c block/raw-win32: implement .bdrv_detach/attach_aio_context() 2014-06-04 09:56:12 +02:00