On Fri, Sep 25, 2020 at 03:32:49PM -0500, Eric Blake wrote: > Allow the server to expose an additional metacontext to be requested > by savvy clients. qemu-nbd adds a new option -A to expose the > qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this > can also be set via QMP when using nbd-server-add. > > qemu as client can be hacked into viewing this new context by using > the now-misnamed x-dirty-bitmap option when creating an NBD blockdev; > although it is worth noting the decoding of how such context > information will appear in 'qemu-img map --output=json': > > NBD_STATE_DEPTH_UNALLOC => "zero":false, "data":true > NBD_STATE_DEPTH_LOCAL => "zero":false, "data":false > NBD_STATE_DEPTH_BACKING => "zero":true, "data":true > > libnbd as client is probably a nicer way to get at the information > without having to decipher such hacks in qemu as client. ;)
I've been meaning to add extents information to nbdinfo, or perhaps a new tool ("nbdmap"). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html