From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrmpx-0003Pb-Uy for qemu-devel@nongnu.org; Thu, 29 Oct 2015 09:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrmpu-0002H7-Qr for qemu-devel@nongnu.org; Thu, 29 Oct 2015 09:01:49 -0400 From: Alberto Garcia Date: Thu, 29 Oct 2015 15:00:47 +0200 Message-Id: Subject: [Qemu-devel] [PATCH 0/2] Don't allow snapshots if the overlay has parent nodes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Stefan Hajnoczi There are several sanity checks for the 'blockdev-snapshot' command, but none covers the use of a file BDS as the overlay node. { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'new.qcow2', 'node-name': 'file0' } } } } { 'execute': 'blockdev-snapshot', 'arguments': { 'node': 'virtio0', 'overlay': 'file0' } } This series fixes that and adds a new test case. This of course depends on the 'blockdev-snapshot' series: https://lists.gnu.org/archive/html/qemu-block/2015-10/msg00974.html I anyway wonder if it wouldn't be a good idea to have regular op blockers in all file BDSs? Regards, Berto Alberto Garcia (2): block: Don't allow snapshots if the overlay has parent nodes block: test 'blockdev-snapshot' using a file BDS as the overlay blockdev.c | 5 +++++ tests/qemu-iotests/085 | 12 +++++++++++- tests/qemu-iotests/085.out | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) -- 2.6.1