From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIPv7-0002vG-83 for qemu-devel@nongnu.org; Wed, 29 Jun 2016 20:33:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIPv5-0007Tk-9a for qemu-devel@nongnu.org; Wed, 29 Jun 2016 20:33:28 -0400 References: <1467202967-497386-1-git-send-email-vsementsov@virtuozzo.com> From: John Snow Message-ID: <74828e17-38f5-aa32-d92c-d2a2613f5606@redhat.com> Date: Wed, 29 Jun 2016 20:33:18 -0400 MIME-Version: 1.0 In-Reply-To: <1467202967-497386-1-git-send-email-vsementsov@virtuozzo.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] spec/qcow2: bitmaps: zero bitmap table offset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org On 06/29/2016 08:22 AM, Vladimir Sementsov-Ogievskiy wrote: > This allows effectively free in_use bitmap clusters including bitmap > table without loss of meaningful data. > > Now it is possible only to free end-point clusters and zero-out (not > free) bitmap table > Same comment as Max, the commit message needs to be a little better. > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > Here is one small but significant addition to specification of bitmaps in qcow2. > > Can we apply it just like this or I'll have to inroduce new incompatible feature flag? > > If there is existing implementation of the format, it may break image, saved by > software, using extended spec. But is there are any implementations except not > finished my one? > In pure, actual fact... your WIP reference implementation is almost certainly the only implementation in existence. I think this change is probably fine, as a zeroed entry here before would have meant literally the qcow2 header itself which is quite obviously wrong/invalid. So it's probably a fairly easy extension to identify dynamically/on-the-fly and won't collide with prior versions. > > docs/specs/qcow2.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt > index 80cdfd0..dd07a82 100644 > --- a/docs/specs/qcow2.txt > +++ b/docs/specs/qcow2.txt > @@ -435,6 +435,8 @@ Structure of a bitmap directory entry: > Offset into the image file at which the bitmap table > (described below) for the bitmap starts. Must be aligned to > a cluster boundary. > + Zero value means that bitmap table is not allocated and the > + bitmap should be considered as empty (all bits are zero). > > 8 - 11: bitmap_table_size > Number of entries in the bitmap table of the bitmap. >