[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH] 2.6.0-test2: update ioctl32 handlers for DM v4 ioctls



Update the ioctl32 handlers for the 64-bit architectures to recognize the
new Device-Mapper version 4 ioctls. The version 1 ioctls are still there.
If/When the version 1 ioctls are removed, these same files will need to
be updated again.

I have been unable to test this patch yet, since I have not had any luck
getting 2.6.0-test2 to compile on my ppc64 box (not a dm-related problem).
But the patch is pretty trivial, so I'm pretty confident it will work. If anyone
else can test this (on mips64, sparc64, parisc, or x86-64), let me know
if you have any problems.


--- linux-2.6.0-test2/arch/mips64/kernel/ioctl32.c	2003-07-27 12:02:00.000000000 -0500
+++ linux-2.6.0-test2-dm/arch/mips64/kernel/ioctl32.c	2003-07-29 12:04:35.000000000 -0500
@@ -1154,6 +1154,21 @@
 #endif /* CONFIG_SIBYTE_TBPROF */
 
 #if defined(CONFIG_BLK_DEV_DM) || defined(CONFIG_BLK_DEV_DM_MODULE)
+	#if defined(CONFIG_DM_IOCTL_V4)
+	IOCTL32_DEFAULT(DM_VERSION),
+	IOCTL32_DEFAULT(DM_REMOVE_ALL),
+	IOCTL32_DEFAULT(DM_LIST_DEVICES),
+	IOCTL32_DEFAULT(DM_DEV_CREATE),
+	IOCTL32_DEFAULT(DM_DEV_REMOVE),
+	IOCTL32_DEFAULT(DM_DEV_RENAME),
+	IOCTL32_DEFAULT(DM_DEV_SUSPEND),
+	IOCTL32_DEFAULT(DM_DEV_STATUS),
+	IOCTL32_DEFAULT(DM_DEV_WAIT),
+	IOCTL32_DEFAULT(DM_TABLE_LOAD),
+	IOCTL32_DEFAULT(DM_TABLE_CLEAR),
+	IOCTL32_DEFAULT(DM_TABLE_DEPS),
+	IOCTL32_DEFAULT(DM_TABLE_STATUS),
+	#else
 	IOCTL32_DEFAULT(DM_VERSION),
 	IOCTL32_DEFAULT(DM_REMOVE_ALL),
 	IOCTL32_DEFAULT(DM_DEV_CREATE),
@@ -1165,6 +1180,7 @@
 	IOCTL32_DEFAULT(DM_DEV_STATUS),
 	IOCTL32_DEFAULT(DM_TARGET_STATUS),
 	IOCTL32_DEFAULT(DM_TARGET_WAIT),
+	#endif
 #endif /* CONFIG_BLK_DEV_DM */
 
 COMPATIBLE_IOCTL(MTIOCTOP)			/* mtio.h ioctls  */
--- linux-2.6.0-test2/arch/sparc64/kernel/ioctl32.c	2003-07-27 12:08:37.000000000 -0500
+++ linux-2.6.0-test2-dm/arch/sparc64/kernel/ioctl32.c	2003-07-29 12:07:44.000000000 -0500
@@ -1546,6 +1546,21 @@
 COMPATIBLE_IOCTL(BNEPGETCONNLIST)
 COMPATIBLE_IOCTL(BNEPGETCONNINFO)
 /* device-mapper */
+#if defined(CONFIG_DM_IOCTL_V4)
+COMPATIBLE_IOCTL(DM_VERSION)
+COMPATIBLE_IOCTL(DM_REMOVE_ALL)
+COMPATIBLE_IOCTL(DM_LIST_DEVICES)
+COMPATIBLE_IOCTL(DM_DEV_CREATE)
+COMPATIBLE_IOCTL(DM_DEV_REMOVE)
+COMPATIBLE_IOCTL(DM_DEV_RENAME)
+COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
+COMPATIBLE_IOCTL(DM_DEV_STATUS)
+COMPATIBLE_IOCTL(DM_DEV_WAIT)
+COMPATIBLE_IOCTL(DM_TABLE_LOAD)
+COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
+COMPATIBLE_IOCTL(DM_TABLE_DEPS)
+COMPATIBLE_IOCTL(DM_TABLE_STATUS)
+#else
 COMPATIBLE_IOCTL(DM_VERSION)
 COMPATIBLE_IOCTL(DM_REMOVE_ALL)
 COMPATIBLE_IOCTL(DM_DEV_CREATE)
@@ -1557,6 +1572,7 @@
 COMPATIBLE_IOCTL(DM_DEV_STATUS)
 COMPATIBLE_IOCTL(DM_TARGET_STATUS)
 COMPATIBLE_IOCTL(DM_TARGET_WAIT)
+#endif
 /* And these ioctls need translation */
 HANDLE_IOCTL(HDIO_GETGEO_BIG_RAW, hdio_getgeo_big)
 /* NCPFS */
--- linux-2.6.0-test2/include/linux/compat_ioctl.h	2003-07-27 12:10:22.000000000 -0500
+++ linux-2.6.0-test2-dm/include/linux/compat_ioctl.h	2003-07-29 12:17:53.000000000 -0500
@@ -119,6 +119,20 @@
 COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
 #ifdef CONFIG_BLK_DEV_DM
 /* DM */
+#ifdef CONFIG_DM_IOCTL_V4
+COMPATIBLE_IOCTL(DM_VERSION)
+COMPATIBLE_IOCTL(DM_LIST_DEVICES)
+COMPATIBLE_IOCTL(DM_DEV_CREATE)
+COMPATIBLE_IOCTL(DM_DEV_REMOVE)
+COMPATIBLE_IOCTL(DM_DEV_RENAME)
+COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
+COMPATIBLE_IOCTL(DM_DEV_STATUS)
+COMPATIBLE_IOCTL(DM_DEV_WAIT)
+COMPATIBLE_IOCTL(DM_TABLE_LOAD)
+COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
+COMPATIBLE_IOCTL(DM_TABLE_DEPS)
+COMPATIBLE_IOCTL(DM_TABLE_STATUS)
+#else
 COMPATIBLE_IOCTL(DM_VERSION)
 COMPATIBLE_IOCTL(DM_REMOVE_ALL)
 COMPATIBLE_IOCTL(DM_DEV_CREATE)
@@ -131,6 +145,7 @@
 COMPATIBLE_IOCTL(DM_TARGET_STATUS)
 COMPATIBLE_IOCTL(DM_TARGET_WAIT)
 #endif
+#endif
 /* Big K */
 COMPATIBLE_IOCTL(PIO_FONT)
 COMPATIBLE_IOCTL(GIO_FONT)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]