Skip to content

RFC New NBD metacontext

Eric Blake qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iotests: Improve and rename test 309 to nbd-qemu-allocationtests/qemu-iotests/tests/nbd-qemu-allocation tests/qemu-iotests/tests/nbd-qemu-allocation.out+15 -21 reply
2/2nbd: Add new qemu:joint-allocation metadata contextdocs/interop/nbd.txt docs/tools/qemu-nbd.rst include/block/nbd.h +3 more+125 -1411 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchVladimir Sementsov-Ogievskiy
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/2] New NBD metacontext

This is my counter-proposal to Nir's request [1] to revert a 6.0 behavior change. It does not expose any new information over NBD, but does make it easier to collect necessary information from a single context rather than requiring the client to have to request two contexts in parallel, then cross-correlate what may be different extent lengths between those contexts. Furthermore, this is easy to backport to downstream based on qemu 6.0, at which point clients could use the existence or absence of qemu:joint-allocation as a witness of whether it can get away with trusting base:allocation when trying to recreate a qcow2 backing chain.

[1] https://lists.gnu.org/archive/html/qemu-devel/2021-06/msg01796.html

Things I still want to do:
- a followup patch to libnbd to teach 'nbdinfo --map=qemu:joint-allocation' to decode the bits
- teach 'nbdinfo --map' to read all available contexts, instead of having to manually type each map besides base:allocation
- potential followup patches to qemu to automatically feed this information through qemu-img map:
- add a new BDRV_BLOCK_BACKING bit for bdrv_block_status(), with opposite semantics from BDRV_BLOCK_ALLOCATED, but where the only thing known is that the data is not local (not how deep it is)
- teach qemu to favor qemu:joint-allocation over base:allocation when available, and use it to drive BDRV_BLOCK_BACKING
- teach qemu-img map to recognize BDRV_BLOCK_BACKING

Eric Blake (2):
iotests: Improve and rename test 309 to nbd-qemu-allocation
nbd: Add new qemu:joint-allocation metadata context

 docs/interop/nbd.txt                          | 31 ++++++-
 docs/tools/qemu-nbd.rst                       |  4 +-
 qapi/block-export.json                        |  4 +-
 include/block/nbd.h                           | 10 ++-
 nbd/server.c                                  | 87 +++++++++++++++++--
 .../{309 => tests/nbd-qemu-allocation}        |  5 +-
 .../nbd-qemu-allocation.out}                  | 13 ++-
 7 files changed, 139 insertions(+), 15 deletions(-)
 rename tests/qemu-iotests/{309 => tests/nbd-qemu-allocation} (95%)
 rename tests/qemu-iotests/{309.out => tests/nbd-qemu-allocation.out} (79%)
Signature · 1 line
2.31.1