From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V40PA-0007tt-QR for qemu-devel@nongnu.org; Mon, 29 Jul 2013 23:15:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V40P4-0002Oq-RH for qemu-devel@nongnu.org; Mon, 29 Jul 2013 23:15:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V40P4-0002Oa-Iq for qemu-devel@nongnu.org; Mon, 29 Jul 2013 23:15:14 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6U3FDI0026520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Jul 2013 23:15:13 -0400 Date: Tue, 30 Jul 2013 11:15:02 +0800 From: Fam Zheng Message-ID: <20130730031502.GA9986@T430s.nay.redhat.com> References: <803cc31a021f57b4310f133ea5b03e2af7ef7f04.1374687002.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <803cc31a021f57b4310f133ea5b03e2af7ef7f04.1374687002.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/9] block: vhdx - log support struct and defines Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 07/24 13:54, Jeff Cody wrote: > This adds some magic number defines, and internal structure > definitions for VHDX log replay support. > > Signed-off-by: Jeff Cody > --- > block/vhdx.h | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/block/vhdx.h b/block/vhdx.h > index c8d8593..2db6615 100644 > --- a/block/vhdx.h > +++ b/block/vhdx.h > @@ -151,7 +151,10 @@ typedef struct QEMU_PACKED VHDXRegionTableEntry { > > > /* ---- LOG ENTRY STRUCTURES ---- */ > +#define VHDX_LOG_MIN_SIZE (1024*1024) > +#define VHDX_LOG_SECTOR_SIZE 4096 > #define VHDX_LOG_HDR_SIZE 64 > +#define VHDX_LOG_SIGNATURE 0x65676f6c > typedef struct QEMU_PACKED VHDXLogEntryHeader { > uint32_t signature; /* "loge" in ASCII */ > uint32_t checksum; /* CRC-32C hash of the 64KB table */ > @@ -174,7 +177,8 @@ typedef struct QEMU_PACKED VHDXLogEntryHeader { > } VHDXLogEntryHeader; > > #define VHDX_LOG_DESC_SIZE 32 > - > +#define VHDX_LOG_DESC_SIGNATURE 0x63736564 > +#define VHDX_LOG_ZERO_SIGNATURE 0x6f72657a Are these macros really used? I see "desc" and "zero" used to compare signatures. Thanks Fam