qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v8 04/26] iotests: Drop explicit base blockdev i


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v8 04/26] iotests: Drop explicit base blockdev in 191
Date: Thu, 22 Feb 2018 16:06:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-02-22 15:34, Kevin Wolf wrote:
> Am 05.02.2018 um 16:18 hat Max Reitz geschrieben:
>> Overriding the backing image should result in a json:{} pseudo-filename.
>> Then, you can no longer use the commit block job with filename
>> parameters.  Therefore, do not explicitly add the base and override the
>> middle image in iotest 191, since we do not need to anyway.  This will
>> allow us to continue to use the middle image's filename to identify it.
>>
>> In the long run, we want block-commit to accept node names for base and
>> top (just like block-stream does).
>>
>> Signed-off-by: Max Reitz <address@hidden>
> 
> Is this actually needed once the FIXME in patch 3 is addressed and only
> significant fields are considered, or can we revert the patch at the end
> of the series?

The empiric result is "no". :-)

In the series's current state, overriding the backing file always means
that it is being treated as overridden -- even if you override it with
itself and thus the resulting graph is basically the same.

I'm still open to suggestions whether we can do anything about this, but
the only thing that comes to my mind is:

(1) Open bs->backing_file as a BDS.
(2) Run bdrv_refresh_filename() on it (done automatically).
(3) Compare the result with bs->backing->bs->filename.

But you can't just open bs->backing_file twice (that is, have to BDS
that refer to the same file), except maybe with BDRV_O_NO_IO.  Still,
that would be a huge hack.  (And isn't guaranteed to work, even with
BDRV_O_NO_IO.)

So what we'd need is an off-line bdrv_refresh_filename() that constructs
a filename from filename+options, without a BDS.  But honestly, I don't
want to write that just so that we can continue to do blockdev-commit
with filenames.  I'd rather break it so we get node names there.

Max

> Once we implement a node-named based blockdev-commit, we'll want to test
> both versions here, so it would be good to be able to set a node-name
> and still be able to use the filename for the older interface.
> 
> Kevin
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]