[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] block: JSON filenames and relative backing files |
Date: |
Thu, 23 Oct 2014 11:53:25 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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
signature.asc
Description: OpenPGP digital signature