ocfs2: Add a name indexed b-tree to directory inodes
[deliverable/linux.git] / fs / ocfs2 / ocfs2.h
index a7c8369c402fc917487c957fd3a1599f2ec46830..3749c32c2fc49ca76ec9a94b5defee0d1579bb0b 100644 (file)
@@ -340,6 +340,9 @@ struct ocfs2_super
 
        /* used to protect metaecc calculation check of xattr. */
        spinlock_t osb_xattr_lock;
+
+       unsigned int                    osb_dx_mask;
+       u32                             osb_dx_seed[4];
 };
 
 #define OCFS2_SB(sb)       ((struct ocfs2_super *)(sb)->s_fs_info)
@@ -398,6 +401,13 @@ static inline int ocfs2_meta_ecc(struct ocfs2_super *osb)
        return 0;
 }
 
+static inline int ocfs2_supports_indexed_dirs(struct ocfs2_super *osb)
+{
+       if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS)
+               return 1;
+       return 0;
+}
+
 /* set / clear functions because cluster events can make these happen
  * in parallel so we want the transitions to be atomic. this also
  * means that any future flags osb_flags must be protected by spinlock
@@ -478,6 +488,12 @@ static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb)
 #define OCFS2_IS_VALID_DIR_TRAILER(ptr)                                        \
        (!strcmp((ptr)->db_signature, OCFS2_DIR_TRAILER_SIGNATURE))
 
+#define OCFS2_IS_VALID_DX_ROOT(ptr)                                    \
+       (!strcmp((ptr)->dr_signature, OCFS2_DX_ROOT_SIGNATURE))
+
+#define OCFS2_IS_VALID_DX_LEAF(ptr)                                    \
+       (!strcmp((ptr)->dl_signature, OCFS2_DX_LEAF_SIGNATURE))
+
 static inline unsigned long ino_from_blkno(struct super_block *sb,
                                           u64 blkno)
 {
This page took 0.026801 seconds and 5 git commands to generate.