Whamcloud - gitweb
debugfs: dump "fid" and "lma" xattrs on inode stat
[tools/e2fsprogs.git] / lib / ext2fs / lfsck.h
index 6a49042..00071f2 100644 (file)
@@ -34,6 +34,56 @@ static inline void fid_be_to_cpu(struct lu_fid *dst, struct lu_fid *src)
        dst->f_oid = ext2fs_be32_to_cpu(src->f_oid);
        dst->f_ver = ext2fs_be32_to_cpu(src->f_ver);
 }
+
+static inline void fid_le_to_cpu(struct lu_fid *dst, struct lu_fid *src)
+{
+       dst->f_seq = ext2fs_le64_to_cpu(src->f_seq);
+       dst->f_oid = ext2fs_le32_to_cpu(src->f_oid);
+       dst->f_ver = ext2fs_le32_to_cpu(src->f_ver);
+}
+#endif /* HAVE_LUSTRE_LUSTRE_IDL_H */
+
+#define LUSTRE_XATTR_MDT_LOV   "lov"
+#define LUSTRE_XATTR_MDT_LMA   "lma"
+#define LUSTRE_XATTR_MDT_LINK  "link"
+#define LUSTRE_XATTR_OST_FID   "fid"
+
+#ifndef LMA_OLD_SIZE
+#ifndef LMA_INCOMPAT_SUPP
+struct lustre_mdt_attrs {
+       __u32           lma_compat;
+       __u32           lma_incompat;
+       struct lu_fid   lma_self_fid;
+};
+struct lustre_ost_attrs {
+       struct lustre_mdt_attrs loa_lma;
+       struct lu_fid           loa_parent_fid;
+       __u32                   loa_stripe_size;
+       __u32                   loa_pfl_id;
+       __u64                   loa_pfl_start;
+       __u64                   loa_pfl_end;
+};
 #endif
 
+struct filter_fid_old {
+       struct lu_fid   ff_parent;
+       __u64           ff_objid;
+       __u64           ff_seq;
+};
+
+struct filter_fid {
+       struct lu_fid   ff_parent;
+       __u32           ff_stripe_size;
+       __u32           ff_stripe_count;
+       __u64           ff_pfl_start;
+       __u64           ff_pfl_end;
+       __u32           ff_pfl_id;
+};
+
+#define LMA_OLD_SIZE 64
+#endif /* !LMA_OLD_SIZE */
+
+#define PFID_STRIPE_IDX_BITS   16
+#define PFID_STRIPE_COUNT_MASK ((1 << PFID_STRIPE_IDX_BITS) - 1)
+
 #endif /* LFSCK_H */