qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] nbd: Add 'qemu-nbd -A' to expose allocation depth


From: Eric Blake
Subject: Re: [PATCH 3/3] nbd: Add 'qemu-nbd -A' to expose allocation depth
Date: Mon, 28 Sep 2020 09:35:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/26/20 8:32 AM, Vladimir Sementsov-Ogievskiy wrote:
25.09.2020 23:32, 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;

may be rename it to x-block-status ?

I thought about it. We don't promise any back-compat with x- prefix, but at the same time, if there's not a strong reason to change it, scripts written against older qemu will not break as long as we still have the hack.


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

It wouldn't be so simple if we decide to export exact depth number..

It's still simple to do tri-state results if we separate the exact depth number to bits 31-4, leaving bits 1-0 as the tri-state summary...

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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