4 /* This is unfortunately needed for older lustre_user.h to be usable */
5 #define LASSERT(cond) do { } while (0)
7 #ifdef HAVE_LUSTRE_LUSTREAPI_H
8 #include <lustre/lustreapi.h>
9 #elif HAVE_LUSTRE_LIBLUSTREAPI_H
10 #include <lustre/liblustreapi.h>
14 #define DFID "[%#llx:0x%x:0x%x]"
15 #define PFID(fid) (unsigned long long)fid_seq(fid), fid_oid(fid), fid_ver(fid)
23 /* Unfortunately, neither the 1.8 or 2.x lustre_idl.h file is suitable
24 * for inclusion by userspace programs because of external dependencies.
25 * Define the minimum set of replacement functions here until that is fixed. */
26 #ifndef HAVE_LUSTRE_LUSTRE_IDL_H
27 #define fid_seq(fid) ((fid)->f_seq)
28 #define fid_oid(fid) ((fid)->f_oid)
29 #define fid_ver(fid) ((fid)->f_ver)
31 static inline void fid_be_to_cpu(struct lu_fid *dst, struct lu_fid *src)
33 dst->f_seq = ext2fs_be64_to_cpu(src->f_seq);
34 dst->f_oid = ext2fs_be32_to_cpu(src->f_oid);
35 dst->f_ver = ext2fs_be32_to_cpu(src->f_ver);