btrfs: fix deadlock with fsync and full sync
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 2 repliesIn review
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Make btrfs_sync_file also use the new BTRFS_LOG_FORCE_COMMIT define.
- Adjust the title of the second patch
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: make the return value for log syncing consistentfs/ fs/ fs/ | +13 | 0 replies | |
| 2/2 | btrfs: fix deadlock with fsync+fiemap+transaction commitfs/ | +52 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Filipe Manana |
|---|---|
| Series | R-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 v2 0/2] btrfs: fix deadlock with fsync and full sync
v1->v2:
- Make btrfs_sync_file also use the new BTRFS_LOG_FORCE_COMMIT define.
- Adjust the title of the second patch
--- Original email ---
Hello,
We've hit a pretty convoluted deadlock in production that Omar tracked down with drgn. I've described the deadlock in the second patch, but generally it's a lock inversion where we have an existing dependency of extent lock -> transaction, but in fsync in a few cases we can end up with transaction -> extent lock, and the expected hilarity ensues. Thanks,
Josef
Josef Bacik (2):
btrfs: make the return value for log syncing consistent
btrfs: fix deadlock with fsync+fiemap+transaction commit
fs/btrfs/file.c | 69 ++++++++++++++++++++++++++++++++++----------- fs/btrfs/tree-log.c | 18 ++++++------ fs/btrfs/tree-log.h | 3 ++ 3 files changed, 65 insertions(+), 25 deletions(-)
Signature · 1 line
2.26.3