[PATCH 24/29] jbd2: Disable Dept on journal->j_trans_commit_map

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Sun Nov 20 10:04:04 UTC 2022


From: Byungchul Park <byungchul.park at lge.com>

The lockdep annotation was introduced to track those operations,
however, that works more stongly than it should do so as to generate
wrong dependencies that would never happen in practice. For example,
the code doesn't imply rwsem_acquire_read(&journal->j_trans_commit_map)
when jbd2_journal_start_reserved() is used, but it's always annotated
no matter where it comes from.

Because Dept already tracks all waits and events with regard to jbd2's
commit operations, Dept can ignore the annotation and work with waits
and events themselves. Let it ignore the lockdep annotation.

Signed-off-by: Byungchul Park <byungchul.park at lge.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 fs/jbd2/journal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 2696f43e7239..a39fcec69ee2 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1387,6 +1387,7 @@ static journal_t *journal_init_common(struct block_device *bdev,
 
 	lockdep_init_map(&journal->j_trans_commit_map, "jbd2_handle",
 			 &jbd2_trans_commit_key, 0);
+	dept_map_nocheck(&journal->j_trans_commit_map.dmap);
 
 	/* journal descriptor can store up to n blocks -bzzz */
 	journal->j_blocksize = blocksize;
-- 
2.37.1



More information about the Intel-gfx-trybot mailing list