Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hello all,
yesterday a customer requested me to install drbd on a sparc64. As it turned
out, I had to add a code, which is required for ioctl()s on sparc64
architecture. Besides of this slight change, the drbd seems to be working
there.
As I didn't find a direct e-mail address to the authors on the project web
page, I post the necessary patch here.
Please note that:
1) the changes cannot be easily made in a module (kernel change needed)
2) you will also need to copy the header files drbd.h and drbd_config.h to the
kernel include directory before compilation
3) a similiar change will be needed for other 64-bit architectures.
Please CC: me when replying, I am not member of the list.
Regards,
Milan Pikula
--- linux/arch/sparc64/kernel/ioctl32.c.orig Thu Jan 15 23:01:07 2004
+++ linux/arch/sparc64/kernel/ioctl32.c Fri Jan 16 04:27:00 2004
@@ -102,6 +102,8 @@
#include <linux/random.h>
#include <linux/filter.h>
+#include <linux/drbd.h>
+
/* Use this to get at 32-bit user passed pointers.
See sys_sparc32.c for description about these. */
#define A(__x) ((unsigned long)(__x))
@@ -5023,6 +5025,19 @@
COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
COMPATIBLE_IOCTL(NBD_DISCONNECT)
+/* DRBD */
+COMPATIBLE_IOCTL(DRBD_IOCTL_GET_VERSION)
+COMPATIBLE_IOCTL(DRBD_IOCTL_SET_STATE)
+COMPATIBLE_IOCTL(DRBD_IOCTL_WAIT_SYNC)
+COMPATIBLE_IOCTL(DRBD_IOCTL_DO_SYNC_ALL)
+COMPATIBLE_IOCTL(DRBD_IOCTL_SET_DISK_CONFIG)
+COMPATIBLE_IOCTL(DRBD_IOCTL_SET_NET_CONFIG)
+COMPATIBLE_IOCTL(DRBD_IOCTL_UNCONFIG_NET)
+COMPATIBLE_IOCTL(DRBD_IOCTL_UNCONFIG_BOTH)
+COMPATIBLE_IOCTL(DRBD_IOCTL_GET_CONFIG)
+COMPATIBLE_IOCTL(DRBD_IOCTL_WAIT_CONNECT)
+COMPATIBLE_IOCTL(DRBD_IOCTL_SECONDARY_REM)
+COMPATIBLE_IOCTL(DRBD_IOCTL_SET_SYNC_CONFIG)
/* And these ioctls need translation */
HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
--
Ing. Milan Pikula
Meličkovej 15 A, 841 05 Bratislava, Slovak Republic
e-mail: milan.pikula at ipsec.info
web: http://www.ipsec.info/
tel.: +421 908 434967