Messages in this thread Patch in this message |  | | Date | Sun, 9 Sep 2001 04:44:04 -0500 (CDT) | From | Dustin Marquess <> | Subject | PATCH - Software RAID Autodetection for OSF partitions |
| |
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");
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |