Skip to content

block: fix BDRV_O_SNAPSHOT with protocols

Stefan Hajnoczi qemu-devel 2 versions Applied

Status from this message: Thanks, applied all to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

* Rebased onto latest qemu.git/master

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2block: fix BDRV_O_SNAPSHOT protocol detectionblock.c+1 -50 replies
2/2qemu-iotests: add 052 BDRV_O_SNAPSHOT testtests/qemu-iotests/052 tests/qemu-iotests/052.out tests/qemu-iotests/group+75 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/2] block: fix BDRV_O_SNAPSHOT with protocols

Richard Jones <[email protected]> reported that BDRV_O_SNAPSHOT does not work with NBD:

  /usr/bin/qemu-system-x86_64 \
  [...]
      -device virtio-scsi-pci,id=scsi \
      -drive file=nbd:localhost:61930,snapshot=on,format=raw,id=hd0,if=none \
      -device scsi-hd,drive=hd0 \
  [...]

gives the error:

qemu-system-x86_64: -drive file=nbd:localhost:61930,snapshot=on,format=raw,id=hd0,if=none: could not open disk image nbd:localhost:61930: No such file or directory

This series fixes the issue and adds a regression test, qemu-iotests 052. Run the test like this:

  $ QEMU_PROG=... PATH=... ./check -nbd 052

If Patch 1 is not applied, the test case fails. Note that the test case is also useful with -raw or other formats.

v2:
* Rebased onto latest qemu.git/master

Stefan Hajnoczi (2):
block: fix BDRV_O_SNAPSHOT protocol detection
qemu-iotests: add 052 BDRV_O_SNAPSHOT test

 block.c                    |  6 +----
 tests/qemu-iotests/052     | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/052.out | 13 ++++++++++
 tests/qemu-iotests/group   |  1 +
 4 files changed, 76 insertions(+), 5 deletions(-)
 create mode 100755 tests/qemu-iotests/052
 create mode 100644 tests/qemu-iotests/052.out
Signature · 1 line
1.8.1.4