qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1cfd21: iotests: Improve and rename test 309


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 1cfd21: iotests: Improve and rename test 309 to nbd-qemu-a...
Date: Tue, 13 Jul 2021 08:00:43 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1cfd21ccc7576c03914fa48d414451fdd53fb9a5
      
https://github.com/qemu/qemu/commit/1cfd21ccc7576c03914fa48d414451fdd53fb9a5
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

  Changed paths:
    R tests/qemu-iotests/309
    R tests/qemu-iotests/309.out
    A tests/qemu-iotests/tests/nbd-qemu-allocation
    A tests/qemu-iotests/tests/nbd-qemu-allocation.out

  Log Message:
  -----------
  iotests: Improve and rename test 309 to nbd-qemu-allocation

Enhance the test to inspect what qemu-nbd is advertising during
handshake, and rename it now that we support useful iotest names.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210701190655.2131223-2-eblake@redhat.com>


  Commit: 8417e1378cadb8928c24755a95ff267def53922f
      
https://github.com/qemu/qemu/commit/8417e1378cadb8928c24755a95ff267def53922f
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

  Changed paths:
    M docs/tools/qemu-img.rst
    M qapi/block-core.json
    M qemu-img.c
    M tests/qemu-iotests/122.out
    M tests/qemu-iotests/146.out
    M tests/qemu-iotests/154.out
    M tests/qemu-iotests/179.out
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/211.out
    M tests/qemu-iotests/221.out
    M tests/qemu-iotests/223.out
    M tests/qemu-iotests/241.out
    M tests/qemu-iotests/244.out
    M tests/qemu-iotests/252.out
    M tests/qemu-iotests/253.out
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/291.out
    M tests/qemu-iotests/tests/nbd-qemu-allocation.out

  Log Message:
  -----------
  qemu-img: Make unallocated part of backing chain obvious in map

The recently-added NBD context qemu:allocation-depth is able to
distinguish between locally-present data (even when that data is
sparse) [shown as depth 1 over NBD], and data that could not be found
anywhere in the backing chain [shown as depth 0]; and the libnbd
project was recently patched to give the human-readable name "absent"
to an allocation-depth of 0.  But qemu-img map --output=json predates
that addition, and has the unfortunate behavior that all portions of
the backing chain that resolve without finding a hit in any backing
layer report the same depth as the final backing layer.  This makes it
harder to reconstruct a qcow2 backing chain using just 'qemu-img map'
output, especially when using "backing":null to artificially limit a
backing chain, because it is impossible to distinguish between a
QCOW2_CLUSTER_UNALLOCATED (which defers to a [missing] backing file)
and a QCOW2_CLUSTER_ZERO_PLAIN cluster (which would override any
backing file), since both types of clusters otherwise show as
"data":false,"zero":true" (but note that we can distinguish a
QCOW2_CLUSTER_ZERO_ALLOCATED, which would also have an "offset":
listing).

The task of reconstructing a qcow2 chain was made harder in commit
0da9856851 (nbd: server: Report holes for raw images), because prior
to that point, it was possible to abuse NBD's block status command to
see which portions of a qcow2 file resulted in BDRV_BLOCK_ALLOCATED
(showing up as NBD_STATE_ZERO in isolation) vs. missing from the chain
(showing up as NBD_STATE_ZERO|NBD_STATE_HOLE); but now qemu reports
more accurate sparseness information over NBD.

An obvious solution is to make 'qemu-img map --output=json' add an
additional "present":false designation to any cluster lacking an
allocation anywhere in the chain, without any change to the "depth"
parameter to avoid breaking existing clients.  The iotests have
several examples where this distinction demonstrates the additional
accuracy.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210701190655.2131223-3-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
[eblake: fix more iotest fallout]
Signed-off-by: Eric Blake <eblake@redhat.com>


  Commit: a275b452c65cea2df598d966a6554f71060d3f3b
      
https://github.com/qemu/qemu/commit/a275b452c65cea2df598d966a6554f71060d3f3b
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

  Changed paths:
    M docs/tools/qemu-img.rst

  Log Message:
  -----------
  qemu-img: Reword 'qemu-img map --output=json' docs

Reword the paragraphs to list the JSON key first, rather than in the
middle of prose.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210707184125.2551140-1-eblake@redhat.com>
Reviewed-by: Nir Soffer <nsoffer@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


  Commit: 0b9cd6b947d905b388e84df4070056fad138588e
      
https://github.com/qemu/qemu/commit/0b9cd6b947d905b388e84df4070056fad138588e
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: register yank function earlier

Although unlikely, qemu might hang in nbd_send_request().

Allow recovery in this case by registering the yank function before
calling it.

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Message-Id: <20210704000730.1befb596@gecko.fritz.box>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>


  Commit: 708f50199b59476ec4b45ebcdf171550086d6292
      
https://github.com/qemu/qemu/commit/708f50199b59476ec4b45ebcdf171550086d6292
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-07-13 (Tue, 13 Jul 2021)

  Changed paths:
    M block/nbd.c
    M docs/tools/qemu-img.rst
    M qapi/block-core.json
    M qemu-img.c
    M tests/qemu-iotests/122.out
    M tests/qemu-iotests/146.out
    M tests/qemu-iotests/154.out
    M tests/qemu-iotests/179.out
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/211.out
    M tests/qemu-iotests/221.out
    M tests/qemu-iotests/223.out
    M tests/qemu-iotests/241.out
    M tests/qemu-iotests/244.out
    M tests/qemu-iotests/252.out
    M tests/qemu-iotests/253.out
    M tests/qemu-iotests/274.out
    M tests/qemu-iotests/291.out
    R tests/qemu-iotests/309
    R tests/qemu-iotests/309.out
    A tests/qemu-iotests/tests/nbd-qemu-allocation
    A tests/qemu-iotests/tests/nbd-qemu-allocation.out

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-07-09-v2' into 
staging

nbd patches for 2021-07-09

- enhance 'qemu-img map --output=json' to make it easier to duplicate
backing chain allocation patterns
- fix a race in the 'yank' QMP command in relation to NBD requests

# gpg: Signature made Mon 12 Jul 2021 18:43:37 BST
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) 
<ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2021-07-09-v2:
  nbd: register yank function earlier
  qemu-img: Reword 'qemu-img map --output=json' docs
  qemu-img: Make unallocated part of backing chain obvious in map
  iotests: Improve and rename test 309 to nbd-qemu-allocation

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/5e05c40ced78...708f50199b59



reply via email to

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