Skip to contentSkip to conversation

pdcraid and weird IDE geometry

PATCH Walt H 1 participant 1 message Jul 18, 2003 Kbuild

lore
Share & tools
lore

Walt H

author
#0 lore raw

Just to finish this thread. In case anyone else has similar problems of only detecting 1 drive of their array and you suspect strange geometry is at play, here's the simple patch I used in the end which WFM :)

-Walt

pdcraid.c renamed from usr/src/temp/linux-2.4.21/drivers/ide/raid/pdcraid.c +3 -2
@@ -361,7 +361,8 @@
 	if (ideinfo->sect==0)
 		return 0;
-	lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
+/*	lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
 	lba = lba * (ideinfo->head*ideinfo->sect);
-	lba = lba - ideinfo->sect;
+	lba = lba - ideinfo->sect; */
+	lba = ideinfo->capacity - ideinfo->sect;
 
 	return lba;