]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add lockdep annotations for the ordered extents wait event
authorIoannis Angelakopoulos <iangelak@fb.com>
Mon, 25 Jul 2022 22:11:59 +0000 (15:11 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:53 +0000 (12:27 +0200)
commitfbaeaef316be7a5f464aeb96a9fa20e1d8424ed8
tree08d0bce0022fa665e96b9758b3c58ba2fea62f56
parent8dc6290b562e1f17121dc4328e7ee01ced4ba828
btrfs: add lockdep annotations for the ordered extents wait event

This wait event is very similar to the pending ordered wait event in the
sense that it occurs in a different context than the condition signaling
for the event. The signaling occurs in btrfs_remove_ordered_extent()
while the wait event is implemented in btrfs_start_ordered_extent() in
fs/btrfs/ordered-data.c

However, in this case a thread must not acquire the lockdep map for the
ordered extents wait event when the ordered extent is related to a free
space inode. That is because lockdep creates dependencies between locks
acquired both in execution paths related to normal inodes and paths
related to free space inodes, thus leading to false positives.

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/inode.c
fs/btrfs/ordered-data.c