lkml.org 
[lkml]   [2000]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: kernel panic in SoftwareRAID autodetection
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/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.099 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site