Skip to content

Commit

Permalink
staging/lustre: move IFTODT/DTTOIF to lustre_idl.h
Browse files Browse the repository at this point in the history
They are in fact definition of how client/server talks
to each other about file type.

Cc: Andreas Dilger <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
bergwolf authored and gregkh committed Nov 25, 2013
1 parent 7ebcb73 commit 7978392
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/staging/lustre/include/linux/libcfs/linux/linux-fs.h
Original file line number Diff line number Diff line change
@@ -61,15 +61,4 @@
#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
12 changes: 12 additions & 0 deletions drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 7978392

Please sign in to comment.