[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] Re: [linux-lvm] Data corruption on large, multi-device filesystem



On Thu, Jan 20, 2005 at 09:06:44AM -0500, Randall A. Jones wrote:
> To verify, this corruption you are seeing only happens when you have a 
> LV larger than 2TB
> and when you use striping specifically with lvcreate -i.
> Has anyone experienced data corruption with >2TB LV and no striping?
 
Does this patch help?


Missing cast causing data corruption on devices with stripes > ~1TB.
--- 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;
 }
 

Alasdair
-- 
agk redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]