From patchwork Wed Jun 29 12:22:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 9205017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C414960757 for ; Wed, 29 Jun 2016 12:23:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5AEA28653 for ; Wed, 29 Jun 2016 12:23:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA86B2865A; Wed, 29 Jun 2016 12:23:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C73B28653 for ; Wed, 29 Jun 2016 12:23:37 +0000 (UTC) Received: from localhost ([::1]:43494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIEWm-0006vn-Em for patchwork-qemu-devel@patchwork.kernel.org; Wed, 29 Jun 2016 08:23:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIEWT-0006uP-Ad for qemu-devel@nongnu.org; Wed, 29 Jun 2016 08:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIEWO-0003Jd-9R for qemu-devel@nongnu.org; Wed, 29 Jun 2016 08:23:16 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:5822 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIEWN-0003JK-Tl for qemu-devel@nongnu.org; Wed, 29 Jun 2016 08:23:12 -0400 Received: from kvm.sw.ru. ([10.28.8.145]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id u5TCMr4Q006338; Wed, 29 Jun 2016 15:22:56 +0300 (MSK) From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Date: Wed, 29 Jun 2016 15:22:47 +0300 Message-Id: <1467202967-497386-1-git-send-email-vsementsov@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x X-Received-From: 195.214.232.25 Subject: [Qemu-devel] [PATCH] spec/qcow2: bitmaps: zero bitmap table offset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, famz@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 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? 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.