From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwVw-0001nn-FF for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOwVq-0001hP-6w for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:25:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOwVp-0001h8-WA for qemu-devel@nongnu.org; Tue, 02 Sep 2014 18:25:18 -0400 From: Max Reitz Date: Wed, 3 Sep 2014 00:25:06 +0200 Message-Id: <1409696709-27623-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 0/3] qcow2: Drop REFCOUNT_SHIFT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?q?Beno=C3=AEt=20Canet?= , Stefan Hajnoczi , Max Reitz In preparation for qemu maybe actually supporting variable refcount widths in the far future, drop the hardcoded REFCOUNT_SHIFT and instead use the value as given by the image. Also, the qcow2 documentation gave the width of a refcount block entry as sizeof(uint16_t), which is wrong for any refcount order other than 4. Fix that. This is a follow-up to my "[PATCH v5 00/11] qcow2: Fix image repairing" series and therefore depends on it. v2: - Patch 2: Fix wrongly fixed calculation [Beno=C3=AEt, Eric] - Patch 3: Added [Eric] git-backport-diff against v1: Key: [----] : patches are identical [####] : number of functional differences between upstream/downstream pat= ch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respec= tively 001/3:[----] [--] 'qcow2: Drop REFCOUNT_SHIFT' 002/3:[0002] [FC] 'docs/qcow2: Correct refcount_block_entries' 003/3:[down] 'docs/qcow2: Limit refcount_order to [0, 6]' Max Reitz (3): qcow2: Drop REFCOUNT_SHIFT docs/qcow2: Correct refcount_block_entries docs/qcow2: Limit refcount_order to [0, 6] block/qcow2-refcount.c | 32 ++++++++++++++------------------ block/qcow2.c | 2 +- block/qcow2.h | 2 -- docs/specs/qcow2.txt | 3 ++- 4 files changed, 17 insertions(+), 22 deletions(-) --=20 2.1.0