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 <mre...@redhat.com>
> 
> 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