From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRlcu-0000kC-0q for qemu-devel@nongnu.org; Tue, 27 Jan 2009 05:57:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRlcr-0000jt-Is for qemu-devel@nongnu.org; Tue, 27 Jan 2009 05:57:02 -0500 Received: from [199.232.76.173] (port=40739 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRlcr-0000jm-EQ for qemu-devel@nongnu.org; Tue, 27 Jan 2009 05:57:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:48568) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LRlcq-0006yl-KM for qemu-devel@nongnu.org; Tue, 27 Jan 2009 05:57:00 -0500 Message-ID: <497EE9FB.2080406@suse.de> Date: Tue, 27 Jan 2009 12:03:23 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/7] block-vpc: Fix support for images > 4 GB References: <1232989168-27759-1-git-send-email-kwolf@suse.de> <1232989168-27759-5-git-send-email-kwolf@suse.de> In-Reply-To: <1232989168-27759-5-git-send-email-kwolf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Kevin Wolf schrieb: > This patch fixes the truncation of sector offsets to 32 bits. > > Signed-off-by: Kevin Wolf > --- > block-vpc.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/block-vpc.c b/block-vpc.c > index 3c92bb3..51644e6 100644 > --- a/block-vpc.c > +++ b/block-vpc.c > @@ -207,7 +207,7 @@ static inline int seek_to_sector(BlockDriverState *bs, int64_t sector_num) > if (pagetable_index > s->max_table_entries || s->pagetable[pagetable_index] == 0xffffffff) > return -1; // not allocated > > - bitmap_offset = 512 * s->pagetable[pagetable_index]; > + bitmap_offset = 512 * (uint64_t) s->pagetable[pagetable_index]; > block_offset = bitmap_offset + 512 + (512 * pageentry_index); > > // printf("sector: %" PRIx64 ", index: %x, offset: %x, bioff: %" PRIx64 ", bloff: %" PRIx64 "\n", Anthony, I think you missed this fix. I guess that's because the mail was delivered to the list only some hours after I sent the series. Anyway, it's still needed. Kevin