From patchwork Thu Oct 27 06:58:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhi Yong Wu X-Patchwork-Id: 122073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1F7DE1007D8 for ; Thu, 27 Oct 2011 18:00:41 +1100 (EST) Received: from localhost ([::1]:44300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJJx7-0002QJ-9u for incoming@patchwork.ozlabs.org; Thu, 27 Oct 2011 03:00:37 -0400 Received: from eggs.gnu.org ([140.186.70.92]:37627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJJx0-0002Q6-DW for qemu-devel@nongnu.org; Thu, 27 Oct 2011 03:00:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJJwy-0003fj-Vb for qemu-devel@nongnu.org; Thu, 27 Oct 2011 03:00:30 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:52141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJJwy-0003Xv-OE for qemu-devel@nongnu.org; Thu, 27 Oct 2011 03:00:28 -0400 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Oct 2011 00:59:55 -0600 Received: from d03relay01.boulder.ibm.com ([9.17.195.226]) by e36.co.us.ibm.com ([192.168.1.136]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 27 Oct 2011 00:59:36 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9R6xZLF270784; Thu, 27 Oct 2011 00:59:35 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9R6xZYg000940; Thu, 27 Oct 2011 00:59:35 -0600 Received: from us.ibm.com ([9.115.118.38]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p9R6xWcD031680; Thu, 27 Oct 2011 00:59:32 -0600 Received: by us.ibm.com (sSMTP sendmail emulation); Thu, 27 Oct 2011 14:58:57 +0800 From: Zhi Yong Wu To: kwolf@redhat.com Date: Thu, 27 Oct 2011 14:58:57 +0800 Message-Id: <1319698737-17270-1-git-send-email-wuzhy@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.6 x-cbid: 11102706-3352-0000-0000-000000680E51 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.110.154 Cc: qemu-trivial@nongnu.org, wuzhy@linux.vnet.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH] qcow2: fix some errors and typo in qcow2.txt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Zhi Yong Wu --- docs/specs/qcow2.txt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 8fc3cb2..e792953 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qcow2.txt @@ -108,8 +108,8 @@ as follows: refcount_block_entries = (cluster_size / sizeof(uint16_t)) - refcount_block_index = (offset / cluster_size) % refcount_table_entries - refcount_table_index = (offset / cluster_size) / refcount_table_entries + refcount_block_index = (offset / cluster_size) % refcount_block_entries + refcount_table_index = (offset / cluster_size) / refcount_block_entries refcount_block = load_cluster(refcount_table[refcount_table_index]); return refcount_block[refcount_block_index]; @@ -211,7 +211,7 @@ switch the active L1 table, so that a different set of host clusters are exposed to the guest. When creating a snapshot, the L1 table should be copied and the refcount of all -L2 tables and clusters reachable form this L1 table must be increased, so that +L2 tables and clusters reachable from this L1 table must be increased, so that a write causes a COW and isn't visible in other snapshots. When loading a snapshot, bit 63 of all entries in the new active L1 table and