From: James Simmons Date: Sat, 5 Aug 2017 00:43:14 +0000 (-0400) Subject: LU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory X-Git-Tag: 2.10.52~36 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d92bd22523aa9bb1cdb91ded3d46fb180f68a93c;p=fs%2Flustre-release.git LU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory 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 Reviewed-on: https://review.whamcloud.com/28089 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 014ecdc..6cb3300 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -329,7 +329,7 @@ AS_IF([test $target_cpu = powerpc64], [ 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) diff --git a/libcfs/include/libcfs/Makefile.am b/libcfs/include/libcfs/Makefile.am index 1ba83ea..7209f43 100644 --- a/libcfs/include/libcfs/Makefile.am +++ b/libcfs/include/libcfs/Makefile.am @@ -13,7 +13,6 @@ EXTRA_DIST = \ libcfs_fail.h \ libcfs_hash.h \ libcfs_heap.h \ - libcfs_ioctl.h \ libcfs_prim.h \ libcfs_private.h \ libcfs_string.h \ diff --git a/libcfs/include/libcfs/libcfs.h b/libcfs/include/libcfs/libcfs.h index 23f29d5..b33243a 100644 --- a/libcfs/include/libcfs/libcfs.h +++ b/libcfs/include/libcfs/libcfs.h @@ -33,9 +33,20 @@ #ifndef __LIBCFS_LIBCFS_H__ #define __LIBCFS_LIBCFS_H__ -#ifdef __KERNEL__ -# include -# include "curproc.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "curproc.h" #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); -#endif /* __KERNEL__ */ - -#include -#ifdef __KERNEL__ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include 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))) -#endif /* __KERNEL__ */ - #endif /* _LIBCFS_LIBCFS_H_ */ diff --git a/libcfs/include/libcfs/libcfs_debug.h b/libcfs/include/libcfs/libcfs_debug.h index 2eb6b7a..6dc33b5 100644 --- a/libcfs/include/libcfs/libcfs_debug.h +++ b/libcfs/include/libcfs/libcfs_debug.h @@ -38,6 +38,8 @@ #ifndef __LIBCFS_DEBUG_H__ #define __LIBCFS_DEBUG_H__ +#include + /* * 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; -/** - * 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 @@ -207,9 +103,7 @@ do { \ .msg_cdls = (cdls) }; \ dataname.msg_mask = (mask); -#ifdef __KERNEL__ - -# ifdef CDEBUG_ENABLED +#ifdef CDEBUG_ENABLED /** * 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 */ -#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. @@ -288,7 +166,7 @@ do { \ #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); @@ -341,7 +219,7 @@ do { \ # 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 { \ @@ -353,7 +231,7 @@ do { \ # define ENTRY do { } while (0) # define EXIT do { } while (0) -#endif /* CDEBUG_ENTRY_EXIT && __KERNEL__ */ +#endif /* CDEBUG_ENTRY_EXIT */ #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))); -#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); -#endif /* __KERNEL__ */ #define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log" diff --git a/libcfs/include/libcfs/util/ioctl.h b/libcfs/include/libcfs/util/ioctl.h index 4f2dd88..eddd4f1 100644 --- a/libcfs/include/libcfs/util/ioctl.h +++ b/libcfs/include/libcfs/util/ioctl.h @@ -43,7 +43,7 @@ /* Sparse annotation. */ #define __user -#include +#include #define LIBCFS_IOC_INIT(data) \ do { \ diff --git a/libcfs/libcfs/util/l_ioctl.c b/libcfs/libcfs/util/l_ioctl.c index 0cf8924..1615f0b 100644 --- a/libcfs/libcfs/util/l_ioctl.c +++ b/libcfs/libcfs/util/l_ioctl.c @@ -35,7 +35,7 @@ #include #include -#include +#include struct ioc_dev { const char * dev_name; diff --git a/libcfs/libcfs/util/nidstrings.c b/libcfs/libcfs/util/nidstrings.c index baed3a2..59ce306 100644 --- a/libcfs/libcfs/util/nidstrings.c +++ b/libcfs/libcfs/util/nidstrings.c @@ -44,8 +44,8 @@ #include #include -#include -#include +#include +#include #ifdef HAVE_NETDB_H # include #endif diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 2ae3144..b4d0973 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -851,6 +851,7 @@ lnet/autoconf/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 diff --git a/lnet/include/Makefile.am b/lnet/include/Makefile.am index bfba4b4..a77866e 100644 --- a/lnet/include/Makefile.am +++ b/lnet/include/Makefile.am @@ -1 +1 @@ -SUBDIRS = lnet +SUBDIRS = lnet uapi/linux/lnet diff --git a/lnet/include/lnet/Makefile.am b/lnet/include/lnet/Makefile.am index 50530b5..923074e 100644 --- a/lnet/include/lnet/Makefile.am +++ b/lnet/include/lnet/Makefile.am @@ -1,13 +1,5 @@ -lnetdir=$(includedir)/lnet - EXTRA_DIST = \ api.h \ - lib-dlc.h \ lib-lnet.h \ lib-types.h \ - lnet.h \ - lnetctl.h \ - lnetst.h \ - nidstr.h \ - socklnd.h \ - types.h + socklnd.h diff --git a/lnet/include/lnet/api.h b/lnet/include/lnet/api.h index 84c6bd0..8980add 100644 --- a/lnet/include/lnet/api.h +++ b/lnet/include/lnet/api.h @@ -47,7 +47,7 @@ # error This include is only for kernel use. #endif -#include +#include /** \defgroup lnet_init_fini Initialization and cleanup * The LNet must be properly initialized before any LNet calls can be made. diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index f51bcee..4d7cc9e 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -43,8 +43,11 @@ #include #include -#include #include +#include +#include +#include +#include extern struct lnet the_lnet; /* THE network */ diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index 9b8af0e..d0095a6 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -46,7 +46,8 @@ #include #include -#include +#include +#include /* Max payload size */ #ifndef CONFIG_LNET_MAX_PAYLOAD diff --git a/lnet/include/lnet/socklnd.h b/lnet/include/lnet/socklnd.h index 843d35c..e2c19f2 100644 --- a/lnet/include/lnet/socklnd.h +++ b/lnet/include/lnet/socklnd.h @@ -28,22 +28,12 @@ * 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__ -#include - -#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 +#include 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 index 0000000..10a7e8d --- /dev/null +++ b/lnet/include/uapi/linux/lnet/.gitignore @@ -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 index 0000000..bb70adf --- /dev/null +++ b/lnet/include/uapi/linux/lnet/Makefile.am @@ -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 +# + +# +# 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 index 0000000..c4d9472 --- /dev/null +++ b/lnet/include/uapi/linux/lnet/libcfs_debug.h @@ -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__ */ diff --git a/libcfs/include/libcfs/libcfs_ioctl.h b/lnet/include/uapi/linux/lnet/libcfs_ioctl.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 --- a/libcfs/include/libcfs/libcfs_ioctl.h +++ b/lnet/include/uapi/linux/lnet/libcfs_ioctl.h @@ -29,15 +29,13 @@ * 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. * */ -#ifndef __LIBCFS_IOCTL_H__ -#define __LIBCFS_IOCTL_H__ +#ifndef __UAPI_LIBCFS_IOCTL_H__ +#define __UAPI_LIBCFS_IOCTL_H__ #include #include @@ -77,8 +75,7 @@ struct libcfs_ioctl_data { 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; @@ -152,4 +149,4 @@ struct libcfs_debug_ioctl_data extern int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data); -#endif /* __LIBCFS_IOCTL_H__ */ +#endif /* __UAPI_LIBCFS_IOCTL_H__ */ diff --git a/lnet/include/lnet/lib-dlc.h b/lnet/include/uapi/linux/lnet/lnet-dlc.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 --- a/lnet/include/lnet/lib-dlc.h +++ b/lnet/include/uapi/linux/lnet/lnet-dlc.h @@ -26,11 +26,20 @@ * Author: Amir Shehata */ -#ifndef LNET_DLC_H -#define LNET_DLC_H +#ifndef __UAPI_LNET_DLC_H_ +#define __UAPI_LNET_DLC_H_ -#include -#include +/* + * This is due to us being out of kernel and the way the OpenSFS branch + * handles CFLAGS. + */ +#ifdef __KERNEL__ +# include +# include +#else +# include +# include +#endif #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; }; -#endif /* LNET_DLC_H */ +#endif /* _LNET_DLC_H_ */ diff --git a/lnet/include/lnet/types.h b/lnet/include/uapi/linux/lnet/lnet-types.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 --- a/lnet/include/lnet/types.h +++ b/lnet/include/uapi/linux/lnet/lnet-types.h @@ -30,8 +30,8 @@ * 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 * @{ */ diff --git a/lnet/include/lnet/lnetctl.h b/lnet/include/uapi/linux/lnet/lnetctl.h similarity index 92% rename from lnet/include/lnet/lnetctl.h rename to lnet/include/uapi/linux/lnet/lnetctl.h index 3d7fd27..c39ca43 100644 --- a/lnet/include/lnet/lnetctl.h +++ b/lnet/include/uapi/linux/lnet/lnetctl.h @@ -19,10 +19,18 @@ /* * Copyright (c) 2014, Intel Corporation. */ -#ifndef _LNETCTL_H_ -#define _LNETCTL_H_ +#ifndef __UAPI_LNETCTL_H_ +#define __UAPI_LNETCTL_H_ -#include +/* + * This is due to us being out of kernel and the way the OpenSFS branch + * handles CFLAGS. + */ +#ifdef __KERNEL__ +# include +#else +# include +#endif /** \addtogroup lnet_fault_simulation * @{ */ diff --git a/lnet/include/lnet/lnetst.h b/lnet/include/uapi/linux/lnet/lnetst.h similarity index 99% rename from lnet/include/lnet/lnetst.h rename to lnet/include/uapi/linux/lnet/lnetst.h index a43978f..7bdf186 100644 --- a/lnet/include/lnet/lnetst.h +++ b/lnet/include/uapi/linux/lnet/lnetst.h @@ -29,13 +29,11 @@ * 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 */ -#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 */ diff --git a/lnet/include/lnet/nidstr.h b/lnet/include/uapi/linux/lnet/nidstr.h similarity index 95% rename from lnet/include/lnet/nidstr.h rename to lnet/include/uapi/linux/lnet/nidstr.h index b90e320..0d09d4c 100644 --- a/lnet/include/lnet/nidstr.h +++ b/lnet/include/uapi/linux/lnet/nidstr.h @@ -27,7 +27,16 @@ */ #ifndef _LNET_NIDSTRINGS_H #define _LNET_NIDSTRINGS_H -#include + +/* + * This is due to us being out of kernel and the way the OpenSFS branch + * handles CFLAGS. + */ +#ifdef __KERNEL__ +# include +#else +# include +#endif /** * Lustre Network Driver types. diff --git a/lnet/include/lnet/lnet.h b/lnet/include/uapi/linux/lnet/socklnd.h similarity index 74% rename from lnet/include/lnet/lnet.h rename to lnet/include/uapi/linux/lnet/socklnd.h index 54061f5..6453e05 100644 --- a/lnet/include/lnet/lnet.h +++ b/lnet/include/uapi/linux/lnet/socklnd.h @@ -22,25 +22,23 @@ /* * 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. - */ - -#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 -#include -#include +#define SOCKLND_CONN_ACK SOCKLND_CONN_BULK_IN #endif diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index c4a4742..247b62b 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -80,7 +80,6 @@ #define DEBUG_SUBSYSTEM S_LND #include -#include #include #define IBLND_PEER_HASH_SIZE 101 /* # peer_ni lists */ diff --git a/lnet/klnds/socklnd/socklnd.h b/lnet/klnds/socklnd/socklnd.h index 761c5c5..ff71b3a 100644 --- a/lnet/klnds/socklnd/socklnd.h +++ b/lnet/klnds/socklnd/socklnd.h @@ -51,7 +51,6 @@ #include #include -#include #include #include diff --git a/lnet/lnet/module.c b/lnet/lnet/module.c index a7190dd..297176f 100644 --- a/lnet/lnet/module.c +++ b/lnet/lnet/module.c @@ -31,8 +31,9 @@ */ #define DEBUG_SUBSYSTEM S_LNET + #include -#include +#include static int config_on_load = 0; module_param(config_on_load, int, 0444); diff --git a/lnet/lnet/net_fault.c b/lnet/lnet/net_fault.c index c43f8fe..0fe3947 100644 --- a/lnet/lnet/net_fault.c +++ b/lnet/lnet/net_fault.c @@ -37,7 +37,7 @@ #define DEBUG_SUBSYSTEM S_LNET #include -#include +#include #define LNET_MSG_MASK (LNET_PUT_BIT | LNET_ACK_BIT | \ LNET_GET_BIT | LNET_REPLY_BIT) diff --git a/lnet/lnet/nidstrings.c b/lnet/lnet/nidstrings.c index ee3def8..7b902a6 100644 --- a/lnet/lnet/nidstrings.c +++ b/lnet/lnet/nidstrings.c @@ -37,7 +37,7 @@ #define DEBUG_SUBSYSTEM S_LNET #include -#include +#include /* max value for numeric network address */ #define MAX_NUMERIC_VALUE 0xffffffff diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 612af87..c6c3d07 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -35,7 +35,7 @@ #define DEBUG_SUBSYSTEM S_LNET #include -#include +#include static void lnet_peer_remove_from_remote_list(struct lnet_peer_ni *lpni) diff --git a/lnet/selftest/conctl.c b/lnet/selftest/conctl.c index e5bba26..fafadc9 100644 --- a/lnet/selftest/conctl.c +++ b/lnet/selftest/conctl.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include "console.h" static int diff --git a/lnet/selftest/conrpc.h b/lnet/selftest/conrpc.h index 364c33f..b341f8e 100644 --- a/lnet/selftest/conrpc.h +++ b/lnet/selftest/conrpc.h @@ -40,9 +40,8 @@ #define __LST_CONRPC_H__ #include -#include #include -#include +#include #include "rpc.h" #include "selftest.h" diff --git a/lnet/selftest/console.h b/lnet/selftest/console.h index 08f199c..641f9be 100644 --- a/lnet/selftest/console.h +++ b/lnet/selftest/console.h @@ -41,9 +41,8 @@ #include -#include #include -#include +#include #include "selftest.h" #include "conrpc.h" diff --git a/lnet/selftest/rpc.h b/lnet/selftest/rpc.h index de30dc8..c3a543a 100644 --- a/lnet/selftest/rpc.h +++ b/lnet/selftest/rpc.h @@ -33,7 +33,7 @@ #ifndef __SELFTEST_RPC_H__ #define __SELFTEST_RPC_H__ -#include +#include /* * LST wired structures diff --git a/lnet/selftest/selftest.h b/lnet/selftest/selftest.h index c6514b5..51e18c0 100644 --- a/lnet/selftest/selftest.h +++ b/lnet/selftest/selftest.h @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include "rpc.h" #include "timer.h" diff --git a/lnet/utils/debug.c b/lnet/utils/debug.c index 815f46d..8a9f0c2 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -56,8 +56,8 @@ #include #include -#include -#include +#include +#include static char rawbuf[8192]; static char *buf = rawbuf; diff --git a/lnet/utils/lnetconfig/liblnd.h b/lnet/utils/lnetconfig/liblnd.h index 45f7893..1896d48 100644 --- a/lnet/utils/lnetconfig/liblnd.h +++ b/lnet/utils/lnetconfig/liblnd.h @@ -26,7 +26,8 @@ #ifndef LIB_LND_CONFIG_API_H #define LIB_LND_CONFIG_API_H -#include +#include +#include #include "cyaml.h" int diff --git a/lnet/utils/lnetconfig/liblnetconfig.c b/lnet/utils/lnetconfig/liblnetconfig.c index 2630d7e..fc06e96 100644 --- a/lnet/utils/lnetconfig/liblnetconfig.c +++ b/lnet/utils/lnetconfig/liblnetconfig.c @@ -44,10 +44,8 @@ #include #include #include -#include -#include +#include #include "liblnd.h" -#include #include #include #include "liblnetconfig.h" diff --git a/lnet/utils/lnetconfig/liblnetconfig.h b/lnet/utils/lnetconfig/liblnetconfig.h index 5b9e36b..b843b3e 100644 --- a/lnet/utils/lnetconfig/liblnetconfig.h +++ b/lnet/utils/lnetconfig/liblnetconfig.h @@ -27,7 +27,9 @@ #ifndef LIB_LNET_CONFIG_API_H #define LIB_LNET_CONFIG_API_H -#include +#include +#include +#include #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 -#include -#include - struct lnet_dlc_network_descr { struct list_head network_on_rule; __u32 nw_id; diff --git a/lnet/utils/lnetctl.c b/lnet/utils/lnetctl.c index 70c986a..c2022f1 100644 --- a/lnet/utils/lnetctl.c +++ b/lnet/utils/lnetctl.c @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include #include "lnetconfig/liblnetconfig.h" diff --git a/lnet/utils/lst.c b/lnet/utils/lst.c index 78359fe..ff8db84 100644 --- a/lnet/utils/lst.c +++ b/lnet/utils/lst.c @@ -48,9 +48,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include struct lst_sid LST_INVALID_SID = { .ses_nid = LNET_NID_ANY, .ses_stamp = -1 }; diff --git a/lnet/utils/portals.c b/lnet/utils/portals.c index 81aedd5..12aec42 100644 --- a/lnet/utils/portals.c +++ b/lnet/utils/portals.c @@ -37,10 +37,11 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include unsigned int libcfs_debug; unsigned int libcfs_printk = D_CANTMASK; diff --git a/lnet/utils/wirecheck.c b/lnet/utils/wirecheck.c index ad8c6b1..a607ded 100644 --- a/lnet/utils/wirecheck.c +++ b/lnet/utils/wirecheck.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #ifndef HAVE_STRNLEN #define strnlen(s, i) strlen(s) diff --git a/lustre.spec.in b/lustre.spec.in index f30a462..f0d828e 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -455,6 +455,7 @@ echo '%{_sbindir}/wiretest' >>lustre-tests.files %endif %{_datadir}/lustre %{_includedir}/lustre +%{_includedir}/linux/lnet %endif %{_sysconfdir}/udev/rules.d/99-lustre.rules %config(noreplace) %{_sysconfdir}/ldev.conf diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index c8bcb7b..9d02e4b 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -72,7 +72,7 @@ #include #include -#include +#include #include /* Defn's shared with user-space. */ #include diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index db61399..b4fd0be 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -53,8 +53,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/lustre/include/upcall_cache.h b/lustre/include/upcall_cache.h index accc449..88aed30 100644 --- a/lustre/include/upcall_cache.h +++ b/lustre/include/upcall_cache.h @@ -34,7 +34,7 @@ #define _UPCALL_CACHE_H #include -#include +#include /** \defgroup ucache ucache * diff --git a/lustre/ldlm/interval_tree.c b/lustre/ldlm/interval_tree.c index 7dd0c65..ee97237 100644 --- a/lustre/ldlm/interval_tree.c +++ b/lustre/ldlm/interval_tree.c @@ -38,8 +38,6 @@ */ #ifdef __KERNEL__ # include -#else -# include #endif #include diff --git a/lustre/mdt/mdt_lib.c b/lustre/mdt/mdt_lib.c index 07f3671..998d581 100644 --- a/lustre/mdt/mdt_lib.c +++ b/lustre/mdt/mdt_lib.c @@ -49,7 +49,7 @@ # include #endif #include "mdt_internal.h" -#include +#include #include typedef enum ucred_init_type { diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index f10e910..7814842 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -41,7 +41,7 @@ #include #include -#include +#include /* LUSTRE_VERSION_CODE */ #include /* diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index d65a85d..7b18eb8 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index 6cee4d7..aedcb0c 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -66,8 +66,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/lustre/obdclass/upcall_cache.c b/lustre/obdclass/upcall_cache.c index 58236ec..d56cf5b 100644 --- a/lustre/obdclass/upcall_cache.c +++ b/lustre/obdclass/upcall_cache.c @@ -36,7 +36,7 @@ #define DEBUG_SUBSYSTEM S_SEC #include -#include +#include #include static struct upcall_cache_entry *alloc_entry(struct upcall_cache *cache, diff --git a/lustre/ptlrpc/nodemap_handler.c b/lustre/ptlrpc/nodemap_handler.c index 1ea5c7c..782c992 100644 --- a/lustre/ptlrpc/nodemap_handler.c +++ b/lustre/ptlrpc/nodemap_handler.c @@ -28,7 +28,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/lustre/ptlrpc/nodemap_storage.c b/lustre/ptlrpc/nodemap_storage.c index 04e3f13..7894459 100644 --- a/lustre/ptlrpc/nodemap_storage.c +++ b/lustre/ptlrpc/nodemap_storage.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index ecde6ab..46c3e98 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -31,12 +31,13 @@ */ #define DEBUG_SUBSYSTEM S_RPC + #include #include #include #include #include -#include +#include #include "ptlrpc_internal.h" /* The following are visible and mutable through /sys/module/ptlrpc */ diff --git a/lustre/tests/it_test.c b/lustre/tests/it_test.c index 0a4f099..98d3042 100644 --- a/lustre/tests/it_test.c +++ b/lustre/tests/it_test.c @@ -53,6 +53,9 @@ */ #define EXPORT_SYMBOL(s) #define LASSERT assert +#define RETURN return +#define ENTRY +#define EXIT #include <../ldlm/interval_tree.c> diff --git a/lustre/utils/gss/l_idmap.c b/lustre/utils/gss/l_idmap.c index 1b2e17c..9fcf8a5 100644 --- a/lustre/utils/gss/l_idmap.c +++ b/lustre/utils/gss/l_idmap.c @@ -4,7 +4,6 @@ #include /* For basename() */ #include -#include #include "lsupport.h" int main(int argc, char **argv) diff --git a/lustre/utils/gss/lgss_sk.c b/lustre/utils/gss/lgss_sk.c index a4288bb..e0430a3 100644 --- a/lustre/utils/gss/lgss_sk.c +++ b/lustre/utils/gss/lgss_sk.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include "sk_utils.h" diff --git a/lustre/utils/gss/lsupport.c b/lustre/utils/gss/lsupport.c index f27ba4a..3f22881 100644 --- a/lustre/utils/gss/lsupport.c +++ b/lustre/utils/gss/lsupport.c @@ -59,7 +59,6 @@ #ifdef HAVE_NETDB_H # include #endif -#include #ifdef _NEW_BUILD_ # include "lgss_utils.h" #else diff --git a/lustre/utils/gss/lsupport.h b/lustre/utils/gss/lsupport.h index b1897e7..30aea86 100644 --- a/lustre/utils/gss/lsupport.h +++ b/lustre/utils/gss/lsupport.h @@ -38,9 +38,12 @@ #include #include +#include #include -#include +#include +#include +#include #define GSSD_CLI (0) #define GSSD_SVC (1) diff --git a/lustre/utils/gss/sk_utils.c b/lustre/utils/gss/sk_utils.c index c25a8eb..b76e81a 100644 --- a/lustre/utils/gss/sk_utils.c +++ b/lustre/utils/gss/sk_utils.c @@ -39,7 +39,6 @@ #include #include #include -#include #include "sk_utils.h" #include "write_bytes.h" diff --git a/lustre/utils/gss/svcgssd_proc.c b/lustre/utils/gss/svcgssd_proc.c index b43978a..367c9d1 100644 --- a/lustre/utils/gss/svcgssd_proc.c +++ b/lustre/utils/gss/svcgssd_proc.c @@ -48,7 +48,6 @@ #endif #include -#include #include "svcgssd.h" #include "gss_util.h" diff --git a/lustre/utils/l_getidentity.c b/lustre/utils/l_getidentity.c index 6aca6dc..1646079 100644 --- a/lustre/utils/l_getidentity.c +++ b/lustre/utils/l_getidentity.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index 788fc53..282ce02 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include "obdctl.h" #include diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 2df30c6..b68662d 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lustre/utils/liblustreapi_hsm.c b/lustre/utils/liblustreapi_hsm.c index 8fe05b4..ad9f229 100644 --- a/lustre/utils/liblustreapi_hsm.c +++ b/lustre/utils/liblustreapi_hsm.c @@ -57,7 +57,7 @@ #include #endif -#include +#include #include #include #include "lustreapi_internal.h" diff --git a/lustre/utils/libmount_utils_ldiskfs.c b/lustre/utils/libmount_utils_ldiskfs.c index d6b9ca6..c6751fc 100644 --- a/lustre/utils/libmount_utils_ldiskfs.c +++ b/lustre/utils/libmount_utils_ldiskfs.c @@ -68,7 +68,7 @@ #endif #include #include -#include +#include #include #ifdef HAVE_SELINUX diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index 769a40a..49f1f2a 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index ebe038b..45c3d5a 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -54,7 +54,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -66,7 +67,6 @@ #include #include "obdctl.h" -#include #include static char * lcfg_devname; diff --git a/lustre/utils/lustre_lfsck.c b/lustre/utils/lustre_lfsck.c index fc533da..45f492d 100644 --- a/lustre/utils/lustre_lfsck.c +++ b/lustre/utils/lustre_lfsck.c @@ -43,7 +43,7 @@ #include "lustreapi_internal.h" #include -#include +#include #include /* Needs to be last to avoid clashes */ #include diff --git a/lustre/utils/lustre_rsync.c b/lustre/utils/lustre_rsync.c index 361d2ad..c949ae8 100644 --- a/lustre/utils/lustre_rsync.c +++ b/lustre/utils/lustre_rsync.c @@ -121,9 +121,9 @@ #include #include -#include #include #include +#include #include #include "lustre_rsync.h" diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 2a279fcc..c95e5be 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -60,9 +60,9 @@ #include #include #include -#include +#include +#include #include -#include #include #include "mount_utils.h" diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 14ea849..9cd75f2 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include "obdctl.h" diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 795d73f..cb523a7 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -67,13 +67,13 @@ #include #include -#include +#include +#include #include #include #include #include -#include #include #include #include