From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmjaA-0003IU-W0 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 11:37:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmja6-0003w9-PR for qemu-devel@nongnu.org; Wed, 21 Sep 2016 11:37:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmja6-0003vy-JG for qemu-devel@nongnu.org; Wed, 21 Sep 2016 11:37:06 -0400 References: <20160921113303.1420.63544.stgit@PASHA-ISP.def.inno> <20160921113320.1420.80132.stgit@PASHA-ISP.def.inno> From: Paolo Bonzini Message-ID: <6f6c9282-7a6c-af7c-885a-fac048de52d8@redhat.com> Date: Wed, 21 Sep 2016 17:37:01 +0200 MIME-Version: 1.0 In-Reply-To: <20160921113320.1420.80132.stgit@PASHA-ISP.def.inno> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 3/8] block: don't make snapshots for filters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jasowang@redhat.com, quintela@redhat.com, mst@redhat.com On 21/09/2016 13:33, Pavel Dovgalyuk wrote: > This patch disables snapshotting for block driver filters. > It is needed, because snapshots should be created > in underlying disk images, not in filters itself. I don't understand this patch. Who would take care of doing the bdrv_snapshot_goto on the underlying image? Paolo > Signed-off-by: Pavel Dovgalyuk > --- > block/snapshot.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/snapshot.c b/block/snapshot.c > index bf5c2ca..8998b8b 100644 > --- a/block/snapshot.c > +++ b/block/snapshot.c > @@ -184,6 +184,9 @@ int bdrv_snapshot_goto(BlockDriverState *bs, > if (!drv) { > return -ENOMEDIUM; > } > + if (drv->is_filter) { > + return 0; > + } > if (drv->bdrv_snapshot_goto) { > return drv->bdrv_snapshot_goto(bs, snapshot_id); > } >