All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro
@ 2017-04-20  0:59 Karim Eshapa
  2017-04-20  5:07 ` kbuild test robot
  2017-04-20  7:17 ` [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro kbuild test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Karim Eshapa @ 2017-04-20  0:59 UTC (permalink / raw)
  To: hubcap; +Cc: linux-kernel, Karim Eshapa

Let's use the defined kernel macro more safe
and remove unnecessary cast.

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
 fs/orangefs/orangefs-debug.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/orangefs/orangefs-debug.h b/fs/orangefs/orangefs-debug.h
index 387db17..becd229 100644
--- a/fs/orangefs/orangefs-debug.h
+++ b/fs/orangefs/orangefs-debug.h
@@ -12,6 +12,7 @@
 #ifndef __ORANGEFS_DEBUG_H
 #define __ORANGEFS_DEBUG_H
 
+#include "orangefs-kernel.h"
 #ifdef __KERNEL__
 #include <linux/types.h>
 #else
@@ -86,7 +87,7 @@ static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
 	{"all", GOSSIP_MAX_DEBUG}
 };
 
-static const int num_kmod_keyword_mask_map = (int)
-	(sizeof(s_kmod_keyword_mask_map) / sizeof(struct __keyword_mask_s));
+static const int num_kmod_keyword_mask_map = ARRAY_SIZE(
+	s_kmod_keyword_mask_map);
 
 #endif /* __ORANGEFS_DEBUG_H */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro
  2017-04-20  0:59 [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro Karim Eshapa
@ 2017-04-20  5:07 ` kbuild test robot
  2017-04-20 13:04   ` [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE Karim Eshapa
  2017-04-20  7:17 ` [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro kbuild test robot
  1 sibling, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2017-04-20  5:07 UTC (permalink / raw)
  To: Karim Eshapa; +Cc: kbuild-all, hubcap, linux-kernel, Karim Eshapa

[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]

Hi Karim,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.11-rc7 next-20170419]
[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-h-Use-ARRAY_SIZE-kernel-macro/20170420-105518
config: x86_64-randconfig-i0-201716 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from fs/orangefs/orangefs-debug.h:15:0,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/acl.c:7:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
>> fs/orangefs/orangefs-kernel.h:365:2: error: implicit declaration of function 'gossip_debug' [-Werror=implicit-function-declaration]
     gossip_debug(GOSSIP_DCACHE_DEBUG,
     ^
>> fs/orangefs/orangefs-kernel.h:365:15: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
     gossip_debug(GOSSIP_DCACHE_DEBUG,
                  ^
   fs/orangefs/orangefs-kernel.h:365:15: note: each undeclared identifier is reported only once for each function it appears in
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:381:15: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
     gossip_debug(GOSSIP_DCACHE_DEBUG,
                  ^
   cc1: some warnings being treated as errors

vim +/gossip_debug +365 fs/orangefs/orangefs-kernel.h

f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  359  {
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  360  	return get_ino_from_khandle(dentry->d_parent->d_inode);
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  361  }
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  362  
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  363  static inline int is_root_handle(struct inode *inode)
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  364  {
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17 @365  	gossip_debug(GOSSIP_DCACHE_DEBUG,
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  366  		     "%s: root handle: %pU, this handle: %pU:\n",
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  367  		     __func__,
8bb8aefd fs/orangefs/pvfs2-kernel.h Yi Liu        2015-11-24  368  		     &ORANGEFS_SB(inode->i_sb)->root_khandle,

:::::: The code at line 365 was first introduced by commit
:::::: f7ab093f74bf638ed98fd1115f3efa17e308bb7f Orangefs: kernel client part 1

:::::: TO: Mike Marshall <hubcap@omnibond.com>
:::::: CC: Mike Marshall <hubcap@omnibond.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24019 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro
  2017-04-20  0:59 [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro Karim Eshapa
  2017-04-20  5:07 ` kbuild test robot
@ 2017-04-20  7:17 ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2017-04-20  7:17 UTC (permalink / raw)
  To: Karim Eshapa; +Cc: kbuild-all, hubcap, linux-kernel, Karim Eshapa

Hi Karim,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.11-rc7 next-20170419]
[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-h-Use-ARRAY_SIZE-kernel-macro/20170420-105518
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   include/linux/compiler.h:264:8: sparse: attribute 'no_sanitize_address': unknown attribute
   fs/orangefs/orangefs-kernel.h:365:9: sparse: undefined identifier 'gossip_debug'
>> fs/orangefs/orangefs-kernel.h:365:21: sparse: not a function <noident>
   fs/orangefs/orangefs-kernel.h:365:22: sparse: undefined identifier 'GOSSIP_DCACHE_DEBUG'
>> fs/orangefs/orangefs-kernel.h:365:21: sparse: not a function <noident>
   In file included from fs/orangefs/orangefs-debug.h:15:0,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/orangefs-utils.c:6:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
   fs/orangefs/orangefs-kernel.h:365:2: error: implicit declaration of function 'gossip_debug' [-Werror=implicit-function-declaration]
     gossip_debug(GOSSIP_DCACHE_DEBUG,
     ^~~~~~~~~~~~
   fs/orangefs/orangefs-kernel.h:365:15: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
     gossip_debug(GOSSIP_DCACHE_DEBUG,
                  ^~~~~~~~~~~~~~~~~~~
   fs/orangefs/orangefs-kernel.h:365:15: note: each undeclared identifier is reported only once for each function it appears in
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:381:15: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
     gossip_debug(GOSSIP_DCACHE_DEBUG,
                  ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +365 fs/orangefs/orangefs-kernel.h

f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  349  {
8bb8aefd fs/orangefs/pvfs2-kernel.h Yi Liu        2015-11-24  350  	struct orangefs_khandle *khandle;
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  351  	ino_t ino;
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  352  
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  353  	khandle = get_khandle_from_ino(inode);
8bb8aefd fs/orangefs/pvfs2-kernel.h Yi Liu        2015-11-24  354  	ino = orangefs_khandle_to_ino(khandle);
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  355  	return ino;
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  356  }
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  357  
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  358  static inline ino_t get_parent_ino_from_dentry(struct dentry *dentry)
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  359  {
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  360  	return get_ino_from_khandle(dentry->d_parent->d_inode);
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  361  }
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  362  
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  363  static inline int is_root_handle(struct inode *inode)
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  364  {
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17 @365  	gossip_debug(GOSSIP_DCACHE_DEBUG,
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  366  		     "%s: root handle: %pU, this handle: %pU:\n",
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  367  		     __func__,
8bb8aefd fs/orangefs/pvfs2-kernel.h Yi Liu        2015-11-24  368  		     &ORANGEFS_SB(inode->i_sb)->root_khandle,
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  369  		     get_khandle_from_ino(inode));
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  370  
8bb8aefd fs/orangefs/pvfs2-kernel.h Yi Liu        2015-11-24  371  	if (ORANGEFS_khandle_cmp(&(ORANGEFS_SB(inode->i_sb)->root_khandle),
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  372  			     get_khandle_from_ino(inode)))
f7ab093f fs/orangefs/pvfs2-kernel.h Mike Marshall 2015-07-17  373  		return 0;

:::::: The code at line 365 was first introduced by commit
:::::: f7ab093f74bf638ed98fd1115f3efa17e308bb7f Orangefs: kernel client part 1

:::::: TO: Mike Marshall <hubcap@omnibond.com>
:::::: CC: Mike Marshall <hubcap@omnibond.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE
  2017-04-20  5:07 ` kbuild test robot
@ 2017-04-20 13:04   ` Karim Eshapa
  2017-04-20 17:20     ` kbuild test robot
  2017-04-20 17:25     ` kbuild test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Karim Eshapa @ 2017-04-20 13:04 UTC (permalink / raw)
  To: hubcap; +Cc: linux-kernel, Karim Eshapa

Fix warning issues produced by kbuild test and use a ARRAY_SIZE
kernel defined macro more safe and remove unnecessary cast
when __KERNEL__ is defined.

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
---
 fs/orangefs/orangefs-debug.h  | 6 ++++++
 fs/orangefs/orangefs-kernel.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/fs/orangefs/orangefs-debug.h b/fs/orangefs/orangefs-debug.h
index 387db17..ff1f592 100644
--- a/fs/orangefs/orangefs-debug.h
+++ b/fs/orangefs/orangefs-debug.h
@@ -14,6 +14,7 @@
 
 #ifdef __KERNEL__
 #include <linux/types.h>
+#include <orangefs-kernel.h>
 #else
 #include <stdint.h>
 #endif
@@ -86,7 +87,12 @@ static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
 	{"all", GOSSIP_MAX_DEBUG}
 };
 
+#ifdef __KERNEL__
+static const int num_kmod_keyword_mask_map = ARRAY_SIZE(
+	s_kmod_keyword_mask_map);
+#else
 static const int num_kmod_keyword_mask_map = (int)
 	(sizeof(s_kmod_keyword_mask_map) / sizeof(struct __keyword_mask_s));
+#endif
 
 #endif /* __ORANGEFS_DEBUG_H */
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 8afac46..e9330c1 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -54,6 +54,8 @@
 #include <asm/unaligned.h>
 
 #include "orangefs-dev-proto.h"
+#include "protocol.h"
+#include "orangefs-debug.h"
 
 #ifdef ORANGEFS_KERNEL_DEBUG
 #define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS       10
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE
  2017-04-20 13:04   ` [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE Karim Eshapa
@ 2017-04-20 17:20     ` kbuild test robot
  2017-04-20 17:25     ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2017-04-20 17:20 UTC (permalink / raw)
  To: Karim Eshapa; +Cc: kbuild-all, hubcap, linux-kernel, Karim Eshapa

[-- Attachment #1: Type: text/plain, Size: 40231 bytes --]

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 <linux/kernel.h>
f7ab093f Mike Marshall      2015-07-17    2  #include <linux/types.h>
81b784b1 Guenter Roeck      2015-08-01    3  #include <linux/spinlock_types.h>
f7ab093f Mike Marshall      2015-07-17    4  #include <linux/slab.h>
2c590d5f Mike Marshall      2015-07-24    5  #include <linux/ioctl.h>
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 <linux/xattr.h>
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 <linux/xattr.h>
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 <linux/xattr.h>
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 <yi9@clemson.edu>
:::::: CC: Mike Marshall <hubcap@omnibond.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25805 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE
  2017-04-20 13:04   ` [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE Karim Eshapa
  2017-04-20 17:20     ` kbuild test robot
@ 2017-04-20 17:25     ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2017-04-20 17:25 UTC (permalink / raw)
  To: Karim Eshapa; +Cc: kbuild-all, hubcap, linux-kernel, Karim Eshapa

[-- Attachment #1: Type: text/plain, Size: 38741 bytes --]

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-b0-04202140 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
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,
                    from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/dcache.c:11:
   fs/orangefs/protocol.h:22: error: redefinition of 'struct orangefs_khandle'
   fs/orangefs/protocol.h:29: error: redefinition of 'struct orangefs_object_kref'
   fs/orangefs/protocol.h:39: error: conflicting types for 'ORANGEFS_khandle_cmp'
   fs/orangefs/protocol.h:39: note: previous definition of 'ORANGEFS_khandle_cmp' was here
   fs/orangefs/protocol.h:54: error: conflicting types for 'ORANGEFS_khandle_to'
   fs/orangefs/protocol.h:54: note: previous definition of 'ORANGEFS_khandle_to' was here
   fs/orangefs/protocol.h:63: error: conflicting types for 'ORANGEFS_khandle_from'
   fs/orangefs/protocol.h:63: note: previous definition of 'ORANGEFS_khandle_from' was here
>> fs/orangefs/protocol.h:72: error: redefinition of typedef 'ORANGEFS_uid'
   fs/orangefs/protocol.h:72: note: previous declaration of 'ORANGEFS_uid' was here
>> fs/orangefs/protocol.h:73: error: redefinition of typedef 'ORANGEFS_gid'
   fs/orangefs/protocol.h:73: note: previous declaration of 'ORANGEFS_gid' was here
>> fs/orangefs/protocol.h:74: error: redefinition of typedef 'ORANGEFS_fs_id'
   fs/orangefs/protocol.h:74: note: previous declaration of 'ORANGEFS_fs_id' was here
>> fs/orangefs/protocol.h:75: error: redefinition of typedef 'ORANGEFS_permissions'
   fs/orangefs/protocol.h:75: note: previous declaration of 'ORANGEFS_permissions' was here
>> fs/orangefs/protocol.h:76: error: redefinition of typedef 'ORANGEFS_time'
   fs/orangefs/protocol.h:76: note: previous declaration of 'ORANGEFS_time' was here
>> fs/orangefs/protocol.h:77: error: redefinition of typedef 'ORANGEFS_size'
   fs/orangefs/protocol.h:77: note: previous declaration of 'ORANGEFS_size' was here
>> fs/orangefs/protocol.h:78: error: redefinition of typedef 'ORANGEFS_flags'
   fs/orangefs/protocol.h:78: note: previous declaration of 'ORANGEFS_flags' was here
>> fs/orangefs/protocol.h:79: error: redefinition of typedef 'ORANGEFS_ds_position'
   fs/orangefs/protocol.h:79: note: previous declaration of 'ORANGEFS_ds_position' was here
>> fs/orangefs/protocol.h:80: error: redefinition of typedef 'ORANGEFS_error'
   fs/orangefs/protocol.h:80: note: previous declaration of 'ORANGEFS_error' was here
>> fs/orangefs/protocol.h:81: error: redefinition of typedef 'ORANGEFS_offset'
   fs/orangefs/protocol.h:81: note: previous declaration of 'ORANGEFS_offset' was here
   fs/orangefs/protocol.h:216: error: nested redefinition of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:216: error: redeclaration of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:217: error: redeclaration of enumerator 'ORANGEFS_IO_READ'
   fs/orangefs/protocol.h:217: note: previous definition of 'ORANGEFS_IO_READ' was here
   fs/orangefs/protocol.h:219: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE'
   fs/orangefs/protocol.h:219: note: previous definition of 'ORANGEFS_IO_WRITE' was here
   fs/orangefs/protocol.h:226: error: nested redefinition of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:226: error: redeclaration of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:227: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE'
   fs/orangefs/protocol.h:227: note: previous definition of 'ORANGEFS_TYPE_NONE' was here
   fs/orangefs/protocol.h:228: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE'
   fs/orangefs/protocol.h:228: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here
   fs/orangefs/protocol.h:229: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE'
   fs/orangefs/protocol.h:229: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here
   fs/orangefs/protocol.h:230: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY'
   fs/orangefs/protocol.h:230: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here
   fs/orangefs/protocol.h:231: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK'
   fs/orangefs/protocol.h:231: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here
   fs/orangefs/protocol.h:232: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA'
   fs/orangefs/protocol.h:232: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here
   fs/orangefs/protocol.h:234: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL'
   fs/orangefs/protocol.h:234: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here
   fs/orangefs/protocol.h:240: error: redefinition of 'struct ORANGEFS_certificate'
   fs/orangefs/protocol.h:249: error: redefinition of 'struct ORANGEFS_credential'
   fs/orangefs/protocol.h:266: error: redefinition of 'struct ORANGEFS_keyval_pair'
   fs/orangefs/protocol.h:275: error: redefinition of 'struct ORANGEFS_sys_attr_s'
   fs/orangefs/protocol.h:319: error: redefinition of 'struct dev_mask_info_s'
   fs/orangefs/protocol.h:321: error: redeclaration of enumerator 'KERNEL_MASK'
   fs/orangefs/protocol.h:321: note: previous definition of 'KERNEL_MASK' was here
   fs/orangefs/protocol.h:322: error: redeclaration of enumerator 'CLIENT_MASK'
   fs/orangefs/protocol.h:322: note: previous definition of 'CLIENT_MASK' was here
   fs/orangefs/protocol.h:327: error: redefinition of 'struct dev_mask2_info_s'
   In file included from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/dcache.c:11:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
   fs/orangefs/orangefs-kernel.h:367: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   fs/orangefs/orangefs-kernel.h:367: error: (Each undeclared identifier is reported only once
   fs/orangefs/orangefs-kernel.h:367: error: for each function it appears in.)
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:383: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   In file included from fs/orangefs/dcache.c:11:
   fs/orangefs/protocol.h: At top level:
   fs/orangefs/protocol.h:360: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAGIC'
   fs/orangefs/protocol.h:360: note: previous definition of 'ORANGEFS_DEV_GET_MAGIC' was here
   fs/orangefs/protocol.h:362: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_UPSIZE'
   fs/orangefs/protocol.h:362: note: previous definition of 'ORANGEFS_DEV_GET_MAX_UPSIZE' was here
   fs/orangefs/protocol.h:364: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_DOWNSIZE'
   fs/orangefs/protocol.h:364: note: previous definition of 'ORANGEFS_DEV_GET_MAX_DOWNSIZE' was here
   fs/orangefs/protocol.h:365: error: redeclaration of enumerator 'ORANGEFS_DEV_MAP'
   fs/orangefs/protocol.h:365: note: previous definition of 'ORANGEFS_DEV_MAP' was here
   fs/orangefs/protocol.h:366: error: redeclaration of enumerator 'ORANGEFS_DEV_REMOUNT_ALL'
   fs/orangefs/protocol.h:366: note: previous definition of 'ORANGEFS_DEV_REMOUNT_ALL' was here
   fs/orangefs/protocol.h:367: error: redeclaration of enumerator 'ORANGEFS_DEV_DEBUG'
   fs/orangefs/protocol.h:367: note: previous definition of 'ORANGEFS_DEV_DEBUG' was here
   fs/orangefs/protocol.h:368: error: redeclaration of enumerator 'ORANGEFS_DEV_UPSTREAM'
   fs/orangefs/protocol.h:368: note: previous definition of 'ORANGEFS_DEV_UPSTREAM' was here
   fs/orangefs/protocol.h:369: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_MASK'
   fs/orangefs/protocol.h:369: note: previous definition of 'ORANGEFS_DEV_CLIENT_MASK' was here
   fs/orangefs/protocol.h:372: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_STRING'
   fs/orangefs/protocol.h:372: note: previous definition of 'ORANGEFS_DEV_CLIENT_STRING' was here
   fs/orangefs/protocol.h:375: error: redeclaration of enumerator 'ORANGEFS_DEV_MAXNR'
   fs/orangefs/protocol.h:375: note: previous definition of 'ORANGEFS_DEV_MAXNR' was here
   fs/orangefs/protocol.h:393: error: redefinition of 'struct ORANGEFS_dev_map_desc'
   fs/orangefs/dcache.c: In function 'orangefs_revalidate_lookup':
   fs/orangefs/dcache.c:32: error: incompatible types when assigning to type 'struct orangefs_object_kref' from type 'struct orangefs_object_kref'
   fs/orangefs/dcache.c:56: error: incompatible type for argument 1 of 'match_handle'
   fs/orangefs/orangefs-kernel.h:380: note: expected 'struct orangefs_khandle' but argument is of type 'struct orangefs_khandle'
--
   In file included from fs/orangefs/orangefs-kernel.h:57,
                    from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/inode.c:12:
   fs/orangefs/protocol.h:22: error: redefinition of 'struct orangefs_khandle'
   fs/orangefs/protocol.h:29: error: redefinition of 'struct orangefs_object_kref'
   fs/orangefs/protocol.h:39: error: conflicting types for 'ORANGEFS_khandle_cmp'
   fs/orangefs/protocol.h:39: note: previous definition of 'ORANGEFS_khandle_cmp' was here
   fs/orangefs/protocol.h:54: error: conflicting types for 'ORANGEFS_khandle_to'
   fs/orangefs/protocol.h:54: note: previous definition of 'ORANGEFS_khandle_to' was here
   fs/orangefs/protocol.h:63: error: conflicting types for 'ORANGEFS_khandle_from'
   fs/orangefs/protocol.h:63: note: previous definition of 'ORANGEFS_khandle_from' was here
>> fs/orangefs/protocol.h:72: error: redefinition of typedef 'ORANGEFS_uid'
   fs/orangefs/protocol.h:72: note: previous declaration of 'ORANGEFS_uid' was here
>> fs/orangefs/protocol.h:73: error: redefinition of typedef 'ORANGEFS_gid'
   fs/orangefs/protocol.h:73: note: previous declaration of 'ORANGEFS_gid' was here
>> fs/orangefs/protocol.h:74: error: redefinition of typedef 'ORANGEFS_fs_id'
   fs/orangefs/protocol.h:74: note: previous declaration of 'ORANGEFS_fs_id' was here
>> fs/orangefs/protocol.h:75: error: redefinition of typedef 'ORANGEFS_permissions'
   fs/orangefs/protocol.h:75: note: previous declaration of 'ORANGEFS_permissions' was here
>> fs/orangefs/protocol.h:76: error: redefinition of typedef 'ORANGEFS_time'
   fs/orangefs/protocol.h:76: note: previous declaration of 'ORANGEFS_time' was here
>> fs/orangefs/protocol.h:77: error: redefinition of typedef 'ORANGEFS_size'
   fs/orangefs/protocol.h:77: note: previous declaration of 'ORANGEFS_size' was here
>> fs/orangefs/protocol.h:78: error: redefinition of typedef 'ORANGEFS_flags'
   fs/orangefs/protocol.h:78: note: previous declaration of 'ORANGEFS_flags' was here
>> fs/orangefs/protocol.h:79: error: redefinition of typedef 'ORANGEFS_ds_position'
   fs/orangefs/protocol.h:79: note: previous declaration of 'ORANGEFS_ds_position' was here
>> fs/orangefs/protocol.h:80: error: redefinition of typedef 'ORANGEFS_error'
   fs/orangefs/protocol.h:80: note: previous declaration of 'ORANGEFS_error' was here
>> fs/orangefs/protocol.h:81: error: redefinition of typedef 'ORANGEFS_offset'
   fs/orangefs/protocol.h:81: note: previous declaration of 'ORANGEFS_offset' was here
   fs/orangefs/protocol.h:216: error: nested redefinition of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:216: error: redeclaration of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:217: error: redeclaration of enumerator 'ORANGEFS_IO_READ'
   fs/orangefs/protocol.h:217: note: previous definition of 'ORANGEFS_IO_READ' was here
   fs/orangefs/protocol.h:219: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE'
   fs/orangefs/protocol.h:219: note: previous definition of 'ORANGEFS_IO_WRITE' was here
   fs/orangefs/protocol.h:226: error: nested redefinition of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:226: error: redeclaration of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:227: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE'
   fs/orangefs/protocol.h:227: note: previous definition of 'ORANGEFS_TYPE_NONE' was here
   fs/orangefs/protocol.h:228: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE'
   fs/orangefs/protocol.h:228: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here
   fs/orangefs/protocol.h:229: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE'
   fs/orangefs/protocol.h:229: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here
   fs/orangefs/protocol.h:230: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY'
   fs/orangefs/protocol.h:230: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here
   fs/orangefs/protocol.h:231: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK'
   fs/orangefs/protocol.h:231: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here
   fs/orangefs/protocol.h:232: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA'
   fs/orangefs/protocol.h:232: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here
   fs/orangefs/protocol.h:234: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL'
   fs/orangefs/protocol.h:234: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here
   fs/orangefs/protocol.h:240: error: redefinition of 'struct ORANGEFS_certificate'
   fs/orangefs/protocol.h:249: error: redefinition of 'struct ORANGEFS_credential'
   fs/orangefs/protocol.h:266: error: redefinition of 'struct ORANGEFS_keyval_pair'
   fs/orangefs/protocol.h:275: error: redefinition of 'struct ORANGEFS_sys_attr_s'
   fs/orangefs/protocol.h:319: error: redefinition of 'struct dev_mask_info_s'
   fs/orangefs/protocol.h:321: error: redeclaration of enumerator 'KERNEL_MASK'
   fs/orangefs/protocol.h:321: note: previous definition of 'KERNEL_MASK' was here
   fs/orangefs/protocol.h:322: error: redeclaration of enumerator 'CLIENT_MASK'
   fs/orangefs/protocol.h:322: note: previous definition of 'CLIENT_MASK' was here
   fs/orangefs/protocol.h:327: error: redefinition of 'struct dev_mask2_info_s'
   In file included from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/inode.c:12:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
   fs/orangefs/orangefs-kernel.h:367: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   fs/orangefs/orangefs-kernel.h:367: error: (Each undeclared identifier is reported only once
   fs/orangefs/orangefs-kernel.h:367: error: for each function it appears in.)
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:383: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   In file included from fs/orangefs/inode.c:12:
   fs/orangefs/protocol.h: At top level:
   fs/orangefs/protocol.h:360: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAGIC'
   fs/orangefs/protocol.h:360: note: previous definition of 'ORANGEFS_DEV_GET_MAGIC' was here
   fs/orangefs/protocol.h:362: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_UPSIZE'
   fs/orangefs/protocol.h:362: note: previous definition of 'ORANGEFS_DEV_GET_MAX_UPSIZE' was here
   fs/orangefs/protocol.h:364: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_DOWNSIZE'
   fs/orangefs/protocol.h:364: note: previous definition of 'ORANGEFS_DEV_GET_MAX_DOWNSIZE' was here
   fs/orangefs/protocol.h:365: error: redeclaration of enumerator 'ORANGEFS_DEV_MAP'
   fs/orangefs/protocol.h:365: note: previous definition of 'ORANGEFS_DEV_MAP' was here
   fs/orangefs/protocol.h:366: error: redeclaration of enumerator 'ORANGEFS_DEV_REMOUNT_ALL'
   fs/orangefs/protocol.h:366: note: previous definition of 'ORANGEFS_DEV_REMOUNT_ALL' was here
   fs/orangefs/protocol.h:367: error: redeclaration of enumerator 'ORANGEFS_DEV_DEBUG'
   fs/orangefs/protocol.h:367: note: previous definition of 'ORANGEFS_DEV_DEBUG' was here
   fs/orangefs/protocol.h:368: error: redeclaration of enumerator 'ORANGEFS_DEV_UPSTREAM'
   fs/orangefs/protocol.h:368: note: previous definition of 'ORANGEFS_DEV_UPSTREAM' was here
   fs/orangefs/protocol.h:369: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_MASK'
   fs/orangefs/protocol.h:369: note: previous definition of 'ORANGEFS_DEV_CLIENT_MASK' was here
   fs/orangefs/protocol.h:372: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_STRING'
   fs/orangefs/protocol.h:372: note: previous definition of 'ORANGEFS_DEV_CLIENT_STRING' was here
   fs/orangefs/protocol.h:375: error: redeclaration of enumerator 'ORANGEFS_DEV_MAXNR'
   fs/orangefs/protocol.h:375: note: previous definition of 'ORANGEFS_DEV_MAXNR' was here
   fs/orangefs/protocol.h:393: error: redefinition of 'struct ORANGEFS_dev_map_desc'
   fs/orangefs/inode.c: In function 'orangefs_setattr_size':
   fs/orangefs/inode.c:180: error: incompatible types when assigning to type 'struct orangefs_object_kref' from type 'struct orangefs_object_kref'
--
   In file included from fs/orangefs/orangefs-kernel.h:57,
                    from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/orangefs-sysfs.c:137:
   fs/orangefs/protocol.h:22: error: redefinition of 'struct orangefs_khandle'
   fs/orangefs/protocol.h:29: error: redefinition of 'struct orangefs_object_kref'
   fs/orangefs/protocol.h:39: error: conflicting types for 'ORANGEFS_khandle_cmp'
   fs/orangefs/protocol.h:39: note: previous definition of 'ORANGEFS_khandle_cmp' was here
   fs/orangefs/protocol.h:54: error: conflicting types for 'ORANGEFS_khandle_to'
   fs/orangefs/protocol.h:54: note: previous definition of 'ORANGEFS_khandle_to' was here
   fs/orangefs/protocol.h:63: error: conflicting types for 'ORANGEFS_khandle_from'
   fs/orangefs/protocol.h:63: note: previous definition of 'ORANGEFS_khandle_from' was here
>> fs/orangefs/protocol.h:72: error: redefinition of typedef 'ORANGEFS_uid'
   fs/orangefs/protocol.h:72: note: previous declaration of 'ORANGEFS_uid' was here
>> fs/orangefs/protocol.h:73: error: redefinition of typedef 'ORANGEFS_gid'
   fs/orangefs/protocol.h:73: note: previous declaration of 'ORANGEFS_gid' was here
>> fs/orangefs/protocol.h:74: error: redefinition of typedef 'ORANGEFS_fs_id'
   fs/orangefs/protocol.h:74: note: previous declaration of 'ORANGEFS_fs_id' was here
>> fs/orangefs/protocol.h:75: error: redefinition of typedef 'ORANGEFS_permissions'
   fs/orangefs/protocol.h:75: note: previous declaration of 'ORANGEFS_permissions' was here
>> fs/orangefs/protocol.h:76: error: redefinition of typedef 'ORANGEFS_time'
   fs/orangefs/protocol.h:76: note: previous declaration of 'ORANGEFS_time' was here
>> fs/orangefs/protocol.h:77: error: redefinition of typedef 'ORANGEFS_size'
   fs/orangefs/protocol.h:77: note: previous declaration of 'ORANGEFS_size' was here
>> fs/orangefs/protocol.h:78: error: redefinition of typedef 'ORANGEFS_flags'
   fs/orangefs/protocol.h:78: note: previous declaration of 'ORANGEFS_flags' was here
>> fs/orangefs/protocol.h:79: error: redefinition of typedef 'ORANGEFS_ds_position'
   fs/orangefs/protocol.h:79: note: previous declaration of 'ORANGEFS_ds_position' was here
>> fs/orangefs/protocol.h:80: error: redefinition of typedef 'ORANGEFS_error'
   fs/orangefs/protocol.h:80: note: previous declaration of 'ORANGEFS_error' was here
>> fs/orangefs/protocol.h:81: error: redefinition of typedef 'ORANGEFS_offset'
   fs/orangefs/protocol.h:81: note: previous declaration of 'ORANGEFS_offset' was here
   fs/orangefs/protocol.h:216: error: nested redefinition of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:216: error: redeclaration of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:217: error: redeclaration of enumerator 'ORANGEFS_IO_READ'
   fs/orangefs/protocol.h:217: note: previous definition of 'ORANGEFS_IO_READ' was here
   fs/orangefs/protocol.h:219: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE'
   fs/orangefs/protocol.h:219: note: previous definition of 'ORANGEFS_IO_WRITE' was here
   fs/orangefs/protocol.h:226: error: nested redefinition of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:226: error: redeclaration of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:227: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE'
   fs/orangefs/protocol.h:227: note: previous definition of 'ORANGEFS_TYPE_NONE' was here
   fs/orangefs/protocol.h:228: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE'
   fs/orangefs/protocol.h:228: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here
   fs/orangefs/protocol.h:229: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE'
   fs/orangefs/protocol.h:229: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here
   fs/orangefs/protocol.h:230: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY'
   fs/orangefs/protocol.h:230: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here
   fs/orangefs/protocol.h:231: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK'
   fs/orangefs/protocol.h:231: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here
   fs/orangefs/protocol.h:232: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA'
   fs/orangefs/protocol.h:232: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here
   fs/orangefs/protocol.h:234: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL'
   fs/orangefs/protocol.h:234: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here
   fs/orangefs/protocol.h:240: error: redefinition of 'struct ORANGEFS_certificate'
   fs/orangefs/protocol.h:249: error: redefinition of 'struct ORANGEFS_credential'
   fs/orangefs/protocol.h:266: error: redefinition of 'struct ORANGEFS_keyval_pair'
   fs/orangefs/protocol.h:275: error: redefinition of 'struct ORANGEFS_sys_attr_s'
   fs/orangefs/protocol.h:319: error: redefinition of 'struct dev_mask_info_s'
   fs/orangefs/protocol.h:321: error: redeclaration of enumerator 'KERNEL_MASK'
   fs/orangefs/protocol.h:321: note: previous definition of 'KERNEL_MASK' was here
   fs/orangefs/protocol.h:322: error: redeclaration of enumerator 'CLIENT_MASK'
   fs/orangefs/protocol.h:322: note: previous definition of 'CLIENT_MASK' was here
   fs/orangefs/protocol.h:327: error: redefinition of 'struct dev_mask2_info_s'
   In file included from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/orangefs-sysfs.c:137:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
   fs/orangefs/orangefs-kernel.h:367: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   fs/orangefs/orangefs-kernel.h:367: error: (Each undeclared identifier is reported only once
   fs/orangefs/orangefs-kernel.h:367: error: for each function it appears in.)
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:383: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   In file included from fs/orangefs/orangefs-sysfs.c:137:
   fs/orangefs/protocol.h: At top level:
   fs/orangefs/protocol.h:360: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAGIC'
   fs/orangefs/protocol.h:360: note: previous definition of 'ORANGEFS_DEV_GET_MAGIC' was here
   fs/orangefs/protocol.h:362: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_UPSIZE'
   fs/orangefs/protocol.h:362: note: previous definition of 'ORANGEFS_DEV_GET_MAX_UPSIZE' was here
   fs/orangefs/protocol.h:364: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_DOWNSIZE'
   fs/orangefs/protocol.h:364: note: previous definition of 'ORANGEFS_DEV_GET_MAX_DOWNSIZE' was here
   fs/orangefs/protocol.h:365: error: redeclaration of enumerator 'ORANGEFS_DEV_MAP'
   fs/orangefs/protocol.h:365: note: previous definition of 'ORANGEFS_DEV_MAP' was here
   fs/orangefs/protocol.h:366: error: redeclaration of enumerator 'ORANGEFS_DEV_REMOUNT_ALL'
   fs/orangefs/protocol.h:366: note: previous definition of 'ORANGEFS_DEV_REMOUNT_ALL' was here
   fs/orangefs/protocol.h:367: error: redeclaration of enumerator 'ORANGEFS_DEV_DEBUG'
   fs/orangefs/protocol.h:367: note: previous definition of 'ORANGEFS_DEV_DEBUG' was here
   fs/orangefs/protocol.h:368: error: redeclaration of enumerator 'ORANGEFS_DEV_UPSTREAM'
   fs/orangefs/protocol.h:368: note: previous definition of 'ORANGEFS_DEV_UPSTREAM' was here
   fs/orangefs/protocol.h:369: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_MASK'
   fs/orangefs/protocol.h:369: note: previous definition of 'ORANGEFS_DEV_CLIENT_MASK' was here
   fs/orangefs/protocol.h:372: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_STRING'
   fs/orangefs/protocol.h:372: note: previous definition of 'ORANGEFS_DEV_CLIENT_STRING' was here
   fs/orangefs/protocol.h:375: error: redeclaration of enumerator 'ORANGEFS_DEV_MAXNR'
   fs/orangefs/protocol.h:375: note: previous definition of 'ORANGEFS_DEV_MAXNR' was here
   fs/orangefs/protocol.h:393: error: redefinition of 'struct ORANGEFS_dev_map_desc'
--
   In file included from fs/orangefs/orangefs-kernel.h:57,
                    from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/file.c:11:
   fs/orangefs/protocol.h:22: error: redefinition of 'struct orangefs_khandle'
   fs/orangefs/protocol.h:29: error: redefinition of 'struct orangefs_object_kref'
   fs/orangefs/protocol.h:39: error: conflicting types for 'ORANGEFS_khandle_cmp'
   fs/orangefs/protocol.h:39: note: previous definition of 'ORANGEFS_khandle_cmp' was here
   fs/orangefs/protocol.h:54: error: conflicting types for 'ORANGEFS_khandle_to'
   fs/orangefs/protocol.h:54: note: previous definition of 'ORANGEFS_khandle_to' was here
   fs/orangefs/protocol.h:63: error: conflicting types for 'ORANGEFS_khandle_from'
   fs/orangefs/protocol.h:63: note: previous definition of 'ORANGEFS_khandle_from' was here
>> fs/orangefs/protocol.h:72: error: redefinition of typedef 'ORANGEFS_uid'
   fs/orangefs/protocol.h:72: note: previous declaration of 'ORANGEFS_uid' was here
>> fs/orangefs/protocol.h:73: error: redefinition of typedef 'ORANGEFS_gid'
   fs/orangefs/protocol.h:73: note: previous declaration of 'ORANGEFS_gid' was here
>> fs/orangefs/protocol.h:74: error: redefinition of typedef 'ORANGEFS_fs_id'
   fs/orangefs/protocol.h:74: note: previous declaration of 'ORANGEFS_fs_id' was here
>> fs/orangefs/protocol.h:75: error: redefinition of typedef 'ORANGEFS_permissions'
   fs/orangefs/protocol.h:75: note: previous declaration of 'ORANGEFS_permissions' was here
>> fs/orangefs/protocol.h:76: error: redefinition of typedef 'ORANGEFS_time'
   fs/orangefs/protocol.h:76: note: previous declaration of 'ORANGEFS_time' was here
>> fs/orangefs/protocol.h:77: error: redefinition of typedef 'ORANGEFS_size'
   fs/orangefs/protocol.h:77: note: previous declaration of 'ORANGEFS_size' was here
>> fs/orangefs/protocol.h:78: error: redefinition of typedef 'ORANGEFS_flags'
   fs/orangefs/protocol.h:78: note: previous declaration of 'ORANGEFS_flags' was here
>> fs/orangefs/protocol.h:79: error: redefinition of typedef 'ORANGEFS_ds_position'
   fs/orangefs/protocol.h:79: note: previous declaration of 'ORANGEFS_ds_position' was here
>> fs/orangefs/protocol.h:80: error: redefinition of typedef 'ORANGEFS_error'
   fs/orangefs/protocol.h:80: note: previous declaration of 'ORANGEFS_error' was here
>> fs/orangefs/protocol.h:81: error: redefinition of typedef 'ORANGEFS_offset'
   fs/orangefs/protocol.h:81: note: previous declaration of 'ORANGEFS_offset' was here
   fs/orangefs/protocol.h:216: error: nested redefinition of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:216: error: redeclaration of 'enum ORANGEFS_io_type'
   fs/orangefs/protocol.h:217: error: redeclaration of enumerator 'ORANGEFS_IO_READ'
   fs/orangefs/protocol.h:217: note: previous definition of 'ORANGEFS_IO_READ' was here
   fs/orangefs/protocol.h:219: error: redeclaration of enumerator 'ORANGEFS_IO_WRITE'
   fs/orangefs/protocol.h:219: note: previous definition of 'ORANGEFS_IO_WRITE' was here
   fs/orangefs/protocol.h:226: error: nested redefinition of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:226: error: redeclaration of 'enum orangefs_ds_type'
   fs/orangefs/protocol.h:227: error: redeclaration of enumerator 'ORANGEFS_TYPE_NONE'
   fs/orangefs/protocol.h:227: note: previous definition of 'ORANGEFS_TYPE_NONE' was here
   fs/orangefs/protocol.h:228: error: redeclaration of enumerator 'ORANGEFS_TYPE_METAFILE'
   fs/orangefs/protocol.h:228: note: previous definition of 'ORANGEFS_TYPE_METAFILE' was here
   fs/orangefs/protocol.h:229: error: redeclaration of enumerator 'ORANGEFS_TYPE_DATAFILE'
   fs/orangefs/protocol.h:229: note: previous definition of 'ORANGEFS_TYPE_DATAFILE' was here
   fs/orangefs/protocol.h:230: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRECTORY'
   fs/orangefs/protocol.h:230: note: previous definition of 'ORANGEFS_TYPE_DIRECTORY' was here
   fs/orangefs/protocol.h:231: error: redeclaration of enumerator 'ORANGEFS_TYPE_SYMLINK'
   fs/orangefs/protocol.h:231: note: previous definition of 'ORANGEFS_TYPE_SYMLINK' was here
   fs/orangefs/protocol.h:232: error: redeclaration of enumerator 'ORANGEFS_TYPE_DIRDATA'
   fs/orangefs/protocol.h:232: note: previous definition of 'ORANGEFS_TYPE_DIRDATA' was here
   fs/orangefs/protocol.h:234: error: redeclaration of enumerator 'ORANGEFS_TYPE_INTERNAL'
   fs/orangefs/protocol.h:234: note: previous definition of 'ORANGEFS_TYPE_INTERNAL' was here
   fs/orangefs/protocol.h:240: error: redefinition of 'struct ORANGEFS_certificate'
   fs/orangefs/protocol.h:249: error: redefinition of 'struct ORANGEFS_credential'
   fs/orangefs/protocol.h:266: error: redefinition of 'struct ORANGEFS_keyval_pair'
   fs/orangefs/protocol.h:275: error: redefinition of 'struct ORANGEFS_sys_attr_s'
   fs/orangefs/protocol.h:319: error: redefinition of 'struct dev_mask_info_s'
   fs/orangefs/protocol.h:321: error: redeclaration of enumerator 'KERNEL_MASK'
   fs/orangefs/protocol.h:321: note: previous definition of 'KERNEL_MASK' was here
   fs/orangefs/protocol.h:322: error: redeclaration of enumerator 'CLIENT_MASK'
   fs/orangefs/protocol.h:322: note: previous definition of 'CLIENT_MASK' was here
   fs/orangefs/protocol.h:327: error: redefinition of 'struct dev_mask2_info_s'
   In file included from fs/orangefs/orangefs-debug.h:17,
                    from fs/orangefs/protocol.h:336,
                    from fs/orangefs/file.c:11:
   fs/orangefs/orangefs-kernel.h: In function 'is_root_handle':
   fs/orangefs/orangefs-kernel.h:367: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   fs/orangefs/orangefs-kernel.h:367: error: (Each undeclared identifier is reported only once
   fs/orangefs/orangefs-kernel.h:367: error: for each function it appears in.)
   fs/orangefs/orangefs-kernel.h: In function 'match_handle':
   fs/orangefs/orangefs-kernel.h:383: error: 'GOSSIP_DCACHE_DEBUG' undeclared (first use in this function)
   In file included from fs/orangefs/file.c:11:
   fs/orangefs/protocol.h: At top level:
   fs/orangefs/protocol.h:360: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAGIC'
   fs/orangefs/protocol.h:360: note: previous definition of 'ORANGEFS_DEV_GET_MAGIC' was here
   fs/orangefs/protocol.h:362: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_UPSIZE'
   fs/orangefs/protocol.h:362: note: previous definition of 'ORANGEFS_DEV_GET_MAX_UPSIZE' was here
   fs/orangefs/protocol.h:364: error: redeclaration of enumerator 'ORANGEFS_DEV_GET_MAX_DOWNSIZE'
   fs/orangefs/protocol.h:364: note: previous definition of 'ORANGEFS_DEV_GET_MAX_DOWNSIZE' was here
   fs/orangefs/protocol.h:365: error: redeclaration of enumerator 'ORANGEFS_DEV_MAP'
   fs/orangefs/protocol.h:365: note: previous definition of 'ORANGEFS_DEV_MAP' was here
   fs/orangefs/protocol.h:366: error: redeclaration of enumerator 'ORANGEFS_DEV_REMOUNT_ALL'
   fs/orangefs/protocol.h:366: note: previous definition of 'ORANGEFS_DEV_REMOUNT_ALL' was here
   fs/orangefs/protocol.h:367: error: redeclaration of enumerator 'ORANGEFS_DEV_DEBUG'
   fs/orangefs/protocol.h:367: note: previous definition of 'ORANGEFS_DEV_DEBUG' was here
   fs/orangefs/protocol.h:368: error: redeclaration of enumerator 'ORANGEFS_DEV_UPSTREAM'
   fs/orangefs/protocol.h:368: note: previous definition of 'ORANGEFS_DEV_UPSTREAM' was here
   fs/orangefs/protocol.h:369: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_MASK'
   fs/orangefs/protocol.h:369: note: previous definition of 'ORANGEFS_DEV_CLIENT_MASK' was here
   fs/orangefs/protocol.h:372: error: redeclaration of enumerator 'ORANGEFS_DEV_CLIENT_STRING'
   fs/orangefs/protocol.h:372: note: previous definition of 'ORANGEFS_DEV_CLIENT_STRING' was here
   fs/orangefs/protocol.h:375: error: redeclaration of enumerator 'ORANGEFS_DEV_MAXNR'
   fs/orangefs/protocol.h:375: note: previous definition of 'ORANGEFS_DEV_MAXNR' was here
   fs/orangefs/protocol.h:393: error: redefinition of 'struct ORANGEFS_dev_map_desc'
   fs/orangefs/file.c: In function 'flush_racache':
   fs/orangefs/file.c:31: error: incompatible types when assigning to type 'struct orangefs_object_kref' from type 'struct orangefs_object_kref'
   fs/orangefs/file.c: In function 'wait_for_direct_io':
   fs/orangefs/file.c:128: error: incompatible types when assigning to type 'struct orangefs_object_kref' from type 'struct orangefs_object_kref'
   fs/orangefs/file.c: In function 'orangefs_fsync':
   fs/orangefs/file.c:660: error: incompatible types when assigning to type 'struct orangefs_object_kref' from type 'struct orangefs_object_kref'
..

vim +/ORANGEFS_uid +72 fs/orangefs/protocol.h

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  

:::::: The code at line 72 was first introduced by commit
:::::: 8bb8aefd5afb54a25a002feb4ec70011812d06a0 OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.

:::::: TO: Yi Liu <yi9@clemson.edu>
:::::: CC: Mike Marshall <hubcap@omnibond.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32539 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-20 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20  0:59 [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro Karim Eshapa
2017-04-20  5:07 ` kbuild test robot
2017-04-20 13:04   ` [PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE Karim Eshapa
2017-04-20 17:20     ` kbuild test robot
2017-04-20 17:25     ` kbuild test robot
2017-04-20  7:17 ` [PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.