staging/lustre: move IFTODT/DTTOIF to lustre_idl.h
authorPeng Tao <bergwolf@gmail.com>
Thu, 21 Nov 2013 14:28:26 +0000 (22:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2013 20:35:03 +0000 (12:35 -0800)
They are in fact definition of how client/server talks
to each other about file type.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-fs.h
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h

index 102afa217f859992f29410764506d2c31bdf854d..fdec53a6c8a3610212fef68344d984fda96dcfac 100644 (file)
 #define flock_end(fl)                  ((fl)->fl_end)
 #define flock_set_end(fl, end)         do { (fl)->fl_end = (end); } while (0)
 
-#ifndef IFSHIFT
-#define IFSHIFT                        12
-#endif
-
-#ifndef IFTODT
-#define IFTODT(type)           (((type) & S_IFMT) >> IFSHIFT)
-#endif
-#ifndef DTTOIF
-#define DTTOIF(dirtype)                ((dirtype) << IFSHIFT)
-#endif
-
 #endif
index 4d8d8c34cd672a2985b943616a99cd261a762977..7dfb925a536b9d8b68f32fcfc681edc480b04106 100644 (file)
@@ -1025,6 +1025,18 @@ struct luda_type {
        __u16 lt_type;
 };
 
+#ifndef IFSHIFT
+#define IFSHIFT                 12
+#endif
+
+#ifndef IFTODT
+#define IFTODT(type)           (((type) & S_IFMT) >> IFSHIFT)
+#endif
+#ifndef DTTOIF
+#define DTTOIF(dirtype)                ((dirtype) << IFSHIFT)
+#endif
+
+
 struct lu_dirpage {
        __u64       ldp_hash_start;
        __u64       ldp_hash_end;