qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9a5e55: iotests: Improve and rename test 309


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9a5e55: iotests: Improve and rename test 309 to nbd-qemu-a...
Date: Sat, 10 Jul 2021 13:33:28 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 9a5e55ef23ec883b8ae07433773ac21a2f40e218
      
https://github.com/qemu/qemu/commit/9a5e55ef23ec883b8ae07433773ac21a2f40e218
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-09 (Fri, 09 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: 878576863d01ec380ff259bd53fd9d42f58158bb
      
https://github.com/qemu/qemu/commit/878576863d01ec380ff259bd53fd9d42f58158bb
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-09 (Fri, 09 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/154.out
    M tests/qemu-iotests/179.out
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/223.out
    M tests/qemu-iotests/244.out
    M tests/qemu-iotests/252.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>


  Commit: e671dd42e72d20fb59f7206fa571ca171aeaa308
      
https://github.com/qemu/qemu/commit/e671dd42e72d20fb59f7206fa571ca171aeaa308
  Author: Eric Blake <eblake@redhat.com>
  Date:   2021-07-09 (Fri, 09 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: 62967c9927ec4d733b923c70f9f5428dd1d2e0d7
      
https://github.com/qemu/qemu/commit/62967c9927ec4d733b923c70f9f5428dd1d2e0d7
  Author: Lukas Straub <lukasstraub2@web.de>
  Date:   2021-07-09 (Fri, 09 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: 54661c35df2f699f03a9f484e7806e2521a5275b
      
https://github.com/qemu/qemu/commit/54661c35df2f699f03a9f484e7806e2521a5275b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-07-10 (Sat, 10 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/154.out
    M tests/qemu-iotests/179.out
    M tests/qemu-iotests/209.out
    M tests/qemu-iotests/223.out
    M tests/qemu-iotests/244.out
    M tests/qemu-iotests/252.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' 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 Fri 09 Jul 2021 15:08:05 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:
  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/42e1d798a6a0...54661c35df2f



reply via email to

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