
From: NeilBrown <neilb@cse.unsw.edu.au>

Some size fields were "int" instead of "sector_t".

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/md/linear.c         |    8 +++++---
 25-akpm/include/linux/raid/linear.h |    4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff -puN drivers/md/linear.c~md-fix-problem-with-md-linear-for-devices-larger-than-2-terabytes drivers/md/linear.c
--- 25/drivers/md/linear.c~md-fix-problem-with-md-linear-for-devices-larger-than-2-terabytes	Wed Nov  3 14:54:50 2004
+++ 25-akpm/drivers/md/linear.c	Wed Nov  3 14:54:50 2004
@@ -116,7 +116,8 @@ static int linear_run (mddev_t *mddev)
 	linear_conf_t *conf;
 	struct linear_hash *table;
 	mdk_rdev_t *rdev;
-	int size, i, nb_zone, cnt;
+	int i, nb_zone, cnt;
+	sector_t size;
 	unsigned int curr_offset;
 	struct list_head *tmp;
 
@@ -265,10 +266,11 @@ static int linear_make_request (request_
 		char b[BDEVNAME_SIZE];
 
 		printk("linear_make_request: Block %llu out of bounds on "
-			"dev %s size %ld offset %ld\n",
+			"dev %s size %llu offset %llu\n",
 			(unsigned long long)block,
 			bdevname(tmp_dev->rdev->bdev, b),
-			tmp_dev->size, tmp_dev->offset);
+			(unsigned long long)tmp_dev->size,
+		        (unsigned long long)tmp_dev->offset);
 		bio_io_error(bio, bio->bi_size);
 		return 0;
 	}
diff -puN include/linux/raid/linear.h~md-fix-problem-with-md-linear-for-devices-larger-than-2-terabytes include/linux/raid/linear.h
--- 25/include/linux/raid/linear.h~md-fix-problem-with-md-linear-for-devices-larger-than-2-terabytes	Wed Nov  3 14:54:50 2004
+++ 25-akpm/include/linux/raid/linear.h	Wed Nov  3 14:54:50 2004
@@ -5,8 +5,8 @@
 
 struct dev_info {
 	mdk_rdev_t	*rdev;
-	unsigned long	size;
-	unsigned long	offset;
+	sector_t	size;
+	sector_t	offset;
 };
 
 typedef struct dev_info dev_info_t;
_
