Skip to content

Set the lockdep class on eb's at allocation time

Josef Bacik linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14btrfs: remove lockdep classes for the fs treefs/btrfs/disk-io.c+0 -10 replies
2/14btrfs: cleanup extent buffer readaheadfs/btrfs/ctree.c fs/btrfs/disk-io.c fs/btrfs/disk-io.h +5 more+64 -610 replies
3/14btrfs: use btrfs_read_node_slot in btrfs_realloc_nodefs/btrfs/ctree.c+3 -300 replies
4/14btrfs: use btrfs_read_node_slot in walk_down_reloc_treefs/btrfs/relocation.c+2 -130 replies
5/14btrfs: use btrfs_read_node_slot in do_relocationfs/btrfs/relocation.c+1 -110 replies
6/14btrfs: use btrfs_read_node_slot in replace_pathfs/btrfs/relocation.c+1 -90 replies
7/14btrfs: use btrfs_read_node_slot in walk_down_treefs/btrfs/ref-verify.c+2 -160 replies
8/14btrfs: use btrfs_read_node_slot in qgroup_trace_extent_swapfs/btrfs/qgroup.c+1 -120 replies
9/14btrfs: use btrfs_read_node_slot in qgroup_trace_new_subtree_blocksfs/btrfs/qgroup.c+2 -110 replies
10/14btrfs: use btrfs_read_node_slot in btrfs_qgroup_trace_subtreefs/btrfs/qgroup.c+3 -120 replies
11/14btrfs: pass root owner to read_tree_blockfs/btrfs/backref.c fs/btrfs/ctree.c fs/btrfs/disk-io.c +5 more+25 -180 replies
12/14btrfs: pass the root owner and level around for readafs/btrfs/reada.c+18 -60 replies
13/14btrfs: pass the owner_root and level to alloc_extent_bufferfs/btrfs/disk-io.c fs/btrfs/disk-io.h fs/btrfs/extent-tree.c +6 more+34 -180 replies
14/14btrfs: set the lockdep class for ebs on creationfs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/extent_io.c +1 more+6 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] Set the lockdep class on eb's at allocation time

Hello,

We've had a lockdep splat show up a few times recently where the extent buffer doesn't have it's lockdep class set properly. This can happen if you have concurrent readers hitting the same block that's not in cache.

This is sort of straightforward to fix, but unfortunately requires quite a bit of code churn to do it cleanly. The bulck of these patches are replacing open coded calls of btrfs_read_node_slot() with the helper to cut down on the number of people directly calling read_tree_block(). I also cleaned up the readahead helpers because passing all these arguments around would be unweildy. The last patch in the series is the actual fix for what Filipe and Fedora QA saw.

The patches that actually have meaningful changes are

btrfs: remove lockdep classes for the fs tree
btrfs: cleanup extent buffer readahead
btrfs: set the lockdep class for ebs on creation

The rest are cleanups or adding arguments to various functions, so aren't too tricky. I've put this through a quick xfstest run for sanity sake, it didn't appear to break anything, but the full run is still going. Thanks,

Josef

Josef Bacik (14):
btrfs: remove lockdep classes for the fs tree
btrfs: cleanup extent buffer readahead
btrfs: use btrfs_read_node_slot in btrfs_realloc_node
btrfs: use btrfs_read_node_slot in walk_down_reloc_tree
btrfs: use btrfs_read_node_slot in do_relocation
btrfs: use btrfs_read_node_slot in replace_path
btrfs: use btrfs_read_node_slot in walk_down_tree
btrfs: use btrfs_read_node_slot in qgroup_trace_extent_swap
btrfs: use btrfs_read_node_slot in qgroup_trace_new_subtree_blocks
btrfs: use btrfs_read_node_slot in btrfs_qgroup_trace_subtree
btrfs: pass root owner to read_tree_block
btrfs: pass the root owner and level around for reada
btrfs: pass the owner_root and level to alloc_extent_buffer
btrfs: set the lockdep class for ebs on creation

 fs/btrfs/backref.c     |  6 +--
 fs/btrfs/ctree.c       | 86 +++++++++---------------------------------
 fs/btrfs/disk-io.c     | 41 +++++++-------------
 fs/btrfs/disk-io.h     |  8 ++--
 fs/btrfs/extent-tree.c | 20 ++++++----
 fs/btrfs/extent_io.c   | 55 ++++++++++++++++++++++++++-
 fs/btrfs/extent_io.h   |  6 ++-
 fs/btrfs/print-tree.c  |  1 +
 fs/btrfs/qgroup.c      | 43 ++++-----------------
 fs/btrfs/reada.c       | 32 +++++++++++-----
 fs/btrfs/ref-verify.c  | 18 +--------
 fs/btrfs/relocation.c  | 45 +++++-----------------
 fs/btrfs/tree-log.c    |  4 +-
 fs/btrfs/volumes.c     | 12 ++----
 14 files changed, 157 insertions(+), 220 deletions(-)
Signature · 1 line
2.26.2