Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[sfrench/cifs-2.6.git] / fs / ocfs2 / ocfs2.h
index a860633e833fa5c07d37f6d0d7131b2681d5eddb..5cc90a40b3c56a687bf1b7396d252771ecbdbbdf 100644 (file)
@@ -219,6 +219,7 @@ struct ocfs2_super
        u16 max_slots;
        s16 node_num;
        s16 slot_num;
+       s16 preferred_slot;
        int s_sectsize_bits;
        int s_clustersize;
        int s_clustersize_bits;
@@ -305,6 +306,19 @@ static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb)
        return 0;
 }
 
+static inline int ocfs2_writes_unwritten_extents(struct ocfs2_super *osb)
+{
+       /*
+        * Support for sparse files is a pre-requisite
+        */
+       if (!ocfs2_sparse_alloc(osb))
+               return 0;
+
+       if (osb->s_feature_ro_compat & OCFS2_FEATURE_RO_COMPAT_UNWRITTEN)
+               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