qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segme


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments
Date: Tue, 22 Jun 2021 20:51:09 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

22.06.2021 18:38, Kevin Wolf wrote:
Am 11.06.2021 um 21:03 hat Eric Blake geschrieben:
To save the user from having to check 'qemu-img info --backing-chain'
or other followup command to determine which "depth":n goes beyond the
chain, add a boolean field "backing" that is set only for unallocated
portions of the disk.

Signed-off-by: Eric Blake <eblake@redhat.com>
---

Touches the same iotest output as 1/1.  If we decide that switching to
"depth":n+1 is too risky, and that the mere addition of "backing":true
while keeping "depth":n is good enough, then we'd have just one patch,
instead of this double churn.  Preferences?

I think the additional flag is better because it's guaranteed to be
backwards compatible, and because you don't need to know the number of
layers to infer whether a cluster was allocated in the whole backing
chain. And by exposing ALLOCATED we definitely give access to the whole
information that exists in QEMU.

However, to continue with the bike shedding: I won't insist on
"allocated" even if that is what the flag is called internally and
consistency is usually helpful, but "backing" is misleading, too,
because intuitively it doesn't cover the top layer or standalone images
without a backing file. How about something like "present"?


IMHO, it does cover. If we have qcow2 image with unallocated clusters, but 
unspecified backing file it's good to know that these unallocated clusters are 
not simply ZERO, but actually point to backing file, which is just absent now 
(and therefore read returns zeros). User may start qemu and specify backing 
file by options, or set backing file in the image, etc. So, the information 
does make sense anyway.

I think it would be good to start saying about backing chains explicitly, and not hide 
them under "allocated" concept which has different meanings.


--
Best regards,
Vladimir



reply via email to

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