]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add lockdep annotations for transaction states wait events
authorIoannis Angelakopoulos <iangelak@fb.com>
Mon, 25 Jul 2022 22:11:52 +0000 (15:11 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:53 +0000 (12:27 +0200)
commit3e738c531aad8caa7f3d20ab878a8a0d3574e730
treec8ea00e93b77465a34ce0f5fec5bf0dcacdeaf68
parent5a9ba6709f13313984900d635b4c73c9eb7d644e
btrfs: add lockdep annotations for transaction states wait events

Add lockdep annotations for the transaction states that have wait
events;

  1) TRANS_STATE_COMMIT_START
  2) TRANS_STATE_UNBLOCKED
  3) TRANS_STATE_SUPER_COMMITTED
  4) TRANS_STATE_COMPLETED

The new macros introduced here to annotate the transaction states wait
events have the same effect as the generic lockdep annotation macros.

With the exception of the lockdep annotation for TRANS_STATE_COMMIT_START
the transaction thread has to acquire the lockdep maps for the
transaction states as reader after the lockdep map for num_writers is
released so that lockdep does not complain.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Ioannis Angelakopoulos <iangelak@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/transaction.c