Whamcloud - gitweb
LU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory 89/28089/7
authorJames Simmons <uja.ornl@yahoo.com>
Sat, 5 Aug 2017 00:43:14 +0000 (20:43 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 5 Aug 2017 05:10:35 +0000 (05:10 +0000)
Move all the libcfs/lnet headers shared between user land and
kernel space to the new lnet uapi directory.

Test-Parameters: trivial

Change-Id: Id6142b0e890fd47d3318dc3c98e64f72b5df2594
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28089
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
75 files changed:
config/lustre-build.m4
libcfs/include/libcfs/Makefile.am
libcfs/include/libcfs/libcfs.h
libcfs/include/libcfs/libcfs_debug.h
libcfs/include/libcfs/util/ioctl.h
libcfs/libcfs/util/l_ioctl.c
libcfs/libcfs/util/nidstrings.c
lnet/autoconf/lustre-lnet.m4
lnet/include/Makefile.am
lnet/include/lnet/Makefile.am
lnet/include/lnet/api.h
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/include/lnet/socklnd.h
lnet/include/uapi/linux/lnet/.gitignore [new file with mode: 0644]
lnet/include/uapi/linux/lnet/Makefile.am [new file with mode: 0644]
lnet/include/uapi/linux/lnet/libcfs_debug.h [new file with mode: 0644]
lnet/include/uapi/linux/lnet/libcfs_ioctl.h [moved from libcfs/include/libcfs/libcfs_ioctl.h with 97% similarity]
lnet/include/uapi/linux/lnet/lnet-dlc.h [moved from lnet/include/lnet/lib-dlc.h with 94% similarity]
lnet/include/uapi/linux/lnet/lnet-types.h [moved from lnet/include/lnet/types.h with 99% similarity]
lnet/include/uapi/linux/lnet/lnetctl.h [moved from lnet/include/lnet/lnetctl.h with 92% similarity]
lnet/include/uapi/linux/lnet/lnetst.h [moved from lnet/include/lnet/lnetst.h with 99% similarity]
lnet/include/uapi/linux/lnet/nidstr.h [moved from lnet/include/lnet/nidstr.h with 95% similarity]
lnet/include/uapi/linux/lnet/socklnd.h [moved from lnet/include/lnet/lnet.h with 74% similarity]
lnet/klnds/o2iblnd/o2iblnd.h
lnet/klnds/socklnd/socklnd.h
lnet/lnet/module.c
lnet/lnet/net_fault.c
lnet/lnet/nidstrings.c
lnet/lnet/peer.c
lnet/selftest/conctl.c
lnet/selftest/conrpc.h
lnet/selftest/console.h
lnet/selftest/rpc.h
lnet/selftest/selftest.h
lnet/utils/debug.c
lnet/utils/lnetconfig/liblnd.h
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetctl.c
lnet/utils/lst.c
lnet/utils/portals.c
lnet/utils/wirecheck.c
lustre.spec.in
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_net.h
lustre/include/upcall_cache.h
lustre/ldlm/interval_tree.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_lproc.c
lustre/obdclass/class_obd.c
lustre/obdclass/linux/linux-module.c
lustre/obdclass/upcall_cache.c
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/nodemap_storage.c
lustre/ptlrpc/service.c
lustre/tests/it_test.c
lustre/utils/gss/l_idmap.c
lustre/utils/gss/lgss_sk.c
lustre/utils/gss/lsupport.c
lustre/utils/gss/lsupport.h
lustre/utils/gss/sk_utils.c
lustre/utils/gss/svcgssd_proc.c
lustre/utils/l_getidentity.c
lustre/utils/lctl.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_hsm.c
lustre/utils/libmount_utils_ldiskfs.c
lustre/utils/llog_reader.c
lustre/utils/lustre_cfg.c
lustre/utils/lustre_lfsck.c
lustre/utils/lustre_rsync.c
lustre/utils/mkfs_lustre.c
lustre/utils/mount_lustre.c
lustre/utils/obd.c

index 014ecdc..6cb3300 100644 (file)
@@ -329,7 +329,7 @@ AS_IF([test $target_cpu = powerpc64], [
        CC="$CC -m64"
 ])
 
        CC="$CC -m64"
 ])
 
-CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS"
+CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lnet/include/uapi -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS"
 
 CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
 AC_SUBST(CCASFLAGS)
 
 CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
 AC_SUBST(CCASFLAGS)
index 1ba83ea..7209f43 100644 (file)
@@ -13,7 +13,6 @@ EXTRA_DIST = \
        libcfs_fail.h \
        libcfs_hash.h \
        libcfs_heap.h \
        libcfs_fail.h \
        libcfs_hash.h \
        libcfs_heap.h \
-       libcfs_ioctl.h \
        libcfs_prim.h \
        libcfs_private.h \
        libcfs_string.h \
        libcfs_prim.h \
        libcfs_private.h \
        libcfs_string.h \
index 23f29d5..b33243a 100644 (file)
 #ifndef __LIBCFS_LIBCFS_H__
 #define __LIBCFS_LIBCFS_H__
 
 #ifndef __LIBCFS_LIBCFS_H__
 #define __LIBCFS_LIBCFS_H__
 
-#ifdef __KERNEL__
-# include <libcfs/linux/libcfs.h>
-# include "curproc.h"
+#include <uapi/linux/lnet/libcfs_ioctl.h>
+#include <libcfs/linux/libcfs.h>
+#include <libcfs/libcfs_debug.h>
+#include <libcfs/libcfs_private.h>
+#include <libcfs/bitmap.h>
+#include <libcfs/libcfs_cpu.h>
+#include <libcfs/libcfs_prim.h>
+#include <libcfs/libcfs_time.h>
+#include <libcfs/libcfs_string.h>
+#include <libcfs/libcfs_workitem.h>
+#include <libcfs/libcfs_hash.h>
+#include <libcfs/libcfs_heap.h>
+#include <libcfs/libcfs_fail.h>
+#include "curproc.h"
 
 #define LIBCFS_VERSION "0.5.0"
 
 
 #define LIBCFS_VERSION "0.5.0"
 
@@ -101,21 +112,6 @@ unsigned int cfs_rand(void);
 /* seed the generator */
 void cfs_srand(unsigned int, unsigned int);
 void cfs_get_random_bytes(void *buf, int size);
 /* seed the generator */
 void cfs_srand(unsigned int, unsigned int);
 void cfs_get_random_bytes(void *buf, int size);
-#endif /* __KERNEL__ */
-
-#include <libcfs/libcfs_debug.h>
-#ifdef __KERNEL__
-# include <libcfs/libcfs_private.h>
-# include <libcfs/bitmap.h>
-# include <libcfs/libcfs_cpu.h>
-# include <libcfs/libcfs_ioctl.h>
-# include <libcfs/libcfs_prim.h>
-# include <libcfs/libcfs_time.h>
-# include <libcfs/libcfs_string.h>
-# include <libcfs/libcfs_workitem.h>
-# include <libcfs/libcfs_hash.h>
-# include <libcfs/libcfs_heap.h>
-# include <libcfs/libcfs_fail.h>
 
 int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 int libcfs_ioctl(unsigned long cmd, void __user *uparam);
 
 int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 int libcfs_ioctl(unsigned long cmd, void __user *uparam);
@@ -132,6 +128,4 @@ static inline void *__container_of(const void *ptr, unsigned long shift)
 #define container_of0(ptr, type, member)                               \
        ((type *)__container_of((ptr), offsetof(type, member)))
 
 #define container_of0(ptr, type, member)                               \
        ((type *)__container_of((ptr), offsetof(type, member)))
 
-#endif /* __KERNEL__ */
-
 #endif /* _LIBCFS_LIBCFS_H_ */
 #endif /* _LIBCFS_LIBCFS_H_ */
index 2eb6b7a..6dc33b5 100644 (file)
@@ -38,6 +38,8 @@
 #ifndef __LIBCFS_DEBUG_H__
 #define __LIBCFS_DEBUG_H__
 
 #ifndef __LIBCFS_DEBUG_H__
 #define __LIBCFS_DEBUG_H__
 
