From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxCMr-00047C-D6 for qemu-devel@nongnu.org; Thu, 20 Oct 2016 08:22:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxCMo-0006EQ-9B for qemu-devel@nongnu.org; Thu, 20 Oct 2016 08:22:41 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:18502 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxCMn-0006E4-TL for qemu-devel@nongnu.org; Thu, 20 Oct 2016 08:22:38 -0400 References: <1475232808-4852-1-git-send-email-vsementsov@virtuozzo.com> <1475232808-4852-8-git-send-email-vsementsov@virtuozzo.com> <93be46ce-5b73-c7d3-ada0-d59461227dbf@redhat.com> From: Vladimir Sementsov-Ogievskiy Message-ID: <5808B6F4.7040704@virtuozzo.com> Date: Thu, 20 Oct 2016 15:22:12 +0300 MIME-Version: 1.0 In-Reply-To: <93be46ce-5b73-c7d3-ada0-d59461227dbf@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, armbru@redhat.com, eblake@redhat.com, jsnow@redhat.com, famz@redhat.com, den@openvz.org, stefanha@redhat.com, pbonzini@redhat.com On 01.10.2016 19:26, Max Reitz wrote: > On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: >> Auto loading bitmaps are bitmaps in Qcow2, with AUTO flag set. They are [...] > diff --git a/block/qcow2.c b/block/qcow2.c > index 08c4ef9..02ec224 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -213,6 +213,11 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset, > s->bitmap_directory_size = > bitmaps_ext.bitmap_directory_size; > > + ret = qcow2_read_bitmaps(bs, errp); > + if (ret < 0) { > + return ret; > + } > + > I think I'd put this directly into qcow2_open(), just like > qcow2_read_snapshots(); but that's an optional suggestion. > > Max > > Snapshots are not header extension.. so it is not the case. Here qcow2_read_bitmaps looks like part of header extension loading, and header extension fields describe other parts of the extension.. I think this is a good point, isn't it? -- Best regards, Vladimir