diff mbox

[v2] dm: Fix alignment stacking on partitioned devices

Message ID yq1637gt1hi.fsf@sermon.lab.mkp.net (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Martin K. Petersen Jan. 6, 2010, 2:23 a.m. UTC
None
diff mbox

Patch

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
 
 /*