From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHbE6-0007c9-Ui for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:39:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHbE4-0005RH-6k for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:39:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHbE3-0005R9-Vf for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:39:48 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2IEdkg0008690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Mar 2013 10:39:46 -0400 From: Stefan Hajnoczi Date: Mon, 18 Mar 2013 15:39:40 +0100 Message-Id: <1363617582-24948-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] block: fix BDRV_O_SNAPSHOT with protocols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , rjones@redhat.com, Stefan Hajnoczi Richard Jones 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. Stefan Hajnoczi (2): block: fix BDRV_O_SNAPSHOT protocol detection qemu-iotests: add 052 BDRV_O_SNAPSHOT test block.c | 9 +++---- tests/qemu-iotests/052 | 61 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/052.out | 13 ++++++++++ tests/qemu-iotests/group | 1 + 4 files changed, 78 insertions(+), 6 deletions(-) create mode 100755 tests/qemu-iotests/052 create mode 100644 tests/qemu-iotests/052.out -- 1.8.1.4