public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH - Software RAID Autodetection for OSF partitions
@ 2001-09-09  9:44 Dustin Marquess
  2001-09-09 23:09 ` Neil Brown
  2001-09-15 19:23 ` Tom Vier
  0 siblings, 2 replies; 4+ messages in thread
From: Dustin Marquess @ 2001-09-09  9:44 UTC (permalink / raw)
  To: linux-kernel


Here's a quick patch that I wrote-up for 2.4.10-pre5 (should work with
other 2.4.x kernels too), so that the OSF partition code should
auto-detect partitions with a fstype of 0xFD (software RAID).

It seems to work for me, except that the software RAID code in 2.4.10-pre5
(both with and without my patch) keep dying with superblock errors on line
1574 of md.c.  If anybody knows how to fix this error, please let me know
:).

Thanks,
-Dustin

--- linux/fs/partitions/osf.c	Fri Feb 16 18:02:37 2001
+++ /usr/src/linux-2.4.10-pre5/fs/partitions/osf.c	Sat Sep  8 22:53:37 2001
@@ -17,6 +17,12 @@
 #include "check.h"
 #include "osf.h"

+#if CONFIG_BLK_DEV_MD
+extern void md_autodetect_dev(kdev_t dev);
+#include <asm/unaligned.h>
+#define P_FSTYPE(p)	(get_unaligned(&p->p_fstype))
+#endif
+
 int osf_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector,
 		  int current_minor)
 {
@@ -77,6 +83,12 @@
 			add_gd_partition(hd, current_minor,
 				first_sector+le32_to_cpu(partition->p_offset),
 				le32_to_cpu(partition->p_size));
+#if CONFIG_BLK_DEV_MD
+			if (P_FSTYPE(partition) == LINUX_RAID_PARTITION) {
+				md_autodetect_dev(MKDEV(hd->major,current_minor));
+			}
+#endif
+
 		current_minor++;
 	}
 	printk("\n");



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH - Software RAID Autodetection for OSF partitions
  2001-09-09  9:44 PATCH - Software RAID Autodetection for OSF partitions Dustin Marquess
@ 2001-09-09 23:09 ` Neil Brown
  2001-09-15 19:23 ` Tom Vier
  1 sibling, 0 replies; 4+ messages in thread
From: Neil Brown @ 2001-09-09 23:09 UTC (permalink / raw)
  To: Dustin Marquess; +Cc: linux-kernel, linux-raid

On Sunday September 9, jailbird@alcatraz.fdf.net wrote:
> 
> Here's a quick patch that I wrote-up for 2.4.10-pre5 (should work with
> other 2.4.x kernels too), so that the OSF partition code should
> auto-detect partitions with a fstype of 0xFD (software RAID).
> 
> It seems to work for me, except that the software RAID code in 2.4.10-pre5
> (both with and without my patch) keep dying with superblock errors on line
> 1574 of md.c.  If anybody knows how to fix this error, please let me know
> :).

line 1574 of md.c is an MD_BUG which gets called if "analyse_sbs"
returns non-zero.
analyse_sbs returns non-zero only if the label "abort:" is jumped.
Every "goto abort" is preceeded by an "MD_BUG" or a printk except one
after check_disk_sb and one after alloc_array_sb.
These both print messages in cases were they fail, except for
alloc_array_sb which won't print a message if __get_free_pages
fails.

So, if the message about "1574 of md.c" is the first message you get,
then __get_free_page must be failing.  It it isn't, please tell us the
first error message that you get.

NeilBrown

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH - Software RAID Autodetection for OSF partitions
  2001-09-09  9:44 PATCH - Software RAID Autodetection for OSF partitions Dustin Marquess
  2001-09-09 23:09 ` Neil Brown
@ 2001-09-15 19:23 ` Tom Vier
  2001-09-15 20:34   ` Dustin Marquess
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Vier @ 2001-09-15 19:23 UTC (permalink / raw)
  To: Dustin Marquess; +Cc: linux-kernel

i sent alan a patch for the same thing awhile ago, but he wanted to make
sure 0xfd isn't used as a type by osf/1.

On Sun, Sep 09, 2001 at 04:44:04AM -0500, Dustin Marquess wrote:
> Here's a quick patch that I wrote-up for 2.4.10-pre5 (should work with
> other 2.4.x kernels too), so that the OSF partition code should
> auto-detect partitions with a fstype of 0xFD (software RAID).

-- 
Tom Vier <tmv5@home.com>
DSA Key id 0x27371A2C

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH - Software RAID Autodetection for OSF partitions
  2001-09-15 19:23 ` Tom Vier
@ 2001-09-15 20:34   ` Dustin Marquess
  0 siblings, 0 replies; 4+ messages in thread
From: Dustin Marquess @ 2001-09-15 20:34 UTC (permalink / raw)
  To: Tom Vier; +Cc: linux-kernel


	DOHT! And I'm sure your code was probably a lot cleaner too :)

	That's actually a real good question.. I have a Tru64 v5.1 box
here I can check on...  I'll see what I can find..

	-Dustin

On Sat, 15 Sep 2001, Tom Vier wrote:

> i sent alan a patch for the same thing awhile ago, but he wanted to make
> sure 0xfd isn't used as a type by osf/1.
>
> On Sun, Sep 09, 2001 at 04:44:04AM -0500, Dustin Marquess wrote:
> > Here's a quick patch that I wrote-up for 2.4.10-pre5 (should work with
> > other 2.4.x kernels too), so that the OSF partition code should
> > auto-detect partitions with a fstype of 0xFD (software RAID).
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-15 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-09  9:44 PATCH - Software RAID Autodetection for OSF partitions Dustin Marquess
2001-09-09 23:09 ` Neil Brown
2001-09-15 19:23 ` Tom Vier
2001-09-15 20:34   ` Dustin Marquess

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