From patchwork Mon Dec 30 05:49:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 305704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 25DBF2C00E9 for ; Mon, 30 Dec 2013 16:52:14 +1100 (EST) Received: from localhost ([::1]:57242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxVlr-0003mx-S2 for incoming@patchwork.ozlabs.org; Mon, 30 Dec 2013 00:52:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxVla-0003mD-Du for qemu-devel@nongnu.org; Mon, 30 Dec 2013 00:51:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxVlV-0005Yy-S6 for qemu-devel@nongnu.org; Mon, 30 Dec 2013 00:51:54 -0500 Received: from [222.73.24.84] (port=17158 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxVlV-0005Yo-GY for qemu-devel@nongnu.org; Mon, 30 Dec 2013 00:51:49 -0500 X-IronPort-AV: E=Sophos;i="4.95,572,1384272000"; d="scan'208";a="9349234" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 30 Dec 2013 13:48:11 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id rBU5pjBE006199 for ; Mon, 30 Dec 2013 13:51:46 +0800 Received: from G08FNSTD100614.fnst.cn.fujitsu.com ([10.167.226.102]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013123013505828-761909 ; Mon, 30 Dec 2013 13:50:58 +0800 From: Hu Tao To: qemu-devel@nongnu.org Date: Mon, 30 Dec 2013 13:49:45 +0800 Message-Id: <1388382585-30853-1-git-send-email-hutao@cn.fujitsu.com> X-Mailer: git-send-email 1.7.11.7 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/30 13:50:58, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/30 13:50:58, Serialize complete at 2013/12/30 13:50:58 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Subject: [Qemu-devel] [PATCH] docs/specs/qcow2.txt: fix incorrect bits of offsets in entries 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 Fix incorrect bits of offsets in refcount table entry, l1 table entry and l2 table entry. See REFT_OFFSET_MASK, L1E_OFFSET_MASK and L2E_OFFSET_MASK. Fix a typo while at the file. Signed-off-by: Hu Tao --- docs/specs/qcow2.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index f19536a..408f93f 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qcow2.txt @@ -192,9 +192,9 @@ as follows: Refcount table entry: - Bit 0 - 8: Reserved (set to 0) + Bit 0 - 7: Reserved (set to 0) - 9 - 63: Bits 9-63 of the offset into the image file at which the + 8 - 63: Bits 9-63 of the offset into the image file at which the refcount block starts. Must be aligned to a cluster boundary. @@ -218,7 +218,7 @@ The L1 table has a variable size (stored in the header) and may use multiple clusters, however it must be contiguous in the image file. L2 tables are exactly one cluster in size. -Given a offset into the virtual disk, the offset into the image file can be +Given an offset into the virtual disk, the offset into the image file can be obtained as follows: l2_entries = (cluster_size / sizeof(uint64_t)) @@ -233,9 +233,9 @@ obtained as follows: L1 table entry: - Bit 0 - 8: Reserved (set to 0) + Bit 0 - 7: Reserved (set to 0) - 9 - 55: Bits 9-55 of the offset into the image file at which the L2 + 8 - 55: Bits 9-55 of the offset into the image file at which the L2 table starts. Must be aligned to a cluster boundary. If the offset is 0, the L2 table and all clusters described by this L2 table are unallocated. @@ -268,9 +268,9 @@ Standard Cluster Descriptor: With version 2, this is always 0. - 1 - 8: Reserved (set to 0) + 1 - 7: Reserved (set to 0) - 9 - 55: Bits 9-55 of host cluster offset. Must be aligned to a + 8 - 55: Bits 9-55 of host cluster offset. Must be aligned to a cluster boundary. If the offset is 0, the cluster is unallocated.