PATCH - Software RAID Autodetection for OSF partitions

Dustin Marquess (
Sun, 9 Sep 2001 04:44:04 -0500 (CDT)

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


--- 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"

+extern void md_autodetect_dev(kdev_t dev);
+#include <asm/unaligned.h>
+#define P_FSTYPE(p) (get_unaligned(&p->p_fstype))
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,
+ if (P_FSTYPE(partition) == LINUX_RAID_PARTITION) {
+ md_autodetect_dev(MKDEV(hd->major,current_minor));
+ }

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at