+#include <uapi/linux/lnet/libcfs_debug.h>
+
 /*
  *  Debugging
  */
 /*
  *  Debugging
  */
@@ -60,112 +62,6 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys);
 extern unsigned int libcfs_catastrophe;
 extern unsigned int libcfs_panic_on_lbug;
 
 extern unsigned int libcfs_catastrophe;
 extern unsigned int libcfs_panic_on_lbug;
 
-/**
- * Format for debug message headers
- */
-struct ptldebug_header {
-        __u32 ph_len;
-        __u32 ph_flags;
-        __u32 ph_subsys;
-        __u32 ph_mask;
-        __u16 ph_cpu_id;
-        __u16 ph_type;
-       /* time_t overflow in 2106 */
-        __u32 ph_sec;
-        __u64 ph_usec;
-        __u32 ph_stack;
-        __u32 ph_pid;
-        __u32 ph_extern_pid;
-        __u32 ph_line_num;
-} __attribute__((packed));
-
-
-#define PH_FLAG_FIRST_RECORD 1
-
-/* Debugging subsystems (32 bits, non-overlapping) */
-#define S_UNDEFINED    0x00000001
-#define S_MDC          0x00000002
-#define S_MDS          0x00000004
-#define S_OSC          0x00000008
-#define S_OST          0x00000010
-#define S_CLASS                0x00000020
-#define S_LOG          0x00000040
-#define S_LLITE                0x00000080
-#define S_RPC          0x00000100
-#define S_MGMT         0x00000200
-#define S_LNET         0x00000400
-#define S_LND          0x00000800 /* ALL LNDs */
-#define S_PINGER       0x00001000
-#define S_FILTER       0x00002000
-/* unused */
-#define S_ECHO         0x00008000
-#define S_LDLM         0x00010000
-#define S_LOV          0x00020000
-#define S_LQUOTA       0x00040000
-#define S_OSD          0x00080000
-#define S_LFSCK                0x00100000
-#define S_SNAPSHOT     0x00200000
-/* unused */
-#define S_LMV          0x00800000 /* b_new_cmd */
-/* unused */
-#define S_SEC          0x02000000 /* upcall cache */
-#define S_GSS          0x04000000 /* b_new_cmd */
-/* unused */
-#define S_MGC          0x10000000
-#define S_MGS          0x20000000
-#define S_FID          0x40000000 /* b_new_cmd */
-#define S_FLD          0x80000000 /* b_new_cmd */
-
-#define LIBCFS_DEBUG_SUBSYS_NAMES {                                    \
-       "undefined", "mdc", "mds", "osc", "ost", "class", "log",        \
-       "llite", "rpc", "mgmt", "lnet", "lnd", "pinger", "filter", "",  \
-       "echo", "ldlm", "lov", "lquota", "osd", "lfsck", "snapshot", "",\
-       "lmv",  "", "sec", "gss", "", "mgc", "mgs", "fid", "fld", NULL }
-
-/* Debugging masks (32 bits, non-overlapping) */
-#define D_TRACE                0x00000001 /* ENTRY/EXIT markers */
-#define D_INODE                0x00000002
-#define D_SUPER                0x00000004
-#define D_EXT2         0x00000008 /* anything from ext2_debug */
-#define D_MALLOC       0x00000010 /* print malloc, free information */
-#define D_CACHE                0x00000020 /* cache-related items */
-#define D_INFO         0x00000040 /* general information */
-#define D_IOCTL                0x00000080 /* ioctl related information */
-#define D_NETERROR     0x00000100 /* network errors */
-#define D_NET          0x00000200 /* network communications */
-#define D_WARNING      0x00000400 /* CWARN(...) == CDEBUG (D_WARNING, ...) */
-#define D_BUFFS                0x00000800
-#define D_OTHER                0x00001000
-#define D_DENTRY       0x00002000
-#define D_NETTRACE     0x00004000
-#define D_PAGE         0x00008000 /* bulk page handling */
-#define D_DLMTRACE     0x00010000
-#define D_ERROR                0x00020000 /* CERROR(...) == CDEBUG (D_ERROR, ...) */
-#define D_EMERG                0x00040000 /* CEMERG(...) == CDEBUG (D_EMERG, ...) */
-#define D_HA           0x00080000 /* recovery and failover */
-#define D_RPCTRACE     0x00100000 /* for distributed debugging */
-#define D_VFSTRACE     0x00200000
-#define D_READA                0x00400000 /* read-ahead */
-#define D_MMAP         0x00800000
-#define D_CONFIG       0x01000000
-#define D_CONSOLE      0x02000000
-#define D_QUOTA                0x04000000
-#define D_SEC          0x08000000
-#define D_LFSCK                0x10000000 /* For both OI scrub and LFSCK */
-#define D_HSM          0x20000000
-#define D_SNAPSHOT     0x40000000 /* snapshot */
-#define D_LAYOUT       0x80000000
-
-#define LIBCFS_DEBUG_MASKS_NAMES {                                     \
-       "trace", "inode", "super", "ext2", "malloc", "cache", "info",   \
-       "ioctl", "neterror", "net", "warning", "buffs", "other",        \
-       "dentry", "nettrace", "page", "dlmtrace", "error", "emerg",     \
-       "ha", "rpctrace", "vfstrace", "reada", "mmap", "config",        \
-       "console", "quota", "sec", "lfsck", "hsm", "snapshot", "layout",\
-       NULL }
-
-#define D_CANTMASK   (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE)
-
 #ifndef DEBUG_SUBSYSTEM
 # define DEBUG_SUBSYSTEM S_UNDEFINED
 #endif
 #ifndef DEBUG_SUBSYSTEM
 # define DEBUG_SUBSYSTEM S_UNDEFINED
 #endif
@@ -207,9 +103,7 @@ do {                                                        \
                .msg_cdls   = (cdls)         };              \
         dataname.msg_mask   = (mask);
 
                .msg_cdls   = (cdls)         };              \
         dataname.msg_mask   = (mask);
 
-#ifdef __KERNEL__
-
-# ifdef CDEBUG_ENABLED
+#ifdef CDEBUG_ENABLED
 
 /**
  * Filters out logging messages based on mask and subsystem.
 
 /**
  * Filters out logging messages based on mask and subsystem.
@@ -251,22 +145,6 @@ static inline int cfs_cdebug_show(unsigned int mask, unsigned int subsystem)
 #  warning "CDEBUG IS DISABLED. THIS SHOULD NEVER BE DONE FOR PRODUCTION!"
 # endif /* CDEBUG_ENABLED */
 
 #  warning "CDEBUG IS DISABLED. THIS SHOULD NEVER BE DONE FOR PRODUCTION!"
 # endif /* CDEBUG_ENABLED */
 
