From patchwork Thu May 27 13:46:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 53758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 72A7EB7D17 for ; Thu, 27 May 2010 23:50:53 +1000 (EST) Received: from localhost ([127.0.0.1]:42234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHdU2-0005Yr-Gs for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 09:50:50 -0400 Received: from [140.186.70.92] (port=50795 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHdQV-0003MY-EB for qemu-devel@nongnu.org; Thu, 27 May 2010 09:47:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHdQT-0001Hw-JT for qemu-devel@nongnu.org; Thu, 27 May 2010 09:47:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45539) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHdQT-0001Ho-B1 for qemu-devel@nongnu.org; Thu, 27 May 2010 09:47:09 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4RDl6Gs005038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 May 2010 09:47:07 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4RDl46X021329; Thu, 27 May 2010 09:47:05 -0400 From: Jes.Sorensen@redhat.com To: anthony@codemonkey.ws Date: Thu, 27 May 2010 15:46:55 +0200 Message-Id: <1274968015-23599-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Jes Sorensen , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] block.h: Make BDRV_SECTOR_SIZE 64 bit safe X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen C defaults to int, so make definition of BDRV_SECTOR_SIZE 64 bit safe as it and BDRV_SECTOR_MASK may be used against 64 bit addresses. Signed-off-by: Jes Sorensen --- block.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.h b/block.h index 24efeb6..5e05612 100644 --- a/block.h +++ b/block.h @@ -38,7 +38,7 @@ typedef struct QEMUSnapshotInfo { #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) #define BDRV_SECTOR_BITS 9 -#define BDRV_SECTOR_SIZE (1 << BDRV_SECTOR_BITS) +#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) typedef enum {