Updated locking documentation for transaction_t
authorAlexander Lochmann <alexander.lochmann@tu-dortmund.de>
Thu, 15 Oct 2020 13:24:52 +0000 (15:24 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 3 Dec 2020 14:00:55 +0000 (09:00 -0500)
We used LockDoc to derive locking rules for each member
of struct transaction_t.
Based on those results, we extended the existing documentation
by more members of struct transaction_t, and updated the existing
documentation.

Link: https://lore.kernel.org/r/10cfbef1-994c-c604-f8a6-b1042fcc622f@tu-dortmund.de
Signed-off-by: Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
Signed-off-by: Horst Schirmeier <horst.schirmeier@tu-dortmund.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
include/linux/jbd2.h

index 578ff196b3cef95bb64ea8a86b295a4802e355db..d2a4860feb72fc9fc8c016dab39611f856889d89 100644 (file)
@@ -538,6 +538,7 @@ struct transaction_chp_stats_s {
  * The transaction keeps track of all of the buffers modified by a
  * running transaction, and all of the buffers committed but not yet
  * flushed to home for finished transactions.
+ * (Locking Documentation improved by LockDoc)
  */
 
 /*
@@ -658,12 +659,12 @@ struct transaction_s
        unsigned long           t_start;
 
        /*
-        * When commit was requested
+        * When commit was requested [j_state_lock]
         */
        unsigned long           t_requested;
 
        /*
-        * Checkpointing stats [j_checkpoint_sem]
+        * Checkpointing stats [j_list_lock]
         */
        struct transaction_chp_stats_s t_chp_stats;