XFS: Fix growfs deadlocks and per-AG use after free V2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | XFS: rename xfs_get_peragfs/ fs/ fs/ +1 more | +35 | 0 replies | |
| 2/6 | XFS: Don't directly reference m_perag in allocation codefs/ fs/ | +50 | 0 replies | |
| 3/6 | XFS: Convert filestreams code to use per-ag get/put routinesfs/ fs/ | +36 | 0 replies | |
| 4/6 | XFS: convert remaining direct references to m_peragfs/ fs/ fs/ +1 more | +42 | 0 replies | |
| 5/6 | XFS: Replace per-ag array with a radix treefs/ fs/ fs/ +5 more | +86 | 0 replies | |
| 6/6 | XFS: Reference count per-ag structuresfs/ fs/ fs/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] XFS: Fix growfs deadlocks and per-AG use after free V2
The use of an array for the xfs_perag structures results in growfs having to realocate the array. This requires exclusion to prevent use-after-free situations. The current locking is prone to deadlocks when growing under load, and the xfssyncd currently has no protection against the array being reallocated that can lead to panics.
This series abstracts the per-ag structure access and then removes the array to replace it with individual xfs_perag structures indexed by a radix tree. The only locking required is for the radix tree, hence the deadlocks go away as the tree lock is always the innermost lock. The use after frees go away as well as growfs does not need to reallocate structures fo pre-existing allocation groups - it only needs to allocate the structures for the new AGs and insert them into the tree.
This series also adds reference counting to the xfs-perag structure to ensure that we balance get/put accesses to the structures and provide the infrastructure to determine if the structure is in use or not.
Version 2: Fix review comments from Christoph.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs