btrfs: workqueue fixes+cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | btrfs: get rid of unnecessary memset() of work itemfs/ | +0 | 1 reply | |
| 2/7 | btrfs: don't prematurely free work in run_ordered_work()fs/ | +44 | 1 reply | |
| 3/7 | btrfs: don't prematurely free work in end_workqueue_fn()fs/ | +1 | 1 reply | |
| 4/7 | btrfs: don't prematurely free work in reada_start_machine_worker()fs/ | +4 | 1 reply | |
| 5/7 | btrfs: don't prematurely free work in scrub_missing_raid56_worker()fs/ | +1 | 1 reply | |
| 6/7 | btrfs: get rid of unique workqueue helper functionsfs/ fs/ fs/ +9 more | +50 | 0 replies | |
| 7/7 | btrfs: get rid of pointless wtag variable in async-thread.cfs/ include/ | +11 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Nikolay Borisov | Filipe Manana | Johannes Thumshirn |
|---|---|---|---|
| 1/7 | R-b | ||
| 2/7 | R-b | ||
| 3/7 | R-b | ||
| 4/7 | R-b | ||
| 5/7 | R-b | ||
| 6/7 | R-b | R-b | |
| 7/7 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/7] btrfs: workqueue fixes+cleanups
From: Omar Sandoval <[email protected]>
Hello,
This series fixes a few issues with Btrfs' use of workqueues.
The bulk of this series fixes multiple cases of the same bug: a work item shouldn't be freed while it potentially depends on any other work items. Currently, we've mostly been side-stepping this issue by having different work functions for different work types (see commit 9e0af2376434 ("Btrfs: fix task hang under heavy compressed write"). However, there are cases where a work function can depend on itself, usually through stacked filesystems (e.g., loop devices).
Patch 1 is a trivial cleanup.
Patches 2-5 fix all of the cases of this bug that I could find. Patch 2 is the ordered_free fix I previously sent [1], now with an updated title and Josef's fix [2] folded in. Patch 3 fixes the deadlock reported with my previous cleanup, and patches 4 and 5 fix similar issues.
With all of those fixed, patch 6 is my previous cleanup [3] to get rid of the different work functions. Patch 7 is the same cleanup [4] as from before.
Based on misc-next.
Thanks!
1: https://lore.kernel.org/linux-btrfs/0bea516a54b26e4e1c42e6fe47548cb48cc4172b.1565112813.git.osandov@fb.com/
2: https://lore.kernel.org/linux-btrfs/[email protected]/
3: https://lore.kernel.org/linux-btrfs/afaf532af471dd1a8a1f4af9de570127529323b0.1565717248.git.osandov@fb.com/
4: https://lore.kernel.org/linux-btrfs/d4fa1870ffce027ada265a67f4e00d397b683241.1565717248.git.osandov@fb.com/
Omar Sandoval (7):
btrfs: get rid of unnecessary memset() of work item
btrfs: don't prematurely free work in run_ordered_work()
btrfs: don't prematurely free work in end_workqueue_fn()
btrfs: don't prematurely free work in reada_start_machine_worker()
btrfs: don't prematurely free work in scrub_missing_raid56_worker()
btrfs: get rid of unique workqueue helper functions
btrfs: get rid of pointless wtag variable in async-thread.c
fs/btrfs/async-thread.c | 107 +++++++++++++++++------------------ fs/btrfs/async-thread.h | 33 +---------- fs/btrfs/block-group.c | 3 +- fs/btrfs/delayed-inode.c | 4 +- fs/btrfs/disk-io.c | 36 ++++-------- fs/btrfs/inode.c | 36 ++++-------- fs/btrfs/ordered-data.c | 1 - fs/btrfs/qgroup.c | 3 - fs/btrfs/raid56.c | 5 +- fs/btrfs/reada.c | 13 ++--- fs/btrfs/scrub.c | 17 +++--- fs/btrfs/volumes.c | 3 +- include/trace/events/btrfs.h | 6 +- 13 files changed, 97 insertions(+), 170 deletions(-)
Signature · 1 line
2.23.0