Skip to content

btrfs: fix a deadlock between chunk allocation and chunk tree modifications

[email protected] linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 6 repliesIn review
  2. v22 patches 8 repliesSuperseded
  3. v12 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: fix deadlock between chunk allocation and chunk btree modificationsfs/btrfs/block-group.c fs/btrfs/block-group.h fs/btrfs/relocation.c +1 more+110 -564 replies
2/2btrfs: update comments for chunk allocation -ENOSPC casesfs/btrfs/block-group.c+18 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJosef Bacik
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] btrfs: fix a deadlock between chunk allocation and chunk tree modifications

From: Filipe Manana <[email protected]>

This fixes a deadlock between a task allocating a metadata or data chunk and a task that is modifying the chunk btree and it's not in a chunk allocation or removal context. The first patch is the fix, the second one just updates a couple comments and it's independent of the fix.

v2: Updated stale comment after the fix (patch 1/2).

v3: Moved the logic to reserve chunk space out of btrfs_search_slot() into
every path that modifies the chunk btree (which are the cases listed in the change log of patch 1/2) and updated two more comments in patch 1/2.

Filipe Manana (2):
btrfs: fix deadlock between chunk allocation and chunk btree modifications
btrfs: update comments for chunk allocation -ENOSPC cases

 fs/btrfs/block-group.c | 166 +++++++++++++++++++++++++++--------------
 fs/btrfs/block-group.h |   2 +
 fs/btrfs/relocation.c  |   4 +
 fs/btrfs/volumes.c     |  15 +++-
 4 files changed, 128 insertions(+), 59 deletions(-)
Signature · 1 line
2.33.0