device-mapper: fix TB stripe data corruption

From: Alasdair G Kergon
Date: Fri Jan 21 2005 - 13:21:11 EST


Missing cast thought to cause data corruption on devices with stripes > ~1TB.

Signed-Off-By: Alasdair G Kergon <agk@xxxxxxxxxx>
--- diff/drivers/md/dm-stripe.c 2005-01-20 17:32:37.000000000 +0000
+++ source/drivers/md/dm-stripe.c 2005-01-20 17:32:26.000000000 +0000
@@ -179,7 +179,7 @@

bio->bi_bdev = sc->stripe[stripe].dev->bdev;
bio->bi_sector = sc->stripe[stripe].physical_start +
- (chunk << sc->chunk_shift) + (offset & sc->chunk_mask);
+ ((sector_t) chunk << sc->chunk_shift) + (offset & sc->chunk_mask);
return 1;
}

@@ -212,7 +212,7 @@

static struct target_type stripe_target = {
.name = "striped",
- .version= {1, 0, 1},
+ .version= {1, 0, 2},
.module = THIS_MODULE,
.ctr = stripe_ctr,
.dtr = stripe_dtr,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/