ocfs2: Create the lock status block union.
[pandora-kernel.git] / fs / ocfs2 / ocfs2.h
index 22e334d..6d7c6d2 100644 (file)
 #include "cluster/heartbeat.h"
 #include "cluster/tcp.h"
 
-#include "dlm/dlmapi.h"
+/* For union ocfs2_dlm_lksb */
+#include "stackglue.h"
 
 #include "ocfs2_fs.h"
-#include "endian.h"
 #include "ocfs2_lockid.h"
 
 /* Most user visible OCFS2 inodes will have very few pieces of
@@ -121,7 +121,7 @@ struct ocfs2_lock_res {
        int                      l_level;
        unsigned int             l_ro_holders;
        unsigned int             l_ex_holders;
-       struct dlm_lockstatus    l_lksb;
+       union ocfs2_dlm_lksb     l_lksb;
 
        /* used from AST/BAST funcs. */
        enum ocfs2_ast_action    l_action;
@@ -180,6 +180,8 @@ enum ocfs2_mount_options
 #define OCFS2_DEFAULT_ATIME_QUANTUM    60
 
 struct ocfs2_journal;
+struct ocfs2_slot_info;
+struct ocfs2_recovery_map;
 struct ocfs2_super
 {
        struct task_struct *commit_task;
@@ -191,7 +193,6 @@ struct ocfs2_super
        struct ocfs2_slot_info *slot_info;
 
        spinlock_t node_map_lock;
-       struct ocfs2_node_map recovery_map;
 
        u64 root_blkno;
        u64 system_dir_blkno;
@@ -216,16 +217,17 @@ struct ocfs2_super
        unsigned long s_mount_opt;
        unsigned int s_atime_quantum;
 
-       u16 max_slots;
+       unsigned int max_slots;
        s16 node_num;
-       s16 slot_num;
-       s16 preferred_slot;
+       int slot_num;
+       int preferred_slot;
        int s_sectsize_bits;
        int s_clustersize;
        int s_clustersize_bits;
 
        atomic_t vol_state;
        struct mutex recovery_lock;
+       struct ocfs2_recovery_map *recovery_map;
        struct task_struct *recovery_thread_task;
        int disable_recovery;
        wait_queue_head_t checkpoint_event;
@@ -251,6 +253,7 @@ struct ocfs2_super
        struct ocfs2_lock_res osb_rename_lockres;
        struct dlm_eviction_cb osb_eviction_cb;
        struct ocfs2_dlm_debug *osb_dlm_debug;
+       struct dlm_protocol_version osb_locking_proto;
 
        struct dentry *osb_debug_root;
 
@@ -262,6 +265,12 @@ struct ocfs2_super
        unsigned long dc_wake_sequence;
        unsigned long dc_work_sequence;
 
+       /*
+        * Any thread can add locks to the list, but the downconvert
+        * thread is the only one allowed to remove locks. Any change
+        * to this rule requires updating
+        * ocfs2_downconvert_thread_do_work().
+        */
        struct list_head blocked_lock_list;
        unsigned long blocked_lock_count;
 
@@ -366,6 +375,13 @@ static inline int ocfs2_mount_local(struct ocfs2_super *osb)
        return (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT);
 }
 
+static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb)
+{
+       return (osb->s_feature_incompat &
+               OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP);
+}
+
+
 #define OCFS2_IS_VALID_DINODE(ptr)                                     \
        (!strcmp((ptr)->i_signature, OCFS2_INODE_SIGNATURE))