jbd2: track more dependencies on transaction commit
So far we were tracking only dependency on transaction commit due to starting a new handle (which may require commit to start a new transaction). Now add tracking also for other cases where we wait for transaction commit. This way lockdep can catch deadlocks e. g. because we call jbd2_journal_stop() for a synchronous handle with some locks held which rank below transaction start. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -1046,6 +1046,12 @@ struct journal_s
|
||||
#endif
|
||||
};
|
||||
|
||||
#define jbd2_might_wait_for_commit(j) \
|
||||
do { \
|
||||
rwsem_acquire(&j->j_trans_commit_map, 0, 0, _THIS_IP_); \
|
||||
rwsem_release(&j->j_trans_commit_map, 1, _THIS_IP_); \
|
||||
} while (0)
|
||||
|
||||
/* journal feature predicate functions */
|
||||
#define JBD2_FEATURE_COMPAT_FUNCS(name, flagname) \
|
||||
static inline bool jbd2_has_feature_##name(journal_t *j) \
|
||||
|
Reference in New Issue
Block a user