All of lore.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; 7+ 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] 7+ messages in thread
[parent not found: <41F6A093.1020606@meditprofi.ru>]

end of thread, other threads:[~2005-01-28  0:06 UTC | newest]

Thread overview: 7+ 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
     [not found] <41F6A093.1020606@meditprofi.ru>
     [not found] ` <200501251448.31769.kevcorry@us.ibm.com>
2005-01-28  0:06   ` Kevin Corry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.