From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] block: JSON filenames and relative backing files
Date: Thu, 23 Oct 2014 11:42:18 -0600 [thread overview]
Message-ID: <54493DFA.6070004@redhat.com> (raw)
In-Reply-To: <1414076175-17034-2-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2589 bytes --]
On 10/23/2014 08:56 AM, Max Reitz wrote:
> 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.
>
Are JSON names the only case where we want to do this, or should we
widen it to all non-file protocol names? Then again, the use of
relative names is currently being used as a NICE way on glusterfs setups
to hide whether two files are both being accessed via gluster protocol
or both being accessed via file protocol (if the gluster volume is also
mapped to the local file system such as via NFS) - that is, referring to
'base.img' as the backing file of 'top.img' works whether you opened
'/path/to/top.img' or 'gluster://host/volume/path/to/top.img', when
base.img and top.img are in the same directory of the gluster volume.
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> Just by the way, the reason for using bs->exact_filename in
> bdrv_get_full_backing_filename() instead of just testing whether
> bs->filename is prefixed by "json:" is that in the future we might have
> cases where bs->filename contains a JSON filename, but
> bs->exact_filename is set to a non-JSON filename (because there are some
> rather vital options, which radically change performance or something
> like that, so we want them to be included in bs->filename if they were
> specified; but we can still generate a plain filename which results in
> the same data read and written, but just in some very different way or
> something like that).
> Actually, I might write a follow-up patch which makes
> bdrv_refresh_filename() always generate an exact_filename if somehow
> possible, even if unknown options were specified. This would then be
> very useful for this function, but on the other hand, it would no longer
> fit the definition of exact_filename (in order to follow that
> definition, we have to be certain that we don't omit any vital options
> which really change the data read and written).
> ---
> block.c | 19 +++++++++++++++----
> block/qapi.c | 7 ++++++-
> include/block/block.h | 2 +-
> 3 files changed, 22 insertions(+), 6 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-10-23 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 14:56 [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files Max Reitz
2014-10-23 14:56 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2014-10-23 17:42 ` Eric Blake [this message]
2014-10-23 18:00 ` Max Reitz
2014-10-29 15:29 ` Kevin Wolf
2014-10-23 14:56 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for relative backing file names Max Reitz
2014-10-23 17:48 ` Eric Blake
2014-10-23 17:53 ` [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files Eric Blake
2014-10-28 16:14 ` Stefan Hajnoczi
2014-11-03 11:41 ` Stefan Hajnoczi
2014-11-03 12:00 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54493DFA.6070004@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).