qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 0/2] block: JSON filenames and relative backing files
Date: Thu, 23 Oct 2014 11:53:25 -0600	[thread overview]
Message-ID: <54494095.70506@redhat.com> (raw)
In-Reply-To: <1414076175-17034-1-git-send-email-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On 10/23/2014 08:56 AM, Max Reitz wrote:
> Sometimes, qemu does not have a filename to work with (it then generates
> a JSON filename), so it does not know which directory to use for a
> backing file specified by a relative filename.
> 
> In this case, qemu should not somehow try to append the backing file's
> name to the JSON object, but rather just print an error and bail out.

Hmm. Makes me wonder if we should extend BlockdevOptions to allow for a
BDS to additionally track a notion of "current directory" from which any
relative names should be interpreted against.  That is, something like:

 TEST_IMG="json:{
     'driver': '$IMGFMT',
     'file': {
         'driver': 'blkdebug',
         'image': {
             'driver': 'file',
             'filename': '$TEST_IMG'
         },
+        'rel-dir': '$DIR_OF_TEST_IMG_BACK',
         'set-state': [
             {
                 'event': 'read_aio',
                 'new_state': 42
             }
         ]
     }
 }" _img_info | _filter_img_info

being a way to let us access the (otherwise relative-only) backing file
encoded behind the blkdebug wall with a notion of the correct directory
to find it in.  Of course, such an extension to BDS description (for
both command line and QMP) would be a separate series...

-- 
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 --]

  parent reply	other threads:[~2014-10-23 17:53 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
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 ` Eric Blake [this message]
2014-10-28 16:14 ` [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files 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=54494095.70506@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).