Hi Karim, [auto build test ERROR on linus/master] [also build test ERROR on v4.11-rc7 next-20170420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Karim-Eshapa/fs-orangefs-orangefs-debug-orangefs-kernel-Fixing-warning-issues-and-use-ARRAY_SIZE/20170420-221438 config: x86_64-randconfig-s3-04202303 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:22:8: error: redefinition of 'struct orangefs_khandle' struct orangefs_khandle { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:22:8: note: originally defined here struct orangefs_khandle { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:29:8: error: redefinition of 'struct orangefs_object_kref' struct orangefs_object_kref { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:29:8: note: originally defined here struct orangefs_object_kref { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:39:19: error: conflicting types for 'ORANGEFS_khandle_cmp' static inline int ORANGEFS_khandle_cmp(const struct orangefs_khandle *kh1, ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:39:19: note: previous definition of 'ORANGEFS_khandle_cmp' was here static inline int ORANGEFS_khandle_cmp(const struct orangefs_khandle *kh1, ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:54:20: error: conflicting types for 'ORANGEFS_khandle_to' static inline void ORANGEFS_khandle_to(const struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:54:20: note: previous definition of 'ORANGEFS_khandle_to' was here static inline void ORANGEFS_khandle_to(const struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:63:20: error: conflicting types for 'ORANGEFS_khandle_from' static inline void ORANGEFS_khandle_from(struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:63:20: note: previous definition of 'ORANGEFS_khandle_from' was here static inline void ORANGEFS_khandle_from(struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:216:6: error: nested redefinition of 'enum ORANGEFS_io_type' enum ORANGEFS_io_type { ^~~~~~~~~~~~~~~~ >> fs/orangefs/protocol.h:216:6: error: redeclaration of 'enum ORANGEFS_io_type' In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:216:6: note: originally defined here enum ORANGEFS_io_type { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:217:2: error: redeclaration of enumerator 'ORANGEFS_IO_READ' ORANGEFS_IO_READ = 1, ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:217:2: note: previous definition of 'ORANGEFS_IO_READ' was here ORANGEFS_IO_READ = 1, ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:218:2: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE' ORANGEFS_IO_WRITE = 2 ^~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:218:2: note: previous definition of 'ORANGEFS_IO_WRITE' was here ORANGEFS_IO_WRITE = 2 ^~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:226:6: error: nested redefinition of 'enum orangefs_ds_type' enum orangefs_ds_type { ^~~~~~~~~~~~~~~~ >> fs/orangefs/protocol.h:226:6: error: redeclaration of 'enum orangefs_ds_type' In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:226:6: note: originally defined here enum orangefs_ds_type { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:227:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE' ORANGEFS_TYPE_NONE = 0, ^~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:227:2: note: previous definition of 'ORANGEFS_TYPE_NONE' was here ORANGEFS_TYPE_NONE = 0, ^~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:228:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE' ORANGEFS_TYPE_METAFILE = (1 << 0), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:228:2: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here ORANGEFS_TYPE_METAFILE = (1 << 0), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:229:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE' ORANGEFS_TYPE_DATAFILE = (1 << 1), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:229:2: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here ORANGEFS_TYPE_DATAFILE = (1 << 1), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:230:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY' ORANGEFS_TYPE_DIRECTORY = (1 << 2), ^~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:230:2: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here ORANGEFS_TYPE_DIRECTORY = (1 << 2), ^~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:231:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK' ORANGEFS_TYPE_SYMLINK = (1 << 3), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:231:2: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here ORANGEFS_TYPE_SYMLINK = (1 << 3), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:232:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA' ORANGEFS_TYPE_DIRDATA = (1 << 4), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:232:2: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here ORANGEFS_TYPE_DIRDATA = (1 << 4), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:233:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL' ORANGEFS_TYPE_INTERNAL = (1 << 5) /* for the server's private use */ ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:233:2: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here ORANGEFS_TYPE_INTERNAL = (1 << 5) /* for the server's private use */ ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:240:8: error: redefinition of 'struct ORANGEFS_certificate' struct ORANGEFS_certificate { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:240:8: note: originally defined here struct ORANGEFS_certificate { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: >> fs/orangefs/protocol.h:249:8: error: redefinition of 'struct ORANGEFS_credential' struct ORANGEFS_credential { ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/acl.c:7:0: fs/orangefs/protocol.h:249:8: note: originally defined here struct ORANGEFS_credential { ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/acl.c:7: -- In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:22:8: error: redefinition of 'struct orangefs_khandle' struct orangefs_khandle { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:22:8: note: originally defined here struct orangefs_khandle { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:29:8: error: redefinition of 'struct orangefs_object_kref' struct orangefs_object_kref { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:29:8: note: originally defined here struct orangefs_object_kref { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:39:19: error: conflicting types for 'ORANGEFS_khandle_cmp' static inline int ORANGEFS_khandle_cmp(const struct orangefs_khandle *kh1, ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:39:19: note: previous definition of 'ORANGEFS_khandle_cmp' was here static inline int ORANGEFS_khandle_cmp(const struct orangefs_khandle *kh1, ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:54:20: error: conflicting types for 'ORANGEFS_khandle_to' static inline void ORANGEFS_khandle_to(const struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:54:20: note: previous definition of 'ORANGEFS_khandle_to' was here static inline void ORANGEFS_khandle_to(const struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:63:20: error: conflicting types for 'ORANGEFS_khandle_from' static inline void ORANGEFS_khandle_from(struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:63:20: note: previous definition of 'ORANGEFS_khandle_from' was here static inline void ORANGEFS_khandle_from(struct orangefs_khandle *kh, ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:216:6: error: nested redefinition of 'enum ORANGEFS_io_type' enum ORANGEFS_io_type { ^~~~~~~~~~~~~~~~ >> fs/orangefs/protocol.h:216:6: error: redeclaration of 'enum ORANGEFS_io_type' In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:216:6: note: originally defined here enum ORANGEFS_io_type { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:217:2: error: redeclaration of enumerator 'ORANGEFS_IO_READ' ORANGEFS_IO_READ = 1, ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:217:2: note: previous definition of 'ORANGEFS_IO_READ' was here ORANGEFS_IO_READ = 1, ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:218:2: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE' ORANGEFS_IO_WRITE = 2 ^~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:218:2: note: previous definition of 'ORANGEFS_IO_WRITE' was here ORANGEFS_IO_WRITE = 2 ^~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:226:6: error: nested redefinition of 'enum orangefs_ds_type' enum orangefs_ds_type { ^~~~~~~~~~~~~~~~ >> fs/orangefs/protocol.h:226:6: error: redeclaration of 'enum orangefs_ds_type' In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:226:6: note: originally defined here enum orangefs_ds_type { ^~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:227:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE' ORANGEFS_TYPE_NONE = 0, ^~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:227:2: note: previous definition of 'ORANGEFS_TYPE_NONE' was here ORANGEFS_TYPE_NONE = 0, ^~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:228:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE' ORANGEFS_TYPE_METAFILE = (1 << 0), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:228:2: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here ORANGEFS_TYPE_METAFILE = (1 << 0), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:229:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE' ORANGEFS_TYPE_DATAFILE = (1 << 1), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:229:2: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here ORANGEFS_TYPE_DATAFILE = (1 << 1), ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:230:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY' ORANGEFS_TYPE_DIRECTORY = (1 << 2), ^~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:230:2: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here ORANGEFS_TYPE_DIRECTORY = (1 << 2), ^~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:231:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK' ORANGEFS_TYPE_SYMLINK = (1 << 3), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:231:2: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here ORANGEFS_TYPE_SYMLINK = (1 << 3), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:232:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA' ORANGEFS_TYPE_DIRDATA = (1 << 4), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:232:2: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here ORANGEFS_TYPE_DIRDATA = (1 << 4), ^~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:233:2: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL' ORANGEFS_TYPE_INTERNAL = (1 << 5) /* for the server's private use */ ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:233:2: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here ORANGEFS_TYPE_INTERNAL = (1 << 5) /* for the server's private use */ ^~~~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:240:8: error: redefinition of 'struct ORANGEFS_certificate' struct ORANGEFS_certificate { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:240:8: note: originally defined here struct ORANGEFS_certificate { ^~~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: >> fs/orangefs/protocol.h:249:8: error: redefinition of 'struct ORANGEFS_credential' struct ORANGEFS_credential { ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/file.c:11:0: fs/orangefs/protocol.h:249:8: note: originally defined here struct ORANGEFS_credential { ^~~~~~~~~~~~~~~~~~~ In file included from fs/orangefs/orangefs-kernel.h:57:0, from fs/orangefs/orangefs-debug.h:17, from fs/orangefs/protocol.h:336, from fs/orangefs/file.c:11: .. vim +22 fs/orangefs/protocol.h 1917a693 Joe Perches 2016-03-27 @1 #include f7ab093f Mike Marshall 2015-07-17 2 #include 81b784b1 Guenter Roeck 2015-08-01 3 #include f7ab093f Mike Marshall 2015-07-17 4 #include 2c590d5f Mike Marshall 2015-07-24 5 #include f7ab093f Mike Marshall 2015-07-17 6 f7ab093f Mike Marshall 2015-07-17 7 /* pvfs2-config.h ***********************************************************/ 8bb8aefd Yi Liu 2015-11-24 8 #define ORANGEFS_VERSION_MAJOR 2 8bb8aefd Yi Liu 2015-11-24 9 #define ORANGEFS_VERSION_MINOR 9 8bb8aefd Yi Liu 2015-11-24 10 #define ORANGEFS_VERSION_SUB 0 f7ab093f Mike Marshall 2015-07-17 11 f7ab093f Mike Marshall 2015-07-17 12 /* khandle stuff ***********************************************************/ f7ab093f Mike Marshall 2015-07-17 13 f7ab093f Mike Marshall 2015-07-17 14 /* f7ab093f Mike Marshall 2015-07-17 15 * The 2.9 core will put 64 bit handles in here like this: f7ab093f Mike Marshall 2015-07-17 16 * 1234 0000 0000 5678 f7ab093f Mike Marshall 2015-07-17 17 * The 3.0 and beyond cores will put 128 bit handles in here like this: f7ab093f Mike Marshall 2015-07-17 18 * 1234 5678 90AB CDEF f7ab093f Mike Marshall 2015-07-17 19 * The kernel module will always use the first four bytes and f7ab093f Mike Marshall 2015-07-17 20 * the last four bytes as an inum. f7ab093f Mike Marshall 2015-07-17 21 */ 8bb8aefd Yi Liu 2015-11-24 @22 struct orangefs_khandle { f7ab093f Mike Marshall 2015-07-17 23 unsigned char u[16]; f7ab093f Mike Marshall 2015-07-17 24 } __aligned(8); f7ab093f Mike Marshall 2015-07-17 25 f7ab093f Mike Marshall 2015-07-17 26 /* f7ab093f Mike Marshall 2015-07-17 27 * kernel version of an object ref. f7ab093f Mike Marshall 2015-07-17 28 */ 8bb8aefd Yi Liu 2015-11-24 @29 struct orangefs_object_kref { 8bb8aefd Yi Liu 2015-11-24 30 struct orangefs_khandle khandle; f7ab093f Mike Marshall 2015-07-17 31 __s32 fs_id; f7ab093f Mike Marshall 2015-07-17 32 __s32 __pad1; f7ab093f Mike Marshall 2015-07-17 33 }; f7ab093f Mike Marshall 2015-07-17 34 f7ab093f Mike Marshall 2015-07-17 35 /* f7ab093f Mike Marshall 2015-07-17 36 * compare 2 khandles assumes little endian thus from large address to f7ab093f Mike Marshall 2015-07-17 37 * small address f7ab093f Mike Marshall 2015-07-17 38 */ 8bb8aefd Yi Liu 2015-11-24 @39 static inline int ORANGEFS_khandle_cmp(const struct orangefs_khandle *kh1, 8bb8aefd Yi Liu 2015-11-24 40 const struct orangefs_khandle *kh2) f7ab093f Mike Marshall 2015-07-17 41 { f7ab093f Mike Marshall 2015-07-17 42 int i; f7ab093f Mike Marshall 2015-07-17 43 f7ab093f Mike Marshall 2015-07-17 44 for (i = 15; i >= 0; i--) { f7ab093f Mike Marshall 2015-07-17 45 if (kh1->u[i] > kh2->u[i]) f7ab093f Mike Marshall 2015-07-17 46 return 1; f7ab093f Mike Marshall 2015-07-17 47 if (kh1->u[i] < kh2->u[i]) f7ab093f Mike Marshall 2015-07-17 48 return -1; f7ab093f Mike Marshall 2015-07-17 49 } f7ab093f Mike Marshall 2015-07-17 50 f7ab093f Mike Marshall 2015-07-17 51 return 0; f7ab093f Mike Marshall 2015-07-17 52 } f7ab093f Mike Marshall 2015-07-17 53 8bb8aefd Yi Liu 2015-11-24 @54 static inline void ORANGEFS_khandle_to(const struct orangefs_khandle *kh, f7ab093f Mike Marshall 2015-07-17 55 void *p, int size) f7ab093f Mike Marshall 2015-07-17 56 { f7ab093f Mike Marshall 2015-07-17 57 50e01586 Mike Marshall 2015-09-29 58 memcpy(p, kh->u, 16); a9bb3ba8 Mike Marshall 2016-04-06 59 memset(p + 16, 0, size - 16); f7ab093f Mike Marshall 2015-07-17 60 f7ab093f Mike Marshall 2015-07-17 61 } f7ab093f Mike Marshall 2015-07-17 62 8bb8aefd Yi Liu 2015-11-24 @63 static inline void ORANGEFS_khandle_from(struct orangefs_khandle *kh, f7ab093f Mike Marshall 2015-07-17 64 void *p, int size) f7ab093f Mike Marshall 2015-07-17 65 { f7ab093f Mike Marshall 2015-07-17 66 memset(kh, 0, 16); 50e01586 Mike Marshall 2015-09-29 67 memcpy(kh->u, p, 16); f7ab093f Mike Marshall 2015-07-17 68 f7ab093f Mike Marshall 2015-07-17 69 } f7ab093f Mike Marshall 2015-07-17 70 f7ab093f Mike Marshall 2015-07-17 71 /* pvfs2-types.h ************************************************************/ 8bb8aefd Yi Liu 2015-11-24 72 typedef __u32 ORANGEFS_uid; 8bb8aefd Yi Liu 2015-11-24 73 typedef __u32 ORANGEFS_gid; 8bb8aefd Yi Liu 2015-11-24 74 typedef __s32 ORANGEFS_fs_id; 8bb8aefd Yi Liu 2015-11-24 75 typedef __u32 ORANGEFS_permissions; 8bb8aefd Yi Liu 2015-11-24 76 typedef __u64 ORANGEFS_time; 8bb8aefd Yi Liu 2015-11-24 77 typedef __s64 ORANGEFS_size; 8bb8aefd Yi Liu 2015-11-24 78 typedef __u64 ORANGEFS_flags; 8bb8aefd Yi Liu 2015-11-24 79 typedef __u64 ORANGEFS_ds_position; 8bb8aefd Yi Liu 2015-11-24 80 typedef __s32 ORANGEFS_error; 8bb8aefd Yi Liu 2015-11-24 81 typedef __s64 ORANGEFS_offset; 8bb8aefd Yi Liu 2015-11-24 82 8bb8aefd Yi Liu 2015-11-24 83 #define ORANGEFS_SUPER_MAGIC 0x20030528 f7ab093f Mike Marshall 2015-07-17 84 54804949 Mike Marshall 2015-10-05 85 /* 8bb8aefd Yi Liu 2015-11-24 86 * ORANGEFS error codes are a signed 32-bit integer. Error codes are negative, but 54804949 Mike Marshall 2015-10-05 87 * the sign is stripped before decoding. 54804949 Mike Marshall 2015-10-05 88 */ f7ab093f Mike Marshall 2015-07-17 89 894ac432 Martin Brandenburg 2015-10-02 90 /* Bit 31 is not used since it is the sign. */ f7ab093f Mike Marshall 2015-07-17 91 54804949 Mike Marshall 2015-10-05 92 /* 8bb8aefd Yi Liu 2015-11-24 93 * Bit 30 specifies that this is a ORANGEFS error. A ORANGEFS error is either an 8bb8aefd Yi Liu 2015-11-24 94 * encoded errno value or a ORANGEFS protocol error. 54804949 Mike Marshall 2015-10-05 95 */ 8bb8aefd Yi Liu 2015-11-24 96 #define ORANGEFS_ERROR_BIT (1 << 30) f7ab093f Mike Marshall 2015-07-17 97 54804949 Mike Marshall 2015-10-05 98 /* 8bb8aefd Yi Liu 2015-11-24 99 * Bit 29 specifies that this is a ORANGEFS protocol error and not an encoded 54804949 Mike Marshall 2015-10-05 100 * errno value. 54804949 Mike Marshall 2015-10-05 101 */ 8bb8aefd Yi Liu 2015-11-24 102 #define ORANGEFS_NON_ERRNO_ERROR_BIT (1 << 29) f7ab093f Mike Marshall 2015-07-17 103 54804949 Mike Marshall 2015-10-05 104 /* 54804949 Mike Marshall 2015-10-05 105 * Bits 9, 8, and 7 specify the error class, which encodes the section of 894ac432 Martin Brandenburg 2015-10-02 106 * server code the error originated in for logging purposes. It is not used 54804949 Mike Marshall 2015-10-05 107 * in the kernel except to be masked out. 54804949 Mike Marshall 2015-10-05 108 */ 8bb8aefd Yi Liu 2015-11-24 109 #define ORANGEFS_ERROR_CLASS_BITS 0x380 894ac432 Martin Brandenburg 2015-10-02 110 894ac432 Martin Brandenburg 2015-10-02 111 /* Bits 6 - 0 are reserved for the actual error code. */ 8bb8aefd Yi Liu 2015-11-24 112 #define ORANGEFS_ERROR_NUMBER_BITS 0x7f 894ac432 Martin Brandenburg 2015-10-02 113 575e9461 Mike Marshall 2015-12-04 114 /* Encoded errno values decoded by PINT_errno_mapping in orangefs-utils.c. */ 894ac432 Martin Brandenburg 2015-10-02 115 8bb8aefd Yi Liu 2015-11-24 116 /* Our own ORANGEFS protocol error codes. */ 8bb8aefd Yi Liu 2015-11-24 117 #define ORANGEFS_ECANCEL (1|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 118 #define ORANGEFS_EDEVINIT (2|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 119 #define ORANGEFS_EDETAIL (3|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 120 #define ORANGEFS_EHOSTNTFD (4|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 121 #define ORANGEFS_EADDRNTFD (5|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 122 #define ORANGEFS_ENORECVR (6|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 123 #define ORANGEFS_ETRYAGAIN (7|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 124 #define ORANGEFS_ENOTPVFS (8|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) 8bb8aefd Yi Liu 2015-11-24 125 #define ORANGEFS_ESECURITY (9|ORANGEFS_NON_ERRNO_ERROR_BIT|ORANGEFS_ERROR_BIT) f7ab093f Mike Marshall 2015-07-17 126 f7ab093f Mike Marshall 2015-07-17 127 /* permission bits */ 8bb8aefd Yi Liu 2015-11-24 128 #define ORANGEFS_O_EXECUTE (1 << 0) 8bb8aefd Yi Liu 2015-11-24 129 #define ORANGEFS_O_WRITE (1 << 1) 8bb8aefd Yi Liu 2015-11-24 130 #define ORANGEFS_O_READ (1 << 2) 8bb8aefd Yi Liu 2015-11-24 131 #define ORANGEFS_G_EXECUTE (1 << 3) 8bb8aefd Yi Liu 2015-11-24 132 #define ORANGEFS_G_WRITE (1 << 4) 8bb8aefd Yi Liu 2015-11-24 133 #define ORANGEFS_G_READ (1 << 5) 8bb8aefd Yi Liu 2015-11-24 134 #define ORANGEFS_U_EXECUTE (1 << 6) 8bb8aefd Yi Liu 2015-11-24 135 #define ORANGEFS_U_WRITE (1 << 7) 8bb8aefd Yi Liu 2015-11-24 136 #define ORANGEFS_U_READ (1 << 8) 8bb8aefd Yi Liu 2015-11-24 137 /* no ORANGEFS_U_VTX (sticky bit) */ 8bb8aefd Yi Liu 2015-11-24 138 #define ORANGEFS_G_SGID (1 << 10) 8bb8aefd Yi Liu 2015-11-24 139 #define ORANGEFS_U_SUID (1 << 11) f7ab093f Mike Marshall 2015-07-17 140 f7ab093f Mike Marshall 2015-07-17 141 /* definition taken from stdint.h */ f7ab093f Mike Marshall 2015-07-17 142 #define INT32_MAX (2147483647) 8bb8aefd Yi Liu 2015-11-24 143 #define ORANGEFS_ITERATE_START (INT32_MAX - 1) 8bb8aefd Yi Liu 2015-11-24 144 #define ORANGEFS_ITERATE_END (INT32_MAX - 2) 8bb8aefd Yi Liu 2015-11-24 145 #define ORANGEFS_ITERATE_NEXT (INT32_MAX - 3) 8bb8aefd Yi Liu 2015-11-24 146 #define ORANGEFS_READDIR_START ORANGEFS_ITERATE_START 8bb8aefd Yi Liu 2015-11-24 147 #define ORANGEFS_READDIR_END ORANGEFS_ITERATE_END 8bb8aefd Yi Liu 2015-11-24 148 #define ORANGEFS_IMMUTABLE_FL FS_IMMUTABLE_FL 8bb8aefd Yi Liu 2015-11-24 149 #define ORANGEFS_APPEND_FL FS_APPEND_FL 8bb8aefd Yi Liu 2015-11-24 150 #define ORANGEFS_NOATIME_FL FS_NOATIME_FL 8bb8aefd Yi Liu 2015-11-24 151 #define ORANGEFS_MIRROR_FL 0x01000000ULL 8bb8aefd Yi Liu 2015-11-24 152 #define ORANGEFS_O_EXECUTE (1 << 0) 8bb8aefd Yi Liu 2015-11-24 153 #define ORANGEFS_FS_ID_NULL ((__s32)0) 8bb8aefd Yi Liu 2015-11-24 154 #define ORANGEFS_ATTR_SYS_UID (1 << 0) 8bb8aefd Yi Liu 2015-11-24 155 #define ORANGEFS_ATTR_SYS_GID (1 << 1) 8bb8aefd Yi Liu 2015-11-24 156 #define ORANGEFS_ATTR_SYS_PERM (1 << 2) 8bb8aefd Yi Liu 2015-11-24 157 #define ORANGEFS_ATTR_SYS_ATIME (1 << 3) 8bb8aefd Yi Liu 2015-11-24 158 #define ORANGEFS_ATTR_SYS_CTIME (1 << 4) 8bb8aefd Yi Liu 2015-11-24 159 #define ORANGEFS_ATTR_SYS_MTIME (1 << 5) 8bb8aefd Yi Liu 2015-11-24 160 #define ORANGEFS_ATTR_SYS_TYPE (1 << 6) 8bb8aefd Yi Liu 2015-11-24 161 #define ORANGEFS_ATTR_SYS_ATIME_SET (1 << 7) 8bb8aefd Yi Liu 2015-11-24 162 #define ORANGEFS_ATTR_SYS_MTIME_SET (1 << 8) 8bb8aefd Yi Liu 2015-11-24 163 #define ORANGEFS_ATTR_SYS_SIZE (1 << 20) 8bb8aefd Yi Liu 2015-11-24 164 #define ORANGEFS_ATTR_SYS_LNK_TARGET (1 << 24) 8bb8aefd Yi Liu 2015-11-24 165 #define ORANGEFS_ATTR_SYS_DFILE_COUNT (1 << 25) 8bb8aefd Yi Liu 2015-11-24 166 #define ORANGEFS_ATTR_SYS_DIRENT_COUNT (1 << 26) 8bb8aefd Yi Liu 2015-11-24 167 #define ORANGEFS_ATTR_SYS_BLKSIZE (1 << 28) 8bb8aefd Yi Liu 2015-11-24 168 #define ORANGEFS_ATTR_SYS_MIRROR_COPIES_COUNT (1 << 29) 8bb8aefd Yi Liu 2015-11-24 169 #define ORANGEFS_ATTR_SYS_COMMON_ALL \ 8bb8aefd Yi Liu 2015-11-24 170 (ORANGEFS_ATTR_SYS_UID | \ 8bb8aefd Yi Liu 2015-11-24 171 ORANGEFS_ATTR_SYS_GID | \ 8bb8aefd Yi Liu 2015-11-24 172 ORANGEFS_ATTR_SYS_PERM | \ 8bb8aefd Yi Liu 2015-11-24 173 ORANGEFS_ATTR_SYS_ATIME | \ 8bb8aefd Yi Liu 2015-11-24 174 ORANGEFS_ATTR_SYS_CTIME | \ 8bb8aefd Yi Liu 2015-11-24 175 ORANGEFS_ATTR_SYS_MTIME | \ 8bb8aefd Yi Liu 2015-11-24 176 ORANGEFS_ATTR_SYS_TYPE) 8bb8aefd Yi Liu 2015-11-24 177 8bb8aefd Yi Liu 2015-11-24 178 #define ORANGEFS_ATTR_SYS_ALL_SETABLE \ 8bb8aefd Yi Liu 2015-11-24 179 (ORANGEFS_ATTR_SYS_COMMON_ALL-ORANGEFS_ATTR_SYS_TYPE) 8bb8aefd Yi Liu 2015-11-24 180 8bb8aefd Yi Liu 2015-11-24 181 #define ORANGEFS_ATTR_SYS_ALL_NOHINT \ 8bb8aefd Yi Liu 2015-11-24 182 (ORANGEFS_ATTR_SYS_COMMON_ALL | \ 8bb8aefd Yi Liu 2015-11-24 183 ORANGEFS_ATTR_SYS_SIZE | \ 8bb8aefd Yi Liu 2015-11-24 184 ORANGEFS_ATTR_SYS_LNK_TARGET | \ 8bb8aefd Yi Liu 2015-11-24 185 ORANGEFS_ATTR_SYS_DFILE_COUNT | \ 8bb8aefd Yi Liu 2015-11-24 186 ORANGEFS_ATTR_SYS_MIRROR_COPIES_COUNT | \ 8bb8aefd Yi Liu 2015-11-24 187 ORANGEFS_ATTR_SYS_DIRENT_COUNT | \ 8bb8aefd Yi Liu 2015-11-24 188 ORANGEFS_ATTR_SYS_BLKSIZE) 933287da Martin Brandenburg 2016-01-30 189 8bb8aefd Yi Liu 2015-11-24 190 #define ORANGEFS_XATTR_REPLACE 0x2 8bb8aefd Yi Liu 2015-11-24 191 #define ORANGEFS_XATTR_CREATE 0x1 8bb8aefd Yi Liu 2015-11-24 192 #define ORANGEFS_MAX_SERVER_ADDR_LEN 256 8bb8aefd Yi Liu 2015-11-24 193 #define ORANGEFS_NAME_MAX 256 f7ab093f Mike Marshall 2015-07-17 194 /* f7ab093f Mike Marshall 2015-07-17 195 * max extended attribute name len as imposed by the VFS and exploited for the f7ab093f Mike Marshall 2015-07-17 196 * upcall request types. f7ab093f Mike Marshall 2015-07-17 197 * NOTE: Please retain them as multiples of 8 even if you wish to change them f7ab093f Mike Marshall 2015-07-17 198 * This is *NECESSARY* for supporting 32 bit user-space binaries on a 64-bit f7ab093f Mike Marshall 2015-07-17 199 * kernel. Due to implementation within DBPF, this really needs to be 8bb8aefd Yi Liu 2015-11-24 200 * ORANGEFS_NAME_MAX, which it was the same value as, but no reason to let it f7ab093f Mike Marshall 2015-07-17 201 * break if that changes in the future. f7ab093f Mike Marshall 2015-07-17 202 */ 8bb8aefd Yi Liu 2015-11-24 203 #define ORANGEFS_MAX_XATTR_NAMELEN ORANGEFS_NAME_MAX /* Not the same as f7ab093f Mike Marshall 2015-07-17 204 * XATTR_NAME_MAX defined f7ab093f Mike Marshall 2015-07-17 205 * by f7ab093f Mike Marshall 2015-07-17 206 */ 8bb8aefd Yi Liu 2015-11-24 207 #define ORANGEFS_MAX_XATTR_VALUELEN 8192 /* Not the same as XATTR_SIZE_MAX f7ab093f Mike Marshall 2015-07-17 208 * defined by f7ab093f Mike Marshall 2015-07-17 209 */ 8bb8aefd Yi Liu 2015-11-24 210 #define ORANGEFS_MAX_XATTR_LISTLEN 16 /* Not the same as XATTR_LIST_MAX f7ab093f Mike Marshall 2015-07-17 211 * defined by f7ab093f Mike Marshall 2015-07-17 212 */ f7ab093f Mike Marshall 2015-07-17 213 /* 8bb8aefd Yi Liu 2015-11-24 214 * ORANGEFS I/O operation types, used in both system and server interfaces. f7ab093f Mike Marshall 2015-07-17 215 */ 8bb8aefd Yi Liu 2015-11-24 @216 enum ORANGEFS_io_type { 8bb8aefd Yi Liu 2015-11-24 @217 ORANGEFS_IO_READ = 1, 8bb8aefd Yi Liu 2015-11-24 @218 ORANGEFS_IO_WRITE = 2 f7ab093f Mike Marshall 2015-07-17 219 }; f7ab093f Mike Marshall 2015-07-17 220 f7ab093f Mike Marshall 2015-07-17 221 /* :::::: The code at line 22 was first introduced by commit :::::: 8bb8aefd5afb54a25a002feb4ec70011812d06a0 OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS. :::::: TO: Yi Liu :::::: CC: Mike Marshall --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation