btrfs: eliminate a deadlock when allocating system chunks and rework chunk allocation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: fix deadlock with concurrent chunk allocations involving system chunksfs/ fs/ fs/ | +1 | 0 replies | |
| 2/2 | btrfs: rework chunk allocation to avoid exhaustion of the system chunk arrayfs/ fs/ fs/ +4 more | +546 | 2 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Shin'ichiro Kawasaki | Naohiro Aota |
|---|---|---|
| Series | T-b | T-b |
| 1/2 | ||
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] btrfs: eliminate a deadlock when allocating system chunks and rework chunk allocation
From: Filipe Manana <[email protected]>
The first patch eliminates a deadlock when multiple tasks need to allocate a system chunk. It reverts a previous fix for a problem that resulted in exhausting the system chunk array and result in a transaction abort when there are many tasks allocating chunks in parallel. Since there is not a simple and short fix for the deadlock that does not bring back the system array exhaustion problem, and the deadlock is relatively easy to trigger on zoned filesystem while the exhaustion problem is not so common, this first patch just revets that previous fix.
The second patch reworks a bit of the chunk allocation code so that we don't hold onto reserved system space from phase 1 to phase 2 of chunk allocation, which is what leads to system chunk array exhaustion when there's a bunch of tasks doing chunks allocations in parallel (initially observed on PowerPC, with a 64K node size, when running the fallocate tests from stress-ng). The diff of this patch is quite big, but about half of it are just comments.
Filipe Manana (2):
btrfs: fix deadlock with concurrent chunk allocations involving system
chunks
btrfs: rework chunk allocation to avoid exhaustion of the system chunk
array
fs/btrfs/block-group.c | 343 ++++++++++++++++++++++++++++----------- fs/btrfs/block-group.h | 6 +- fs/btrfs/ctree.c | 67 ++------ fs/btrfs/transaction.c | 15 +- fs/btrfs/transaction.h | 9 +- fs/btrfs/volumes.c | 355 +++++++++++++++++++++++++++++++---------- fs/btrfs/volumes.h | 5 +- 7 files changed, 547 insertions(+), 253 deletions(-)
Signature · 1 line
2.28.0