public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH:  Alternate pdcraid superblock finder
@ 2003-12-28 17:11 Walt H
  0 siblings, 0 replies; 3+ messages in thread
From: Walt H @ 2003-12-28 17:11 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

Hi,

This patch proposes an alternate method of finding the raid superblock on
Promise raid devices. It hasn't received much testing, so I left the old routine
intact and just check for ideinfo->head == 255 to use my method. I'm not aware
of any reasons why my method wouldn't work for all drives, but I thought this
was a safer change.

-Walt Holman


[-- Attachment #2: pdcraid.patch --]
[-- Type: text/plain, Size: 612 bytes --]

--- /usr/src/temp/linux-2.4.21-xfs/linux/drivers/ide/raid/pdcraid.c	2003-12-22 17:59:09.653139067 -0800
+++ linux/drivers/ide/raid/pdcraid.c	2003-07-21 20:47:14.000000000 -0700
@@ -361,7 +361,11 @@
 	if (ideinfo->sect==0)
 		return 0;
-	lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
-	lba = lba * (ideinfo->head*ideinfo->sect);
-	lba = lba - ideinfo->sect;
+	if (ideinfo->head!=255) {
+		lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
+		lba = lba * (ideinfo->head*ideinfo->sect);
+		lba = lba - ideinfo->sect; }
+	else {
+		lba = ideinfo->capacity - ideinfo->sect;
+	}
 
 	return lba;


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <3FF1A32E.7060103@comcast.net>]
[parent not found: <20040105193054.BA95080003A@intra.cyclades.com>]

end of thread, other threads:[~2004-01-05 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-28 17:11 PATCH: Alternate pdcraid superblock finder Walt H
     [not found] <3FF1A32E.7060103@comcast.net>
2004-01-05 19:30 ` Nicklas Bondesson
     [not found] <20040105193054.BA95080003A@intra.cyclades.com>
2004-01-05 21:00 ` Marcelo Tosatti

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