[parisc-linux] mkraid doesnt work on L2000 with 64-bit kernel

James Braid james.braid@peace.com
Wed, 1 May 2002 16:23:09 +1200


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay, well here's my patch for RAID on 64-bit Linux/PA-RISC. This is
the diff of the two files before and after:

8<---- START ----8<

- --- kernel-source-2.4.17-hppa/arch/parisc/kernel/ioctl32.c      Fri
Nov  2 18:54:54 2001
+++ kernel-source-2.4.17-hppa-patch/arch/parisc/kernel/ioctl32.c     
  Wed May  1 03:46:28 2002
@@ -19,9 +19,7 @@
 #include <linux/if.h>
 #include <linux/slab.h>
 #include <linux/hdreg.h>
- -#if 0 /* New RAID code is half-merged... -DaveM */
- -#include <linux/md.h>
- -#endif
+#include <linux/raid/md.h>
 #include <linux/kd.h>
 #include <linux/route.h>
 #include <linux/skbuff.h>
@@ -2880,16 +2878,26 @@ COMPATIBLE_IOCTL(BLKFRASET)
 COMPATIBLE_IOCTL(BLKSECTSET)
 COMPATIBLE_IOCTL(BLKSSZGET)

- -#if 0
- -       /* New RAID code is being merged, fix up to handle
- -        * new RAID ioctls when fully merged in 2.3.x -DaveM
- -        */
- -/* 0x09 */
- -COMPATIBLE_IOCTL(REGISTER_DEV)
- -COMPATIBLE_IOCTL(REGISTER_DEV_NEW)
- -COMPATIBLE_IOCTL(START_MD)
- -COMPATIBLE_IOCTL(STOP_MD)
- -#endif
+/* RAID */
+COMPATIBLE_IOCTL(RAID_VERSION)
+COMPATIBLE_IOCTL(GET_ARRAY_INFO)
+COMPATIBLE_IOCTL(GET_DISK_INFO)
+COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
+COMPATIBLE_IOCTL(CLEAR_ARRAY)
+COMPATIBLE_IOCTL(ADD_NEW_DISK)
+COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
+COMPATIBLE_IOCTL(SET_ARRAY_INFO)
+COMPATIBLE_IOCTL(SET_DISK_INFO)
+COMPATIBLE_IOCTL(WRITE_RAID_INFO)
+COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
+COMPATIBLE_IOCTL(PROTECT_ARRAY)
+COMPATIBLE_IOCTL(HOT_ADD_DISK)
+COMPATIBLE_IOCTL(SET_DISK_FAULTY)
+COMPATIBLE_IOCTL(RUN_ARRAY)
+COMPATIBLE_IOCTL(START_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY_RO)
+COMPATIBLE_IOCTL(RESTART_ARRAY_RW)

 /* Big K */
 COMPATIBLE_IOCTL(PIO_FONT)

8<---- END ----8<

Hopefully this is the right format and everything. I have been
testing it for a few hours and it seems to work fine.

Cheers, James

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1.1

iQA/AwUBPM9trVW+bhIOiSqWEQLElwCfV0rBq2eNinQrDa+C4iP4/oLDr7oAnRUa
laoVuvja3MPuH3rH9qVAXGCp
=qIsc
-----END PGP SIGNATURE-----