From: James Simmons Date: Thu, 5 Jun 2014 00:36:17 +0000 (-0400) Subject: LU-5140 build: Make ko2iblnd buildable with Mellanox and newer kernels X-Git-Tag: 2.6.0-RC1~89 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=26d8420f685bfbf3e0cf35f69e04cc68588340dc;ds=sidebyside LU-5140 build: Make ko2iblnd buildable with Mellanox and newer kernels The libcfs layer handles different level of support for process namespace support. It does this by examining the uidgid.h header. Both newer kernels and the Mellanox external OFED stack supply their own uidgid.h header. In the current ko2iblnd driver it completely ignores the Mellanox uidgid.h version which ends up conflicting with the native uidgid.h header. The reason libcfs misses the Mellanox handling is because the libcfs and lnet headers are placed before the Mellanox headers so the definations are missed. This patch moves all the libcfs and lnet headers after the Mellanox header section. Change-Id: Ibd7425b4a4d5b0f59c48e2007d870c67adb5f63d Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/10571 Tested-by: Jenkins Reviewed-by: Bob Glossman Reviewed-by: Liang Zhen Reviewed-by: Shuichi Ihara Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin --- diff --git a/libcfs/include/libcfs/curproc.h b/libcfs/include/libcfs/curproc.h index e5e3d57..aa144e7 100644 --- a/libcfs/include/libcfs/curproc.h +++ b/libcfs/include/libcfs/curproc.h @@ -45,6 +45,9 @@ #if !defined(HAVE_UIDGID_HEADER) || !defined(__KERNEL__) +#ifndef _LINUX_UIDGID_H +#define _LINUX_UIDGID_H + typedef uid_t kuid_t; typedef gid_t kgid_t; @@ -106,6 +109,8 @@ static inline bool gid_valid(kgid_t gid) { return (gid != INVALID_GID); } +#endif /* _LINUX_UIDGID_H */ + #endif int cfs_get_environ(const char *key, char *value, int *val_len); diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index f5edc51..26524f5 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -66,12 +66,6 @@ #include #include -#define DEBUG_SUBSYSTEM S_LND - -#include -#include -#include - #ifdef HAVE_COMPAT_RDMA #include #endif @@ -80,6 +74,12 @@ #include #include +#define DEBUG_SUBSYSTEM S_LND + +#include +#include +#include + #define IBLND_PEER_HASH_SIZE 101 /* # peer lists */ /* # scheduler loops before reschedule */ #define IBLND_RESCHED 100