ocfs2: document access rules for blocked_lock_list
authorMark Fasheh <mark.fasheh@oracle.com>
Thu, 24 Jan 2008 00:54:48 +0000 (16:54 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Fri, 25 Jan 2008 23:05:48 +0000 (15:05 -0800)
ocfs2_super->blocked_lock_list and ocfs2_super->blocked_lock_count have some
usage restrictions which aren't immediately obvious to anyone reading the
code. It's a good idea to document this so that we avoid making costly
mistakes in the future.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/ocfs2.h

index 22e334d125d0fad419bdd6eb21d1828f5102ede5..d08480580470e237562dd75239f513d13ee28386 100644 (file)
@@ -262,6 +262,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;