From patchwork Wed Jan 6 02:23:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Martin K. Petersen" X-Patchwork-Id: 71224 Received: from mx01.util.phx2.redhat.com (mx1-phx2.redhat.com [209.132.183.26]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o062TqAl006656 for ; Wed, 6 Jan 2010 02:29:52 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.util.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o062OMsj022980; Tue, 5 Jan 2010 21:24:23 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o062OLoO018253 for ; Tue, 5 Jan 2010 21:24:21 -0500 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o062OGDA026012; Tue, 5 Jan 2010 21:24:16 -0500 Received: from rcsinet12.oracle.com (rcsinet12.oracle.com [148.87.113.124]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o062O0P2023066; Tue, 5 Jan 2010 21:24:00 -0500 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o062NvCm031581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Jan 2010 02:23:58 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o060ZW3W017564; Wed, 6 Jan 2010 02:23:56 GMT Received: from abhmt008.oracle.com by acsmt353.oracle.com with ESMTP id 1287580531262744635; Tue, 05 Jan 2010 18:23:55 -0800 Received: from groovelator.mkp.net (/209.217.122.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 Jan 2010 18:23:55 -0800 To: "Alasdair G. Kergon" From: "Martin K. Petersen" Organization: Oracle References: <1261591640-24380-1-git-send-email-snitzer@redhat.com> <20100105182735.GC6042@agk-dp.fab.redhat.com> Date: Tue, 05 Jan 2010 21:23:53 -0500 In-Reply-To: <20100105182735.GC6042@agk-dp.fab.redhat.com> (Alasdair G. Kergon's message of "Tue, 5 Jan 2010 18:27:35 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4B43F43C.015F:SCFMA4539814,ss=1,fgs=0 X-RedHat-Spam-Score: -103.794 (AWL, RCVD_IN_DNSWL_MED, SUBJECT_FUZZY_TION, UNPARSEABLE_RELAY, USER_IN_WHITELIST) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.8 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com, Mike Snitzer Subject: Re: [dm-devel] [PATCH v2] dm: Fix alignment stacking on partitioned devices X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com diff --git a/block/blk-settings.c b/block/blk-settings.c index d52d4ad..9404666 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -525,9 +525,9 @@ static unsigned int lcm(unsigned int a, unsigned int b) * the alignment_offset is undefined. */ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, - sector_t offset) + blk_off_t offset) { - sector_t alignment; + blk_off_t alignment; unsigned int top, bottom; t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors); @@ -642,7 +642,7 @@ EXPORT_SYMBOL(blk_stack_limits); * misalignment. */ void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, - sector_t offset) + blk_off_t offset) { struct request_queue *t = disk->queue; struct request_queue *b = bdev_get_queue(bdev); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9b98173..4b4436a 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -937,9 +937,9 @@ extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt); extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); extern void blk_set_default_limits(struct queue_limits *lim); extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, - sector_t offset); + blk_off_t offset); extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, - sector_t offset); + blk_off_t offset); extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); extern void blk_queue_dma_pad(struct request_queue *, unsigned int); extern void blk_queue_update_dma_pad(struct request_queue *, unsigned int); @@ -1110,7 +1110,7 @@ static inline int queue_alignment_offset(struct request_queue *q) return q->limits.alignment_offset; } -static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t offset) +static inline int queue_limit_alignment_offset(struct queue_limits *lim, blk_off_t offset) { unsigned int granularity = max(lim->physical_block_size, lim->io_min); diff --git a/include/linux/types.h b/include/linux/types.h index c42724f..729f87a 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -134,9 +134,11 @@ typedef __s64 int64_t; #ifdef CONFIG_LBDAF typedef u64 sector_t; typedef u64 blkcnt_t; +typedef u64 blk_off_t; #else typedef unsigned long sector_t; typedef unsigned long blkcnt_t; +typedef unsigned long blk_off_t; #endif /*