[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/15] block: Allow overriding backing.file.file
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 15/15] block: Allow overriding backing.file.filename |
Date: |
Mon, 15 Apr 2013 15:03:22 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/12/2013 02:48 PM, Kevin Wolf wrote:
> If a filename is passed in the driver-specific options from the command
> line, the backing file path from the image is ignored now.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index c2d1d2d..3a45c2a 100644
> --- a/block.c
> +++ b/block.c
> @@ -889,7 +889,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict
> *options)
> }
>
> bs->open_flags &= ~BDRV_O_NO_BACKING;
> - if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) {
> + if (qdict_haskey(options, "file.filename")) {
> + backing_filename[0] = '\0';
> + } else if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) {
Of course, the user can abuse this at their peril, but the flexibility
it adds (being able to pass in a /dev/fdset to let the command line
specify an open fd as backing file even when open() is forbidden on NFS)
is just AWESOME!
Looking forward to a QMP counterpart; I'll definitely review that, as
libvirt is still reluctant to use fdsets for image manipulation on the
command line if we can't follow it up with hot-plug manipulation, but I
love where this is heading.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 10/15] iscsi: Use bdrv_open options instead of filename, (continued)
- [Qemu-devel] [PATCH 11/15] rbd: Use bdrv_open options instead of filename, Kevin Wolf, 2013/04/12
- [Qemu-devel] [PATCH 12/15] sheepdog: Use bdrv_open options instead of filename, Kevin Wolf, 2013/04/12
- [Qemu-devel] [PATCH 13/15] vvfat: Use bdrv_open options instead of filename, Kevin Wolf, 2013/04/12
- [Qemu-devel] [PATCH 14/15] block: Remove filename parameter from .bdrv_file_open(), Kevin Wolf, 2013/04/12
- [Qemu-devel] [PATCH 15/15] block: Allow overriding backing.file.filename, Kevin Wolf, 2013/04/12
- Re: [Qemu-devel] [PATCH 15/15] block: Allow overriding backing.file.filename,
Eric Blake <=
- Re: [Qemu-devel] [PATCH 00/15] block: Overriding the backing file with -drive, Stefan Hajnoczi, 2013/04/18