public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roberto Ragusa <robertoragusa@technologist.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel panic in SoftwareRAID autodetection
Date: Wed, 06 Dec 2000 01:08:27 +0200	[thread overview]
Message-ID: <yam8375.1358.149393648@a4000> (raw)
In-Reply-To: <14893.25967.936504.881427@notabene.cse.unsw.edu.au>

On 06-Dec-00, Neil Brown wrote:

> The following patch isn't *correct*, but if it makes a difference for
> you, then it means that we have found the problem.. please let me
> know.
[one line patch]

Yes, it makes a difference :-) . The boot doesn't fail anymore and
all the RAID partitions are correctly detected.

BTW, here is a little patch regarding a silly problem I found
about RAID partitions naming (/proc/partitions).
No more "md8" "md9" "md:" "md;" ... but "md8" "md9" "md10" "md11" ...
Well, this patch should work up to "md99".

--- fs/partitions/check.c    Thu Nov  2 12:22:50 2000
+++ fs/partitions/check.c    Wed Dec  6 00:34:46 2000
@@ -121,10 +121,17 @@
 			unit += 2;
 		case IDE0_MAJOR:
 			maj = "hd";
-			break;
-		case MD_MAJOR:
-			unit -= 'a'-'0';
-			break;
+	}
+	if (hd->major == MD_MAJOR) {
+		unit -= 'a';
+		if (unit<10) {
+			sprintf(buf, "%s%c", maj, '0' + unit);
+			return buf;
+		}
+		else {
+			sprintf(buf, "%s%c%c", maj, '0' + unit / 10, '0' + unit % 10);
+			return buf;
+		}
 	}
 	if (hd->major >= SCSI_DISK1_MAJOR && hd->major <= SCSI_DISK7_MAJOR) {
 		unit = unit + (hd->major - SCSI_DISK1_MAJOR + 1) * 16;


For 2.2.x kernels, the file to be patched is drivers/block/genhd.c.

>> Please CC to me because I'm not a LKML subscriber.
> 
> Ofcourse.  I think it is common courtesy to reply to the author, and
> cc to the list if appropriate.

OK.

-- 
       Roberto Ragusa   robertoragusa at technologist.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-06  0:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-01 14:50 kernel panic in SoftwareRAID autodetection Roberto Ragusa
2000-12-01 19:47 ` Neil Brown
2000-12-04 20:21   ` Roberto Ragusa
2000-12-05 22:00     ` Neil Brown
2000-12-05 23:08       ` Roberto Ragusa [this message]
2000-12-06  0:36         ` Peter Samuelson
2000-12-06 13:16           ` Brian Kress
2000-12-06 16:40             ` Peter Samuelson
2000-12-06 19:03               ` Brian Kress
2000-12-06 20:54             ` Neil Brown
2000-12-06 21:32               ` Brian Kress
2000-12-07  1:55                 ` Neil Brown

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=yam8375.1358.149393648@a4000 \
    --to=robertoragusa@technologist.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox