From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRoxX-00055t-Mo for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:30:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRoxV-00055X-GG for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:30:34 -0500 Received: from [199.232.76.173] (port=46248 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRoxV-00055U-BM for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:30:33 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:51247) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRoxV-0007wN-2r for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:30:33 -0500 Received: by qyk13 with SMTP id 13so10469488qyk.10 for ; Tue, 27 Jan 2009 06:30:31 -0800 (PST) Message-ID: <497F1A78.2000608@codemonkey.ws> Date: Tue, 27 Jan 2009 08:30:16 -0600 From: Anthony Liguori 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> <497EE9FB.2080406@suse.de> In-Reply-To: <497EE9FB.2080406@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed 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: Kevin Wolf Cc: qemu-devel@nongnu.org Kevin Wolf wrote: > 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. > Indeed, thanks for catching that. Regards, Anthony Liguori > Kevin >