qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] nbd: Add new qemu:allocation-depth metacontext


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 2/3] nbd: Add new qemu:allocation-depth metacontext
Date: Sat, 26 Sep 2020 16:19:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2

26.09.2020 10:33, Richard W.M. Jones wrote:
On Fri, Sep 25, 2020 at 03:32:48PM -0500, Eric Blake wrote:
+The second is related to exposing the source of various extents within
+the image, with a single context named:
+
+    qemu:allocation-depth
+
+In the allocation depth context, bits 0 and 1 form a tri-state value:
+
+    bits 0-1 clear: NBD_STATE_DEPTH_UNALLOC, means the extent is unallocated
+    bit 0 set: NBD_STATE_DEPTH_LOCAL, the extent is allocated in this image
+    bit 1 set: NBD_STATE_DEPTH_BACKING, the extent is inherited from a
+               backing layer

 From the cover description I imagined it would show the actual depth, ie:

          top -> backing -> backing -> backing
  depth:   1        2         3   ....          (0 = unallocated)

I wonder if that is possible?  (Perhaps there's something I don't
understand here.)

That's possible if we want it. Probably the best way is to add *depth parameter to 
bdrv_is_allocated_above (and better on top of my "[PATCH v7 0/5] fix & merge 
block_status_above and is_allocated_above")


--
Best regards,
Vladimir



reply via email to

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