Commit 54532fdd authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: fix problem with md/linear for devices larger than 2 terabytes

Some size fields were "int" instead of "sector_t".
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7060950e
......@@ -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_queue_t *q, struct bio *bio)
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;
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment