All of lore.kernel.org
 help / color / mirror / Atom feed
From: Walt H <waltabbyh@comcast.net>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: PATCH:  Alternate pdcraid superblock finder
Date: Sun, 28 Dec 2003 09:11:54 -0800	[thread overview]
Message-ID: <3FEF0EDA.7090502@comcast.net> (raw)

[-- 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;


             reply	other threads:[~2003-12-28 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-28 17:11 Walt H [this message]
     [not found] <3FF1A32E.7060103@comcast.net>
2004-01-05 19:30 ` PATCH: Alternate pdcraid superblock finder Nicklas Bondesson
     [not found] <20040105193054.BA95080003A@intra.cyclades.com>
2004-01-05 21:00 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FEF0EDA.7090502@comcast.net \
    --to=waltabbyh@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.