]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/ocfs2/stackglue.h
Merge branches 'pxa-ezx', 'pxa-magician' and 'pxa-palm' into pxa
[linux-beck.git] / fs / ocfs2 / stackglue.h
index d88bc655644bf6d137221a2a36a288abb8fb808d..db56281dd1be48d5282ce1aaf0c2b1472c1d8f88 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/dlmconstants.h>
 
 #include "dlm/dlmapi.h"
+#include <linux/dlm.h>
 
 /*
  * dlmconstants.h does not have a LOCAL flag.  We hope to remove it
@@ -60,6 +61,17 @@ struct ocfs2_locking_protocol {
        void (*lp_unlock_ast)(void *astarg, int error);
 };
 
+
+/*
+ * The dlm_lockstatus struct includes lvb space, but the dlm_lksb struct only
+ * has a pointer to separately allocated lvb space.  This struct exists only to
+ * include in the lksb union to make space for a combined dlm_lksb and lvb.
+ */
+struct fsdlm_lksb_plus_lvb {
+       struct dlm_lksb lksb;
+       char lvb[DLM_LVB_LEN];
+};
+
 /*
  * A union of all lock status structures.  We define it here so that the
  * size of the union is known.  Lock status structures are embedded in
@@ -67,6 +79,8 @@ struct ocfs2_locking_protocol {
  */
 union ocfs2_dlm_lksb {
        struct dlm_lockstatus lksb_o2dlm;
+       struct dlm_lksb lksb_fsdlm;
+       struct fsdlm_lksb_plus_lvb padding;
 };
 
 /*
@@ -120,22 +134,10 @@ struct ocfs2_stack_operations {
         * be freed.  Thus, a stack must not return from ->disconnect()
         * until it will no longer reference the conn pointer.
         *
-        * If hangup_pending is zero, ocfs2_cluster_disconnect() will also
-        * be dropping the reference on the module.
+        * Once this call returns, the stack glue will be dropping this
+        * connection's reference on the module.
         */
-       int (*disconnect)(struct ocfs2_cluster_connection *conn,
-                         int hangup_pending);
-
-       /*
-        * ocfs2_cluster_hangup() exists for compatibility with older
-        * ocfs2 tools.  Only the classic stack really needs it.  As such
-        * ->hangup() is not required of all stacks.  See the comment by
-        * ocfs2_cluster_hangup() for more details.
-        *
-        * Note that ocfs2_cluster_hangup() can only be called if
-        * hangup_pending was passed to ocfs2_cluster_disconnect().
-        */
-       void (*hangup)(const char *group, int grouplen);
+       int (*disconnect)(struct ocfs2_cluster_connection *conn);
 
        /*
         * ->this_node() returns the cluster's unique identifier for the
@@ -221,17 +223,18 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
 void ocfs2_cluster_hangup(const char *group, int grouplen);
 int ocfs2_cluster_this_node(unsigned int *node);
 
+struct ocfs2_lock_res;
 int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn,
                   int mode,
                   union ocfs2_dlm_lksb *lksb,
                   u32 flags,
                   void *name,
                   unsigned int namelen,
-                  void *astarg);
+                  struct ocfs2_lock_res *astarg);
 int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn,
                     union ocfs2_dlm_lksb *lksb,
                     u32 flags,
-                    void *astarg);
+                    struct ocfs2_lock_res *astarg);
 
 int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb);
 void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);
@@ -243,4 +246,5 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto)
 /* Used by stack plugins */
 int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin);
 void ocfs2_stack_glue_unregister(struct ocfs2_stack_plugin *plugin);
+
 #endif  /* STACKGLUE_H */