From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmwnL-0005TB-2e for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmwnJ-0005yD-CH for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:43:39 -0400 Received: from mail.ispras.ru ([83.149.199.45]:44588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmwnJ-0005ra-4L for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:43:37 -0400 From: "Pavel Dovgalyuk" References: <20160921113303.1420.63544.stgit@PASHA-ISP.def.inno> <20160921113320.1420.80132.stgit@PASHA-ISP.def.inno> <6f6c9282-7a6c-af7c-885a-fac048de52d8@redhat.com> In-Reply-To: <6f6c9282-7a6c-af7c-885a-fac048de52d8@redhat.com> Date: Thu, 22 Sep 2016 08:43:24 +0300 Message-ID: <003001d21494$3c9a0d90$b5ce28b0$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru 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: 'Paolo Bonzini' , 'Pavel Dovgalyuk' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jasowang@redhat.com, quintela@redhat.com, mst@redhat.com > -----Original Message----- > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Sent: Wednesday, September 21, 2016 6:37 PM > To: Pavel Dovgalyuk; qemu-devel@nongnu.org > Cc: peter.maydell@linaro.org; jasowang@redhat.com; quintela@redhat.com; mst@redhat.com > Subject: Re: [PATCH v4 3/8] block: don't make snapshots for filters > > > > 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? loadvm needs to make bdrv_snapshot_goto. It discovers top-level replay driver and tries to perform bdrv_snapshot_goto for it. Patches 3 and 4 fix that. They allow passing through the replay driver and make saving/restoring of the actual image. Pavel Dovgalyuk > > > 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); > > } > >