-#else /* !__KERNEL__ */
-static inline int cfs_cdebug_show(unsigned int mask, unsigned int subsystem)
-{
-        return 0;
-}
-# define CDEBUG(mask, format, ...)                                     \
-do {                                                                    \
-        if (((mask) & D_CANTMASK) != 0)                                 \
-                fprintf(stderr, "(%s:%d:%s()) " format,                 \
-                        __FILE__, __LINE__, __FUNCTION__, ## __VA_ARGS__);\
-} while (0)
-
-# define CDEBUG_LIMIT CDEBUG
-
-#endif /* __KERNEL__ */
-
 /*
  * Lustre Error Checksum: calculates checksum
  * of Hex number by XORing each bit.
 /*
  * Lustre Error Checksum: calculates checksum
  * of Hex number by XORing each bit.
@@ -288,7 +166,7 @@ do {                                                                    \
 
 #define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__)
 
 
 #define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__)
 
-#if defined(CDEBUG_ENTRY_EXIT) && defined(__KERNEL__)
+#if defined(CDEBUG_ENTRY_EXIT)
 
 void libcfs_log_goto(struct libcfs_debug_msg_data *goto_data,
                     const char *label, long rc);
 
 void libcfs_log_goto(struct libcfs_debug_msg_data *goto_data,
                     const char *label, long rc);
@@ -341,7 +219,7 @@ do {                                                                        \
 # define ENTRY CDEBUG(D_TRACE, "Process entered\n")
 # define EXIT  CDEBUG(D_TRACE, "Process leaving\n")
 
 # define ENTRY CDEBUG(D_TRACE, "Process entered\n")
 # define EXIT  CDEBUG(D_TRACE, "Process leaving\n")
 
-#else /* !CDEBUG_ENTRY_EXIT || !__KERNEL__ */
+#else /* !CDEBUG_ENTRY_EXIT */
 
 # define GOTO(label, rc)                                               \
        do {                                                            \
 
 # define GOTO(label, rc)                                               \
        do {                                                            \
@@ -353,7 +231,7 @@ do {                                                                        \
 # define ENTRY do { } while (0)
 # define EXIT  do { } while (0)
 
 # define ENTRY do { } while (0)
 # define EXIT  do { } while (0)
 
-#endif /* CDEBUG_ENTRY_EXIT && __KERNEL__ */
+#endif /* CDEBUG_ENTRY_EXIT */
 
 #define RETURN_EXIT                                                    \
 do {                                                                   \
 
 #define RETURN_EXIT                                                    \
 do {                                                                   \
@@ -370,14 +248,12 @@ extern int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
                               va_list args, const char *format2, ...)
         __attribute__ ((format (printf, 4, 5)));
 
                               va_list args, const char *format2, ...)
         __attribute__ ((format (printf, 4, 5)));
 
-#ifdef __KERNEL__
 /* other external symbols that tracefile provides: */
 extern int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
                                   const char __user *usr_buffer,
                                   int usr_buffer_nob);
 extern int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
                                    const char *knl_buffer, char *append);
 /* other external symbols that tracefile provides: */
 extern int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
                                   const char __user *usr_buffer,
                                   int usr_buffer_nob);
 extern int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
                                    const char *knl_buffer, char *append);
-#endif /* __KERNEL__ */
 
 #define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
 
 
 #define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
 
index 4f2dd88..eddd4f1 100644 (file)
@@ -43,7 +43,7 @@
 /* Sparse annotation. */
 #define __user
 
 /* Sparse annotation. */
 #define __user
 
