diff options
author | Max Reitz <mreitz@redhat.com> | 2014-11-26 17:20:26 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-01-13 11:47:56 +0000 |
commit | 9f07429e8873124c588847b0d499cb32b9410bdd (patch) | |
tree | f5de29af3815e86167edb769feddd6013ab32d12 /include/block | |
parent | 0a82855a1a819f3de49781d42728f485fbd64284 (diff) | |
download | qemu-9f07429e8873124c588847b0d499cb32b9410bdd.zip qemu-9f07429e8873124c588847b0d499cb32b9410bdd.tar.gz qemu-9f07429e8873124c588847b0d499cb32b9410bdd.tar.bz2 |
block: JSON filenames and relative backing files
When using a relative backing file name, qemu needs to know the
directory of the top image file. For JSON filenames, such a directory
cannot be easily determined (e.g. how do you determine the directory of
a qcow2 BDS directly on top of a quorum BDS?). Therefore, do not allow
relative filenames for the backing file of BDSs only having a JSON
filename.
Furthermore, BDS::exact_filename should be used whenever possible. If
BDS::filename is not equal to BDS::exact_filename, the former will
always be a JSON object.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/block/block.h b/include/block/block.h index eac9bb0..9efaa80 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -396,10 +396,11 @@ const char *bdrv_get_encrypted_filename(BlockDriverState *bs); void bdrv_get_backing_filename(BlockDriverState *bs, char *filename, int filename_size); void bdrv_get_full_backing_filename(BlockDriverState *bs, - char *dest, size_t sz); + char *dest, size_t sz, Error **errp); void bdrv_get_full_backing_filename_from_filename(const char *backed, const char *backing, - char *dest, size_t sz); + char *dest, size_t sz, + Error **errp); int bdrv_is_snapshot(BlockDriverState *bs); int path_has_protocol(const char *path); |