Whamcloud - gitweb
fix socknal build on vanilla kernels by adding socket exports
authorphil <phil>
Fri, 22 Aug 2003 21:39:57 +0000 (21:39 +0000)
committerphil <phil>
Fri, 22 Aug 2003 21:39:57 +0000 (21:39 +0000)
bumped the kernel patch version to 23, but really only vanilla-2.4.20 changed

lnet/klnds/socklnd/Makefile.am
lustre/kernel_patches/patches/lustre_version.patch
lustre/kernel_patches/patches/socket-exports-vanilla.patch [new file with mode: 0644]
lustre/kernel_patches/pc/socket-exports-vanilla.pc [new file with mode: 0644]
lustre/kernel_patches/series/vanilla-2.4.20
lustre/obdclass/class_obd.c
lustre/portals/knals/socknal/Makefile.am

index 437d7fc..d6c717c 100644 (file)
@@ -9,5 +9,9 @@ MODULE = ksocknal
 modulenet_DATA = ksocknal.o
 EXTRA_PROGRAMS = ksocknal
 
+# If you don't build with -O2, your modules won't insert, becahse htonl is
+# just special that way.
+CFLAGS += -O2
+
 DEFS =
 ksocknal_SOURCES = socknal.c socknal_cb.c socknal.h
index c987485..7a47d62 100644 (file)
@@ -7,6 +7,6 @@
 --- /dev/null  Fri Aug 30 17:31:37 2002
 +++ linux-2.4.18-18.8.0-l12-braam/include/linux/lustre_version.h       Thu Feb 13 07:58:33 2003
 @@ -0,0 +1 @@
-+#define LUSTRE_KERNEL_VERSION 21
++#define LUSTRE_KERNEL_VERSION 23
 
 _
diff --git a/lustre/kernel_patches/patches/socket-exports-vanilla.patch b/lustre/kernel_patches/patches/socket-exports-vanilla.patch
new file mode 100644 (file)
index 0000000..9dd5008
--- /dev/null
@@ -0,0 +1,42 @@
+ include/linux/socket.h |    4 ++++
+ net/netsyms.c          |    2 ++
+ net/socket.c           |    2 +-
+ 3 files changed, 7 insertions(+), 1 deletion(-)
+
+--- linux-2.4.20-l18/include/linux/socket.h~socket-exports-vanilla     Fri Aug 22 15:43:58 2003
++++ linux-2.4.20-l18-phil/include/linux/socket.h       Fri Aug 22 16:26:37 2003
+@@ -260,6 +260,10 @@ extern void memcpy_tokerneliovec(struct 
+ extern int move_addr_to_user(void *kaddr, int klen, void *uaddr, int *ulen);
+ extern int move_addr_to_kernel(void *uaddr, int ulen, void *kaddr);
+ extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
++struct socket;
++extern int sock_map_fd(struct socket *sock);
++extern struct socket *sockfd_lookup(int fd, int *err);
++
+ #endif
+ #endif /* not kernel and not glibc */
+ #endif /* _LINUX_SOCKET_H */
+--- linux-2.4.20-l18/net/netsyms.c~socket-exports-vanilla      Fri Aug 22 15:43:58 2003
++++ linux-2.4.20-l18-phil/net/netsyms.c        Fri Aug 22 16:25:04 2003
+@@ -159,6 +159,8 @@ EXPORT_SYMBOL(datagram_poll);
+ EXPORT_SYMBOL(put_cmsg);
+ EXPORT_SYMBOL(sock_kmalloc);
+ EXPORT_SYMBOL(sock_kfree_s);
++EXPORT_SYMBOL(sockfd_lookup);
++EXPORT_SYMBOL(sock_map_fd);
+ #ifdef CONFIG_FILTER
+ EXPORT_SYMBOL(sk_run_filter);
+--- linux-2.4.20-l18/net/socket.c~socket-exports-vanilla       Fri Aug 22 15:43:58 2003
++++ linux-2.4.20-l18-phil/net/socket.c Fri Aug 22 16:25:04 2003
+@@ -325,7 +325,7 @@ static struct dentry_operations sockfs_d
+  *    but we take care of internal coherence yet.
+  */
+-static int sock_map_fd(struct socket *sock)
++int sock_map_fd(struct socket *sock)
+ {
+       int fd;
+       struct qstr this;
+
+_
diff --git a/lustre/kernel_patches/pc/socket-exports-vanilla.pc b/lustre/kernel_patches/pc/socket-exports-vanilla.pc
new file mode 100644 (file)
index 0000000..3277003
--- /dev/null
@@ -0,0 +1,3 @@
+include/linux/socket.h
+net/netsyms.c
+net/socket.c
index 726a028..d36f90a 100644 (file)
@@ -29,3 +29,4 @@ ext3-map_inode_page.patch
 ext3-error-export.patch
 iopen-2.4.20.patch
 tcp-zero-copy.patch
+socket-exports-vanilla.patch
index 8275ed8..2efee5b 100644 (file)
@@ -916,8 +916,8 @@ static void cleanup_obdclass(void)
  * kernel patch */
 #ifdef __KERNEL__
 #include <linux/lustre_version.h>
-#define LUSTRE_MIN_VERSION 21
-#define LUSTRE_MAX_VERSION 21
+#define LUSTRE_MIN_VERSION 23
+#define LUSTRE_MAX_VERSION 23
 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION)
 # error Cannot continue: Your Lustre kernel patch is older than the sources
 #elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION)
index 437d7fc..d6c717c 100644 (file)
@@ -9,5 +9,9 @@ MODULE = ksocknal
 modulenet_DATA = ksocknal.o
 EXTRA_PROGRAMS = ksocknal
 
+# If you don't build with -O2, your modules won't insert, becahse htonl is
+# just special that way.
+CFLAGS += -O2
+
 DEFS =
 ksocknal_SOURCES = socknal.c socknal_cb.c socknal.h