-#include <libcfs/libcfs_ioctl.h>
+#include <uapi/linux/lnet/libcfs_ioctl.h>
 
 #define LIBCFS_IOC_INIT(data)                                  \
 do {                                                           \
 
 #define LIBCFS_IOC_INIT(data)                                  \
 do {                                                           \
index 0cf8924..1615f0b 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/types.h>
 
 #include <libcfs/util/ioctl.h>
 #include <linux/types.h>
 
 #include <libcfs/util/ioctl.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 
 struct ioc_dev {
         const char * dev_name;
 
 struct ioc_dev {
         const char * dev_name;
index baed3a2..59ce306 100644 (file)
@@ -44,8 +44,8 @@
 #include <string.h>
 
 #include <libcfs/util/string.h>
 #include <string.h>
 
 #include <libcfs/util/string.h>
-#include <lnet/types.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/lnet-types.h>
+#include <linux/lnet/nidstr.h>
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
index 2ae3144..b4d0973 100644 (file)
@@ -851,6 +851,7 @@ lnet/autoconf/Makefile
 lnet/doc/Makefile
 lnet/include/Makefile
 lnet/include/lnet/Makefile
 lnet/doc/Makefile
 lnet/include/Makefile
 lnet/include/lnet/Makefile
+lnet/include/uapi/linux/lnet/Makefile
 lnet/klnds/Makefile
 lnet/klnds/autoMakefile
 lnet/klnds/o2iblnd/Makefile
 lnet/klnds/Makefile
 lnet/klnds/autoMakefile
 lnet/klnds/o2iblnd/Makefile
index bfba4b4..a77866e 100644 (file)
@@ -1 +1 @@
-SUBDIRS = lnet
+SUBDIRS = lnet uapi/linux/lnet
index 50530b5..923074e 100644 (file)
@@ -1,13 +1,5 @@
-lnetdir=$(includedir)/lnet
-
 EXTRA_DIST = \
        api.h \
 EXTRA_DIST = \
        api.h \
-       lib-dlc.h \
        lib-lnet.h \
        lib-types.h \
        lib-lnet.h \
        lib-types.h \
-       lnet.h \
-       lnetctl.h \
-       lnetst.h \
-       nidstr.h \
-       socklnd.h \
-       types.h
+       socklnd.h
index 84c6bd0..8980add 100644 (file)
@@ -47,7 +47,7 @@
 # error This include is only for kernel use.
 #endif
 
 # error This include is only for kernel use.
 #endif
 
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 
 /** \defgroup lnet_init_fini Initialization and cleanup
  * The LNet must be properly initialized before any LNet calls can be made.
 
 /** \defgroup lnet_init_fini Initialization and cleanup
  * The LNet must be properly initialized before any LNet calls can be made.
index f51bcee..4d7cc9e 100644 (file)
 
 #include <libcfs/libcfs.h>
 #include <lnet/api.h>
 
 #include <libcfs/libcfs.h>
 #include <lnet/api.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/lib-types.h>
+#include <uapi/linux/lnet/lnet-dlc.h>
+#include <uapi/linux/lnet/lnet-types.h>
+#include <uapi/linux/lnet/lnetctl.h>
+#include <uapi/linux/lnet/nidstr.h>
 
 extern struct lnet the_lnet;                   /* THE network */
 
 
 extern struct lnet the_lnet;                   /* THE network */
 
index 9b8af0e..d0095a6 100644 (file)
@@ -46,7 +46,8 @@
 #include <linux/uio.h>
 #include <linux/types.h>
 
 #include <linux/uio.h>
 #include <linux/types.h>
 
-#include <lnet/lnetctl.h>
+#include <uapi/linux/lnet/lnet-dlc.h>
+#include <uapi/linux/lnet/lnetctl.h>
 
 /* Max payload size */
 #ifndef CONFIG_LNET_MAX_PAYLOAD
 
 /* Max payload size */
 #ifndef CONFIG_LNET_MAX_PAYLOAD
index 843d35c..e2c19f2 100644 (file)
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/include/lnet/socklnd.h
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lnet/include/lnet/socklnd.h
- *
- * #defines shared between socknal implementation and utilities
  */
 #ifndef __LNET_LNET_SOCKLND_H__
 #define __LNET_LNET_SOCKLND_H__
 
  */
 #ifndef __LNET_LNET_SOCKLND_H__
 #define __LNET_LNET_SOCKLND_H__
 
-#include <lnet/types.h>
-
-#define SOCKLND_CONN_NONE     (-1)
-#define SOCKLND_CONN_ANY       0
-#define SOCKLND_CONN_CONTROL   1
-#define SOCKLND_CONN_BULK_IN   2
-#define SOCKLND_CONN_BULK_OUT  3
-#define SOCKLND_CONN_NTYPES    4
-
-#define SOCKLND_CONN_ACK       SOCKLND_CONN_BULK_IN
+#include <uapi/linux/lnet/lnet-types.h>
+#include <uapi/linux/lnet/socklnd.h>
 
 struct ksock_hello_msg {
        __u32                   kshm_magic;     /* magic number of socklnd message */
 
 struct ksock_hello_msg {
        __u32                   kshm_magic;     /* magic number of socklnd message */
diff --git a/lnet/include/uapi/linux/lnet/.gitignore b/lnet/include/uapi/linux/lnet/.gitignore
new file mode 100644 (file)
index 0000000..10a7e8d
--- /dev/null
@@ -0,0 +1 @@
+/Makefile.in
diff --git a/lnet/include/uapi/linux/lnet/Makefile.am b/lnet/include/uapi/linux/lnet/Makefile.am
new file mode 100644 (file)
index 0000000..bb70adf
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# GPL HEADER START
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 only,
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License version 2 for more details (a copy is included
+# in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU General Public License
+# version 2 along with this program; If not, see
+# http://www.gnu.org/licenses/gpl-2.0.html
+#
+# GPL HEADER END
+#
+
+#
+# Copyright (c) 2017, James Simmons <jsimmons@infradead.org>
+#
+
+#
+# This file is part of Lustre, http://www.lustre.org/
+# Lustre is a trademark of Seagate, Inc.
+#
+
+lnetincludedir = /usr/include/linux/lnet
+lnetinclude_HEADERS = \
+       libcfs_debug.h \
+       libcfs_ioctl.h \
+       lnetctl.h \
+       lnet-dlc.h \
+       lnetst.h \
+       lnet-types.h \
+       nidstr.h \
+       socklnd.h
+
+EXTRA_DIST = \
+       libcfs_debug.h \
+       libcfs_ioctl.h \
+       lnetctl.h \
+       lnet-dlc.h \
+       lnetst.h \
+       lnet-types.h \
+       nidstr.h \
+       socklnd.h
diff --git a/lnet/include/uapi/linux/lnet/libcfs_debug.h b/lnet/include/uapi/linux/lnet/libcfs_debug.h
new file mode 100644 (file)
index 0000000..c4d9472
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * GPL HEADER START
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.gnu.org/licenses/gpl-2.0.html
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, 2014, Intel Corporation.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * libcfs/include/libcfs/libcfs_debug.h
+ *
+ * Debug messages and assertions
+ *
+ */
+
+#ifndef __UAPI_LIBCFS_DEBUG_H__
+#define __UAPI_LIBCFS_DEBUG_H__
+
+/**
+ * Format for debug message headers
+ */
+struct ptldebug_header {
+       __u32 ph_len;
+       __u32 ph_flags;
+       __u32 ph_subsys;
+       __u32 ph_mask;
+       __u16 ph_cpu_id;
+       __u16 ph_type;
+       /* time_t overflow in 2106 */
+       __u32 ph_sec;
+       __u64 ph_usec;
+       __u32 ph_stack;
+       __u32 ph_pid;
+       __u32 ph_extern_pid;
+       __u32 ph_line_num;
+} __attribute__((packed));
+
+#define PH_FLAG_FIRST_RECORD   1
+
+/* Debugging subsystems (32 bits, non-overlapping) */
+#define S_UNDEFINED     0x00000001
+#define S_MDC           0x00000002
+#define S_MDS           0x00000004
+#define S_OSC           0x00000008
+#define S_OST           0x00000010
+#define S_CLASS         0x00000020
+#define S_LOG           0x00000040
+#define S_LLITE         0x00000080
+#define S_RPC           0x00000100
+#define S_MGMT          0x00000200
+#define S_LNET          0x00000400
+#define S_LND           0x00000800 /* ALL LNDs */
+#define S_PINGER        0x00001000
+#define S_FILTER        0x00002000
+#define S_LIBCFS        0x00004000
+#define S_ECHO          0x00008000
+#define S_LDLM          0x00010000
+#define S_LOV           0x00020000
+#define S_LQUOTA        0x00040000
+#define S_OSD           0x00080000
+#define S_LFSCK         0x00100000
+#define S_SNAPSHOT      0x00200000
+/* unused */
+#define S_LMV           0x00800000 /* b_new_cmd */
+/* unused */
+#define S_SEC           0x02000000 /* upcall cache */
+#define S_GSS           0x04000000 /* b_new_cmd */
+/* unused */
+#define S_MGC           0x10000000
+#define S_MGS           0x20000000
+#define S_FID           0x40000000 /* b_new_cmd */
+#define S_FLD           0x80000000 /* b_new_cmd */
+
+#define LIBCFS_DEBUG_SUBSYS_NAMES {                                    \
+       "undefined", "mdc", "mds", "osc", "ost", "class", "log",        \
+       "llite", "rpc", "mgmt", "lnet", "lnd", "pinger", "filter",      \
+       "libcfs", "echo", "ldlm", "lov", "lquota", "osd", "lfsck",      \
+       "snapshot", "", "lmv", "", "sec", "gss", "", "mgc", "mgs",      \
+       "fid", "fld", NULL }
+
+/* Debugging masks (32 bits, non-overlapping) */
+#define D_TRACE         0x00000001 /* ENTRY/EXIT markers */
+#define D_INODE         0x00000002
+#define D_SUPER         0x00000004
+#define D_EXT2          0x00000008 /* anything from ext2_debug */
+#define D_MALLOC        0x00000010 /* print malloc, free information */
+#define D_CACHE         0x00000020 /* cache-related items */
+#define D_INFO          0x00000040 /* general information */
+#define D_IOCTL         0x00000080 /* ioctl related information */
+#define D_NETERROR      0x00000100 /* network errors */
+#define D_NET           0x00000200 /* network communications */
+#define D_WARNING       0x00000400 /* CWARN(...) == CDEBUG (D_WARNING, ...) */
+#define D_BUFFS         0x00000800
+#define D_OTHER         0x00001000
+#define D_DENTRY        0x00002000
+#define D_NETTRACE      0x00004000
+#define D_PAGE          0x00008000 /* bulk page handling */
+#define D_DLMTRACE      0x00010000
+#define D_ERROR         0x00020000 /* CERROR(...) == CDEBUG (D_ERROR, ...) */
+#define D_EMERG         0x00040000 /* CEMERG(...) == CDEBUG (D_EMERG, ...) */
+#define D_HA            0x00080000 /* recovery and failover */
+#define D_RPCTRACE      0x00100000 /* for distributed debugging */
+#define D_VFSTRACE      0x00200000
+#define D_READA         0x00400000 /* read-ahead */
+#define D_MMAP          0x00800000
+#define D_CONFIG        0x01000000
+#define D_CONSOLE       0x02000000
+#define D_QUOTA         0x04000000
+#define D_SEC           0x08000000
+#define D_LFSCK         0x10000000 /* For both OI scrub and LFSCK */
+#define D_HSM           0x20000000
+#define D_SNAPSHOT      0x40000000 /* snapshot */
+#define D_LAYOUT        0x80000000
+
+#define LIBCFS_DEBUG_MASKS_NAMES {                                     \
+       "trace", "inode", "super", "ext2", "malloc", "cache", "info",   \
+       "ioctl", "neterror", "net", "warning", "buffs", "other",        \
+       "dentry", "nettrace", "page", "dlmtrace", "error", "emerg",     \
+       "ha", "rpctrace", "vfstrace", "reada", "mmap", "config",        \
+       "console", "quota", "sec", "lfsck", "hsm", "snapshot", "layout",\
+       NULL }
+
+#define D_CANTMASK   (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE)
+
+#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
+
+#endif /* __UAPI_LIBCFS_DEBUG_H__ */
similarity index 97%
rename from libcfs/include/libcfs/libcfs_ioctl.h
rename to lnet/include/uapi/linux/lnet/libcfs_ioctl.h
index 6b79096..da490f1 100644 (file)
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
- * libcfs/include/libcfs/libcfs_ioctl.h
- *
  * Low-level ioctl data structures. Kernel ioctl functions declared here,
  * and user space functions are in libcfs/util/ioctl.h.
  *
  */
 
  * Low-level ioctl data structures. Kernel ioctl functions declared here,
  * and user space functions are in libcfs/util/ioctl.h.
  *
  */
 
-#ifndef __LIBCFS_IOCTL_H__
-#define __LIBCFS_IOCTL_H__
+#ifndef __UAPI_LIBCFS_IOCTL_H__
+#define __UAPI_LIBCFS_IOCTL_H__
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
@@ -77,8 +75,7 @@ struct libcfs_ioctl_data {
        char ioc_bulk[0];
 };
 
        char ioc_bulk[0];
 };
 
-struct libcfs_debug_ioctl_data
-{
+struct libcfs_debug_ioctl_data {
        struct libcfs_ioctl_hdr hdr;
        unsigned int subs;
        unsigned int debug;
        struct libcfs_ioctl_hdr hdr;
        unsigned int subs;
        unsigned int debug;
@@ -152,4 +149,4 @@ struct libcfs_debug_ioctl_data
 
 extern int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 
 
 extern int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 
-#endif /* __LIBCFS_IOCTL_H__ */
+#endif /* __UAPI_LIBCFS_IOCTL_H__ */
similarity index 94%
rename from lnet/include/lnet/lib-dlc.h
rename to lnet/include/uapi/linux/lnet/lnet-dlc.h
index 4141f7c..081f0ea 100644 (file)
  * Author: Amir Shehata <amir.shehata@intel.com>
  */
 
  * Author: Amir Shehata <amir.shehata@intel.com>
  */
 
-#ifndef LNET_DLC_H
-#define LNET_DLC_H
+#ifndef __UAPI_LNET_DLC_H_
+#define __UAPI_LNET_DLC_H_
 
 
-#include <libcfs/libcfs_ioctl.h>
-#include <lnet/types.h>
+/*
+ * This is due to us being out of kernel and the way the OpenSFS branch
+ * handles CFLAGS.
+ */
+#ifdef __KERNEL__
+# include <uapi/linux/lnet/libcfs_ioctl.h>
+# include <uapi/linux/lnet/lnet-types.h>
+#else
+# include <linux/lnet/libcfs_ioctl.h>
+# include <linux/lnet/lnet-types.h>
+#endif
 
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN       128
 
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN       128
@@ -240,4 +249,4 @@ struct lnet_ioctl_lnet_stats {
        struct lnet_counters st_cntrs;
 };
 
        struct lnet_counters st_cntrs;
 };
 
-#endif /* LNET_DLC_H */
+#endif /* _LNET_DLC_H_ */
similarity index 99%
rename from lnet/include/lnet/types.h
rename to lnet/include/uapi/linux/lnet/lnet-types.h
index e4bfe3d..b10e3a8 100644 (file)
@@ -30,8 +30,8 @@
  * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
  * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
-#ifndef __LNET_TYPES_H__
-#define __LNET_TYPES_H__
+#ifndef __UAPI_LNET_TYPES_H__
+#define __UAPI_LNET_TYPES_H__
 
 /** \addtogroup lnet
  * @{ */
 
 /** \addtogroup lnet
  * @{ */
similarity index 92%
rename from lnet/include/lnet/lnetctl.h
rename to lnet/include/uapi/linux/lnet/lnetctl.h
index 3d7fd27..c39ca43 100644 (file)
 /*
  * Copyright (c) 2014, Intel Corporation.
  */
 /*
  * Copyright (c) 2014, Intel Corporation.
  */
-#ifndef _LNETCTL_H_
-#define _LNETCTL_H_
+#ifndef __UAPI_LNETCTL_H_
+#define __UAPI_LNETCTL_H_
 
 
-#include <lnet/types.h>
+/*
+ * This is due to us being out of kernel and the way the OpenSFS branch
+ * handles CFLAGS.
+ */
+#ifdef __KERNEL__
+# include <uapi/linux/lnet/lnet-types.h>
+#else
+# include <linux/lnet/lnet-types.h>
+#endif
 
 /** \addtogroup lnet_fault_simulation
  * @{ */
 
 /** \addtogroup lnet_fault_simulation
  * @{ */
similarity index 99%
rename from lnet/include/lnet/lnetst.h
rename to lnet/include/uapi/linux/lnet/lnetst.h
index a43978f..7bdf186 100644 (file)
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
- * lnet/include/lnet/lnetst.h
- *
  * Author: Liang Zhen <liangzhen@clusterfs.com>
  */
 
  * Author: Liang Zhen <liangzhen@clusterfs.com>
  */
 
-#ifndef __LNET_ST_H__
-#define __LNET_ST_H__
+#ifndef __UAPI_LNET_ST_H__
+#define __UAPI_LNET_ST_H__
 
 #define LST_FEAT_NONE          (0)
 #define LST_FEAT_BULK_LEN      (1 << 0)        /* enable variable page size */
 
 #define LST_FEAT_NONE          (0)
 #define LST_FEAT_BULK_LEN      (1 << 0)        /* enable variable page size */
similarity index 95%
rename from lnet/include/lnet/nidstr.h
rename to lnet/include/uapi/linux/lnet/nidstr.h
index b90e320..0d09d4c 100644 (file)
  */
 #ifndef _LNET_NIDSTRINGS_H
 #define _LNET_NIDSTRINGS_H
  */
 #ifndef _LNET_NIDSTRINGS_H
 #define _LNET_NIDSTRINGS_H
-#include <lnet/types.h>
+
+/*
+ * This is due to us being out of kernel and the way the OpenSFS branch
+ * handles CFLAGS.
+ */
+#ifdef __KERNEL__
+# include <uapi/linux/lnet/lnet-types.h>
+#else
+# include <linux/lnet/lnet-types.h>
+#endif
 
 /**
  *  Lustre Network Driver types.
 
 /**
  *  Lustre Network Driver types.
similarity index 74%
rename from lnet/include/lnet/lnet.h
rename to lnet/include/uapi/linux/lnet/socklnd.h
index 54061f5..6453e05 100644 (file)
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
- *
- * Copyright (c) 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
- */
-
-#ifndef __LNET_H__
-#define __LNET_H__
-
-/*
- * lnet.h
  *
  *
- * User application interface file
+ * #defines shared between socknal implementation and utilities
  */
  */
+#ifndef __UAPI_LNET_SOCKLND_H__
+#define __UAPI_LNET_SOCKLND_H__
+
+#define SOCKLND_CONN_NONE     (-1)
+#define SOCKLND_CONN_ANY       0
+#define SOCKLND_CONN_CONTROL   1
+#define SOCKLND_CONN_BULK_IN   2
+#define SOCKLND_CONN_BULK_OUT  3
+#define SOCKLND_CONN_NTYPES    4
 
 
-#include <lnet/types.h>
-#include <lnet/lib-dlc.h>
-#include <lnet/nidstr.h>
+#define SOCKLND_CONN_ACK       SOCKLND_CONN_BULK_IN
 
 #endif
 
 #endif
index c4a4742..247b62b 100644 (file)
@@ -80,7 +80,6 @@
 #define DEBUG_SUBSYSTEM S_LND
 
 #include <libcfs/libcfs.h>
 #define DEBUG_SUBSYSTEM S_LND
 
 #include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
 
 #define IBLND_PEER_HASH_SIZE           101     /* # peer_ni lists */
 #include <lnet/lib-lnet.h>
 
 #define IBLND_PEER_HASH_SIZE           101     /* # peer_ni lists */
index 761c5c5..ff71b3a 100644 (file)
@@ -51,7 +51,6 @@
 #include <net/tcp.h>
 
 #include <libcfs/libcfs.h>
 #include <net/tcp.h>
 
 #include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
 #include <lnet/socklnd.h>
 
 #include <lnet/lib-lnet.h>
 #include <lnet/socklnd.h>
 
index a7190dd..297176f 100644 (file)
@@ -31,8 +31,9 @@
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
  */
 
 #define DEBUG_SUBSYSTEM S_LNET
+
 #include <lnet/lib-lnet.h>
 #include <lnet/lib-lnet.h>
-#include <lnet/lib-dlc.h>
+#include <uapi/linux/lnet/lnet-dlc.h>
 
 static int config_on_load = 0;
 module_param(config_on_load, int, 0444);
 
 static int config_on_load = 0;
 module_param(config_on_load, int, 0444);
index c43f8fe..0fe3947 100644 (file)
@@ -37,7 +37,7 @@
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <lnet/lib-lnet.h>
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <lnet/lib-lnet.h>
-#include <lnet/lnetctl.h>
+#include <uapi/linux/lnet/lnetctl.h>
 
 #define LNET_MSG_MASK          (LNET_PUT_BIT | LNET_ACK_BIT | \
                                 LNET_GET_BIT | LNET_REPLY_BIT)
 
 #define LNET_MSG_MASK          (LNET_PUT_BIT | LNET_ACK_BIT | \
                                 LNET_GET_BIT | LNET_REPLY_BIT)
index ee3def8..7b902a6 100644 (file)
@@ -37,7 +37,7 @@
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <libcfs/libcfs.h>
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <libcfs/libcfs.h>
-#include <lnet/nidstr.h>
+#include <uapi/linux/lnet/nidstr.h>
 
 /* max value for numeric network address */
 #define MAX_NUMERIC_VALUE 0xffffffff
 
 /* max value for numeric network address */
 #define MAX_NUMERIC_VALUE 0xffffffff
index 612af87..c6c3d07 100644 (file)
@@ -35,7 +35,7 @@
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <lnet/lib-lnet.h>
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <lnet/lib-lnet.h>
-#include <lnet/lib-dlc.h>
+#include <uapi/linux/lnet/lnet-dlc.h>
 
 static void
 lnet_peer_remove_from_remote_list(struct lnet_peer_ni *lpni)
 
 static void
 lnet_peer_remove_from_remote_list(struct lnet_peer_ni *lpni)
index e5bba26..fafadc9 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
 
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 #include "console.h"
 
 static int
 #include "console.h"
 
 static int
index 364c33f..b341f8e 100644 (file)
@@ -40,9 +40,8 @@
 #define __LST_CONRPC_H__
 
 #include <libcfs/libcfs.h>
 #define __LST_CONRPC_H__
 
 #include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/lib-types.h>
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 #include "rpc.h"
 #include "selftest.h"
 
 #include "rpc.h"
 #include "selftest.h"
 
index 08f199c..641f9be 100644 (file)
@@ -41,9 +41,8 @@
 
 
 #include <libcfs/libcfs.h>
 
 
 #include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/lib-types.h>
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 #include "selftest.h"
 #include "conrpc.h"
 
 #include "selftest.h"
 #include "conrpc.h"
 
index de30dc8..c3a543a 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef __SELFTEST_RPC_H__
 #define __SELFTEST_RPC_H__
 
 #ifndef __SELFTEST_RPC_H__
 #define __SELFTEST_RPC_H__
 
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 
 /*
  * LST wired structures
 
 /*
  * LST wired structures
index c6514b5..51e18c0 100644 (file)
@@ -42,7 +42,7 @@
 #include <lnet/api.h>
 #include <lnet/lib-lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/api.h>
 #include <lnet/lib-lnet.h>
 #include <lnet/lib-types.h>
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 
 #include "rpc.h"
 #include "timer.h"
 
 #include "rpc.h"
 #include "timer.h"
index 815f46d..8a9f0c2 100644 (file)
@@ -56,8 +56,8 @@
 
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/param.h>
 
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/param.h>
-#include <libcfs/libcfs_debug.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/libcfs_debug.h>
+#include <linux/lnet/lnetctl.h>
 
 static char rawbuf[8192];
 static char *buf = rawbuf;
 
 static char rawbuf[8192];
 static char *buf = rawbuf;
index 45f7893..1896d48 100644 (file)
@@ -26,7 +26,8 @@
 #ifndef LIB_LND_CONFIG_API_H
 #define LIB_LND_CONFIG_API_H
 
 #ifndef LIB_LND_CONFIG_API_H
 #define LIB_LND_CONFIG_API_H
 
-#include <lnet/lib-dlc.h>
+#include <linux/lnet/socklnd.h>
+#include <linux/lnet/lnet-dlc.h>
 #include "cyaml.h"
 
 int
 #include "cyaml.h"
 
 int
index 2630d7e..fc06e96 100644 (file)
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <libcfs/util/ioctl.h>
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <libcfs/util/ioctl.h>
-#include <lnet/lnetctl.h>
-#include <lnet/socklnd.h>
+#include <linux/lnet/lnetctl.h>
 #include "liblnd.h"
 #include "liblnd.h"
-#include <lnet/lnet.h>
 #include <sys/types.h>
 #include <ifaddrs.h>
 #include "liblnetconfig.h"
 #include <sys/types.h>
 #include <ifaddrs.h>
 #include "liblnetconfig.h"
index 5b9e36b..b843b3e 100644 (file)
@@ -27,7 +27,9 @@
 #ifndef LIB_LNET_CONFIG_API_H
 #define LIB_LNET_CONFIG_API_H
 
 #ifndef LIB_LNET_CONFIG_API_H
 #define LIB_LNET_CONFIG_API_H
 
-#include <lnet/lnet.h>
+#include <libcfs/util/string.h>
+#include <linux/lnet/lnet-dlc.h>
+#include <linux/lnet/nidstr.h>
 
 #define LUSTRE_CFG_RC_NO_ERR                    0
 #define LUSTRE_CFG_RC_BAD_PARAM                        -1
 
 #define LUSTRE_CFG_RC_NO_ERR                    0
 #define LUSTRE_CFG_RC_BAD_PARAM                        -1
@@ -38,9 +40,6 @@
 #define LUSTRE_CFG_RC_NO_MATCH                 -6
 #define LUSTRE_CFG_RC_MATCH                    -7
 
 #define LUSTRE_CFG_RC_NO_MATCH                 -6
 #define LUSTRE_CFG_RC_MATCH                    -7
 
-#include <lnet/lnet.h>
-#include <libcfs/util/string.h>
-
 struct lnet_dlc_network_descr {
        struct list_head network_on_rule;
        __u32 nw_id;
 struct lnet_dlc_network_descr {
        struct list_head network_on_rule;
        __u32 nw_id;
index 70c986a..c2022f1 100644 (file)
@@ -30,8 +30,6 @@
 #include <limits.h>
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/parser.h>
 #include <limits.h>
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/parser.h>
-#include <lnet/lnetctl.h>
-#include <lnet/nidstr.h>
 #include <cyaml.h>
 #include "lnetconfig/liblnetconfig.h"
 
 #include <cyaml.h>
 #include "lnetconfig/liblnetconfig.h"
 
index 78359fe..ff8db84 100644 (file)
@@ -48,9 +48,9 @@
 #include <libcfs/util/list.h>
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/parser.h>
 #include <libcfs/util/list.h>
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/parser.h>
-#include <lnet/lnetctl.h>
-#include <lnet/lnetst.h>
-#include <lnet/lnet.h>
+#include <linux/lnet/lnetctl.h>
+#include <linux/lnet/lnetst.h>
+#include <linux/lnet/nidstr.h>
 #include <utils/obdctl.h>
 
 struct lst_sid LST_INVALID_SID = { .ses_nid = LNET_NID_ANY, .ses_stamp = -1 };
 #include <utils/obdctl.h>
 
 struct lst_sid LST_INVALID_SID = { .ses_nid = LNET_NID_ANY, .ses_stamp = -1 };
index 81aedd5..12aec42 100644 (file)
 
 #include <libcfs/util/string.h>
 #include <libcfs/util/ioctl.h>
 
 #include <libcfs/util/string.h>
 #include <libcfs/util/ioctl.h>
-#include <libcfs/libcfs_debug.h>
-#include <lnet/lnetctl.h>
-#include <lnet/socklnd.h>
-#include <lnet/lnet.h>
+#include <linux/lnet/libcfs_debug.h>
+#include <linux/lnet/lnet-dlc.h>
+#include <linux/lnet/lnetctl.h>
+#include <linux/lnet/nidstr.h>
+#include <linux/lnet/socklnd.h>
 
 unsigned int libcfs_debug;
 unsigned int libcfs_printk = D_CANTMASK;
 
 unsigned int libcfs_debug;
 unsigned int libcfs_printk = D_CANTMASK;
index ad8c6b1..a607ded 100644 (file)
@@ -41,7 +41,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <lnet/types.h>
+#include <linux/lnet/lnet-types.h>
 
 #ifndef HAVE_STRNLEN
 #define strnlen(s, i) strlen(s)
 
 #ifndef HAVE_STRNLEN
 #define strnlen(s, i) strlen(s)
index f30a462..f0d828e 100644 (file)
@@ -455,6 +455,7 @@ echo '%{_sbindir}/wiretest' >>lustre-tests.files
 %endif
 %{_datadir}/lustre
 %{_includedir}/lustre
 %endif
 %{_datadir}/lustre
 %{_includedir}/lustre
+%{_includedir}/linux/lnet
 %endif
 %{_sysconfdir}/udev/rules.d/99-lustre.rules
 %config(noreplace) %{_sysconfdir}/ldev.conf
 %endif
 %{_sysconfdir}/udev/rules.d/99-lustre.rules
 %config(noreplace) %{_sysconfdir}/ldev.conf
index c8bcb7b..9d02e4b 100644 (file)
@@ -72,7 +72,7 @@
 #include <asm/byteorder.h>
 #include <linux/types.h>
 
 #include <asm/byteorder.h>
 #include <linux/types.h>
 
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 #include <lustre/lustre_user.h> /* Defn's shared with user-space. */
 #include <lustre_ver.h>
 
 #include <lustre/lustre_user.h> /* Defn's shared with user-space. */
 #include <lustre_ver.h>
 
index db61399..b4fd0be 100644 (file)
@@ -53,8 +53,8 @@
 #include <linux/kobject.h>
 #include <linux/uio.h>
 #include <libcfs/libcfs.h>
 #include <linux/kobject.h>
 #include <linux/uio.h>
 #include <libcfs/libcfs.h>
-#include <lnet/nidstr.h>
 #include <lnet/api.h>
 #include <lnet/api.h>
+#include <uapi/linux/lnet/nidstr.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_ha.h>
 #include <lustre_sec.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_ha.h>
 #include <lustre_sec.h>
index accc449..88aed30 100644 (file)
@@ -34,7 +34,7 @@
 #define _UPCALL_CACHE_H
 
 #include <libcfs/libcfs.h>
 #define _UPCALL_CACHE_H
 
 #include <libcfs/libcfs.h>
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 
 /** \defgroup ucache ucache
  *
 
 /** \defgroup ucache ucache
  *
index 7dd0c65..ee97237 100644 (file)
@@ -38,8 +38,6 @@
  */
 #ifdef __KERNEL__
 # include <lustre_dlm.h>
  */
 #ifdef __KERNEL__
 # include <lustre_dlm.h>
-#else
-# include <libcfs/libcfs.h>
 #endif
 #include <interval_tree.h>
 
 #endif
 #include <interval_tree.h>
 
index 07f3671..998d581 100644 (file)
@@ -49,7 +49,7 @@
 # include <linux/uidgid.h>
 #endif
 #include "mdt_internal.h"
 # include <linux/uidgid.h>
 #endif
 #include "mdt_internal.h"
-#include <lnet/nidstr.h>
+#include <uapi/linux/lnet/nidstr.h>
 #include <lustre_nodemap.h>
 
 typedef enum ucred_init_type {
 #include <lustre_nodemap.h>
 
 typedef enum ucred_init_type {
index f10e910..7814842 100644 (file)
@@ -41,7 +41,7 @@
 #include <asm/statfs.h>
 
 #include <linux/module.h>
 #include <asm/statfs.h>
 
 #include <linux/module.h>
-#include <lnet/nidstr.h>
+#include <uapi/linux/lnet/nidstr.h>
 /* LUSTRE_VERSION_CODE */
 #include <lustre_ver.h>
 /*
 /* LUSTRE_VERSION_CODE */
 #include <lustre_ver.h>
 /*
index d65a85d..7b18eb8 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <obd_support.h>
 #include <obd_class.h>
 
 #include <obd_support.h>
 #include <obd_class.h>
-#include <lnet/lnetctl.h>
+#include <uapi/linux/lnet/lnetctl.h>
 #include <lustre_debug.h>
 #include <lustre_kernelcomm.h>
 #include <lprocfs_status.h>
 #include <lustre_debug.h>
 #include <lustre_kernelcomm.h>
 #include <lprocfs_status.h>
index 6cee4d7..aedcb0c 100644 (file)
@@ -66,8 +66,8 @@
 #include <libcfs/libcfs.h>
 #include <obd_support.h>
 #include <obd_class.h>
 #include <libcfs/libcfs.h>
 #include <obd_support.h>
 #include <obd_class.h>
-#include <lnet/lnetctl.h>
 #include <lprocfs_status.h>
 #include <lprocfs_status.h>
+#include <uapi/linux/lnet/lnetctl.h>
 #include <uapi/linux/lustre_ioctl.h>
 #include <lustre_ver.h>
 
 #include <uapi/linux/lustre_ioctl.h>
 #include <lustre_ver.h>
 
index 58236ec..d56cf5b 100644 (file)
@@ -36,7 +36,7 @@
 #define DEBUG_SUBSYSTEM S_SEC
 
 #include <libcfs/libcfs.h>
 #define DEBUG_SUBSYSTEM S_SEC
 
 #include <libcfs/libcfs.h>
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 #include <upcall_cache.h>
 
 static struct upcall_cache_entry *alloc_entry(struct upcall_cache *cache,
 #include <upcall_cache.h>
 
 static struct upcall_cache_entry *alloc_entry(struct upcall_cache *cache,
index 1ea5c7c..782c992 100644 (file)
@@ -28,7 +28,7 @@
  */
 #include <linux/module.h>
 #include <linux/sort.h>
  */
 #include <linux/module.h>
 #include <linux/sort.h>
-#include <lnet/nidstr.h>
+#include <uapi/linux/lnet/nidstr.h>
 #include <lustre_net.h>
 #include <lustre_acl.h>
 #include <lustre_eacl.h>
 #include <lustre_net.h>
 #include <lustre_acl.h>
 #include <lustre_eacl.h>
index 04e3f13..7894459 100644 (file)
@@ -50,7 +50,7 @@
 #include <linux/mutex.h>
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/mutex.h>
 #include <linux/string.h>
 #include <linux/types.h>
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 #include <lustre/lustre_idl.h>
 #include <dt_object.h>
 #include <lu_object.h>
 #include <lustre/lustre_idl.h>
 #include <dt_object.h>
 #include <lu_object.h>
index ecde6ab..46c3e98 100644 (file)
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
+
 #include <linux/kthread.h>
 #include <obd_support.h>
 #include <obd_class.h>
 #include <lustre_net.h>
 #include <lu_object.h>
 #include <linux/kthread.h>
 #include <obd_support.h>
 #include <obd_class.h>
 #include <lustre_net.h>
 #include <lu_object.h>
-#include <lnet/types.h>
+#include <uapi/linux/lnet/lnet-types.h>
 #include "ptlrpc_internal.h"
 
 /* The following are visible and mutable through /sys/module/ptlrpc */
 #include "ptlrpc_internal.h"
 
 /* The following are visible and mutable through /sys/module/ptlrpc */
index 0a4f099..98d3042 100644 (file)
@@ -53,6 +53,9 @@
  */
 #define EXPORT_SYMBOL(s)
 #define LASSERT assert
  */
 #define EXPORT_SYMBOL(s)
 #define LASSERT assert
+#define RETURN return
+#define ENTRY
+#define EXIT
 
 #include <../ldlm/interval_tree.c>
 
 
 #include <../ldlm/interval_tree.c>
 
index 1b2e17c..9fcf8a5 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdio.h>
 /* For basename() */
 #include <libgen.h>
 #include <stdio.h>
 /* For basename() */
 #include <libgen.h>
-#include <lnet/nidstr.h>
 #include "lsupport.h"
 
 int main(int argc, char **argv)
 #include "lsupport.h"
 
 int main(int argc, char **argv)
index a4288bb..e0430a3 100644 (file)
@@ -40,7 +40,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <lnet/nidstr.h>
 #include <lustre/lustre_idl.h>
 
 #include "sk_utils.h"
 #include <lustre/lustre_idl.h>
 
 #include "sk_utils.h"
index f27ba4a..3f22881 100644 (file)
@@ -59,7 +59,6 @@
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
 #ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
-#include <lnet/nidstr.h>
 #ifdef _NEW_BUILD_
 # include "lgss_utils.h"
 #else
 #ifdef _NEW_BUILD_
 # include "lgss_utils.h"
 #else
index b1897e7..30aea86 100644 (file)
 
 #include <assert.h>
 #include <unistd.h>
 
 #include <assert.h>
 #include <unistd.h>
+#include <stdbool.h>
 #include <stdint.h>
 
 #include <stdint.h>
 
-#include <lnet/types.h>
+#include <libcfs/util/list.h>
+#include <linux/lnet/lnet-types.h>
+#include <linux/lnet/nidstr.h>
 
 #define GSSD_CLI        (0)
 #define GSSD_SVC        (1)
 
 #define GSSD_CLI        (0)
 #define GSSD_SVC        (1)
index c25a8eb..b76e81a 100644 (file)
@@ -39,7 +39,6 @@
 #include <openssl/hmac.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <openssl/hmac.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <lnet/nidstr.h>
 
 #include "sk_utils.h"
 #include "write_bytes.h"
 
 #include "sk_utils.h"
 #include "write_bytes.h"
index b43978a..367c9d1 100644 (file)
@@ -48,7 +48,6 @@
 #endif
 
 #include <stdbool.h>
 #endif
 
 #include <stdbool.h>
-#include <lnet/nidstr.h>
 
 #include "svcgssd.h"
 #include "gss_util.h"
 
 #include "svcgssd.h"
 #include "gss_util.h"
index 6aca6dc..1646079 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <libcfs/util/param.h>
 #include <libcfs/util/string.h>
 
 #include <libcfs/util/param.h>
 #include <libcfs/util/string.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
 #include <lustre/lustre_user.h>
 #include <lustre/lustre_idl.h>
 
 #include <lustre/lustre_user.h>
 #include <lustre/lustre_idl.h>
 
index 788fc53..282ce02 100644 (file)
@@ -42,7 +42,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <libcfs/util/parser.h>
 #include <stdio.h>
 #include <string.h>
 #include <libcfs/util/parser.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 #include "obdctl.h"
 #include <lustre_ver.h>
 
 #include "obdctl.h"
 #include <lustre_ver.h>
 
index 2df30c6..b68662d 100644 (file)
@@ -72,7 +72,7 @@
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/param.h>
 #include <libcfs/util/string.h>
 #include <libcfs/util/ioctl.h>
 #include <libcfs/util/param.h>
 #include <libcfs/util/string.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 #include <lustre/lustreapi.h>
 #include <linux/lustre_ostid.h>
 #include <linux/lustre_ioctl.h>
 #include <lustre/lustreapi.h>
 #include <linux/lustre_ostid.h>
 #include <linux/lustre_ioctl.h>
index 8fe05b4..ad9f229 100644 (file)
@@ -57,7 +57,7 @@
 #include <unistd.h>
 #endif
 
 #include <unistd.h>
 #endif
 
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 #include <lustre/lustre_idl.h>
 #include <lustre/lustreapi.h>
 #include "lustreapi_internal.h"
 #include <lustre/lustre_idl.h>
 #include <lustre/lustreapi.h>
 #include "lustreapi_internal.h"
index d6b9ca6..c6751fc 100644 (file)
@@ -68,7 +68,7 @@
 #endif
 #include <linux/types.h>
 #include <linux/version.h>
 #endif
 #include <linux/types.h>
 #include <linux/version.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 #include <lustre_ver.h>
 
 #ifdef HAVE_SELINUX
 #include <lustre_ver.h>
 
 #ifdef HAVE_SELINUX
index 769a40a..49f1f2a 100644 (file)
@@ -53,7 +53,7 @@
 #include <linux/magic.h>
 #include <errno.h>
 #include <time.h>
 #include <linux/magic.h>
 #include <errno.h>
 #include <time.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
 #include <linux/lustre_fid.h>
 #include <linux/lustre_ostid.h>
 #include <lustre/lustreapi.h>
 #include <linux/lustre_fid.h>
 #include <linux/lustre_ostid.h>
 #include <lustre/lustreapi.h>
index ebe038b..45c3d5a 100644 (file)
@@ -54,7 +54,8 @@
 #include <libcfs/util/string.h>
 #include <libcfs/util/param.h>
 #include <libcfs/util/parser.h>
 #include <libcfs/util/string.h>
 #include <libcfs/util/param.h>
 #include <libcfs/util/parser.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
+#include <linux/lnet/lnetctl.h>
 #include <linux/lustre_cfg.h>
 #include <linux/lustre_ioctl.h>
 #include <lustre_ver.h>
 #include <linux/lustre_cfg.h>
 #include <linux/lustre_ioctl.h>
 #include <lustre_ver.h>
@@ -66,7 +67,6 @@
 #include <string.h>
 
 #include "obdctl.h"
 #include <string.h>
 
 #include "obdctl.h"
-#include <lnet/lnetctl.h>
 #include <stdio.h>
 
 static char * lcfg_devname;
 #include <stdio.h>
 
 static char * lcfg_devname;
index fc533da..45f492d 100644 (file)
@@ -43,7 +43,7 @@
 #include "lustreapi_internal.h"
 
 #include <lustre/lustre_lfsck_user.h>
 #include "lustreapi_internal.h"
 
 #include <lustre/lustre_lfsck_user.h>
-#include <lnet/lnetctl.h>
+#include <linux/lnet/lnetctl.h>
 #include <linux/lustre_ioctl.h>
 /* Needs to be last to avoid clashes */
 #include <libcfs/util/ioctl.h>
 #include <linux/lustre_ioctl.h>
 /* Needs to be last to avoid clashes */
 #include <libcfs/util/ioctl.h>
index 361d2ad..c949ae8 100644 (file)
 #include <sys/xattr.h>
 #include <linux/types.h>
 
 #include <sys/xattr.h>
 #include <linux/types.h>
 
-#include <libcfs/libcfs_debug.h>
 #include <libcfs/util/string.h>
 #include <libcfs/util/parser.h>
 #include <libcfs/util/string.h>
 #include <libcfs/util/parser.h>
+#include <linux/lnet/libcfs_debug.h>
 #include <lustre/lustreapi.h>
 #include "lustre_rsync.h"
 
 #include <lustre/lustreapi.h>
 #include "lustre_rsync.h"
 
index 2a279fc..c95e5be 100644 (file)
@@ -60,9 +60,9 @@
 #include <getopt.h>
 #include <limits.h>
 #include <ctype.h>
 #include <getopt.h>
 #include <limits.h>
 #include <ctype.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
+#include <linux/lnet/lnetctl.h>
 #include <linux/lustre_param.h>
 #include <linux/lustre_param.h>
-#include <lnet/lnetctl.h>
 #include <lustre_ver.h>
 
 #include "mount_utils.h"
 #include <lustre_ver.h>
 
 #include "mount_utils.h"
index 14ea849..9cd75f2 100644 (file)
@@ -52,7 +52,7 @@
 #include <lustre_ver.h>
 #include <ctype.h>
 #include <limits.h>
 #include <lustre_ver.h>
 #include <ctype.h>
 #include <limits.h>
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
 #include <libcfs/util/string.h>
 
 #include "obdctl.h"
 #include <libcfs/util/string.h>
 
 #include "obdctl.h"
index 795d73f..cb523a7 100644 (file)
 #include <libcfs/util/parser.h>
 #include <libcfs/util/string.h>
 
 #include <libcfs/util/parser.h>
 #include <libcfs/util/string.h>
 
-#include <lnet/nidstr.h>
+#include <linux/lnet/nidstr.h>
+#include <linux/lnet/lnetctl.h>
 #include <linux/lustre_ostid.h>
 #include <linux/lustre_cfg.h>
 #include <linux/lustre_ioctl.h>
 #include <lustre_ver.h>
 
 #include <linux/lustre_ostid.h>
 #include <linux/lustre_cfg.h>
 #include <linux/lustre_ioctl.h>
 #include <lustre_ver.h>
 
-#include <lnet/lnetctl.h>
 #include <lustre/lustreapi.h>
 #include <linux/lustre_param.h>
 #include <lustre/lustre_barrier_user.h>
 #include <lustre/lustreapi.h>
 #include <linux/lustre_param.h>
 #include <lustre/lustre_barrier_user.h>