]> err.no Git - linux-2.6/blobdiff - fs/ocfs2/dlm/dlmcommon.h
ocfs2: wait for recovery when starting lock mastery
[linux-2.6] / fs / ocfs2 / dlm / dlmcommon.h
index 78eccd0951e4ea847c4ffd9062eb8f9537b8a77e..9bea5c6ef9bf8faac83718e67b26c5b436c8af2b 100644 (file)
@@ -235,18 +235,26 @@ struct dlm_lock_resource
        struct qstr lockname;
        struct kref      refs;
 
-       /* please keep these next 3 in this order
-        * some funcs want to iterate over all lists */
+       /*
+        * Please keep granted, converting, and blocked in this order,
+        * as some funcs want to iterate over all lists.
+        *
+        * All four lists are protected by the hash's reference.
+        */
        struct list_head granted;
        struct list_head converting;
        struct list_head blocked;
+       struct list_head purge;
 
+       /*
+        * These two lists require you to hold an additional reference
+        * while they are on the list.
+        */
        struct list_head dirty;
        struct list_head recovering; // dlm_recovery_ctxt.resources list
 
        /* unused lock resources have their last_used stamped and are
         * put on a list for the dlm thread to run. */
-       struct list_head purge;
        unsigned long    last_used;
 
        unsigned migration_pending:1;
@@ -702,6 +710,7 @@ void dlm_wait_for_recovery(struct dlm_ctxt *dlm);
 void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
 int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
 int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout);
+int dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout);
 
 void dlm_put(struct dlm_ctxt *dlm);
 struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm);