public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* device-mapper: fix TB stripe data corruption
@ 2005-01-21 18:12 Alasdair G Kergon
  2005-01-21 20:33 ` Benjamin LaHaise
  0 siblings, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2005-01-21 18:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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

Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
--- 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,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-22 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 18:12 device-mapper: fix TB stripe data corruption Alasdair G Kergon
2005-01-21 20:33 ` Benjamin LaHaise
2005-01-21 21:12   ` Kevin Corry
2005-01-21 21:20     ` Roland Dreier
2005-01-21 21:57       ` Kevin Corry
2005-01-22 22:35         ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox