OSDN Git Service

block: Enable BDRV_O_SNAPSHOT with driver-specific options
authorKevin Wolf <kwolf@redhat.com>
Thu, 14 Nov 2013 14:37:12 +0000 (15:37 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 29 Nov 2013 12:40:37 +0000 (13:40 +0100)
commit9fd3171af9d7de2777bf38ce79c2fe3dd6f9a49e
treebed98d46ad99a96532a374da432e65b70170d1b6
parentb59b3d57737a0d40450f8232abd89e8986387402
block: Enable BDRV_O_SNAPSHOT with driver-specific options

In the case of snapshot=on, don't rely on the backing file path in the
temporary image any more, but override the backing file with the given
set of options. This way, block drivers that don't use a file name can
be accessed with snapshot=on, for example:

    -drive file.driver=nbd,file.host=localhost,snapshot=on

Which becomes internally something like:

    file.filename=/tmp/vl.AWQZCu,backing.file.driver=nbd,backing.file.host=localhost

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c