XFS: Fix growfs deadlocks and per-AG use after free V3
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 12 repliesIn 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 | 2 replies | |
| 2/6 | XFS: Don't directly reference m_perag in allocation codefs/ fs/ | +52 | 2 replies | |
| 3/6 | XFS: Convert filestreams code to use per-ag get/put routinesfs/ fs/ | +36 | 1 reply | |
| 4/6 | XFS: convert remaining direct references to m_peragfs/ fs/ fs/ +1 more | +42 | 1 reply | |
| 5/6 | XFS: Replace per-ag array with a radix treefs/ fs/ fs/ +5 more | +86 | 3 replies | |
| 6/6 | XFS: Reference count per-ag structuresfs/ fs/ fs/ | +12 | 1 reply |
Reviews trailers per patch
3 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Alex Elder |
|---|---|
| Series | R-b |
| 1/6 | |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | |
| 5/6 | |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] XFS: Fix growfs deadlocks and per-AG use after free V3
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 3: Rebase for current upstream tree.
Version 2: Fix review comments from Christoph.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs