From: Omar Sandoval <osandov@osandov.com>
To: linux-btrfs@vger.kernel.org
Cc: kernel-team@fb.com
Subject: [PATCH 0/7] btrfs: workqueue fixes+cleanups
Date: Mon, 16 Sep 2019 11:30:51 -0700 [thread overview]
Message-ID: <cover.1568658527.git.osandov@fb.com> (raw)
From: Omar Sandoval <osandov@fb.com>
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/20190821151803.cuyq2yzpdnwgwrmb@MacBook-Pro-91.local/
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(-)
--
2.23.0
next reply other threads:[~2019-09-16 18:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 18:30 Omar Sandoval [this message]
2019-09-16 18:30 ` [PATCH 1/7] btrfs: get rid of unnecessary memset() of work item Omar Sandoval
2019-09-17 11:46 ` Johannes Thumshirn
2019-09-16 18:30 ` [PATCH 2/7] btrfs: don't prematurely free work in run_ordered_work() Omar Sandoval
2019-09-17 12:04 ` Johannes Thumshirn
2019-09-16 18:30 ` [PATCH 3/7] btrfs: don't prematurely free work in end_workqueue_fn() Omar Sandoval
2019-09-17 12:05 ` Johannes Thumshirn
2019-09-16 18:30 ` [PATCH 4/7] btrfs: don't prematurely free work in reada_start_machine_worker() Omar Sandoval
2019-09-17 12:09 ` Johannes Thumshirn
2019-09-16 18:30 ` [PATCH 5/7] btrfs: don't prematurely free work in scrub_missing_raid56_worker() Omar Sandoval
2019-09-17 12:10 ` Johannes Thumshirn
2019-09-16 18:30 ` [PATCH 6/7] btrfs: get rid of unique workqueue helper functions Omar Sandoval
2019-09-16 18:30 ` [PATCH 7/7] btrfs: get rid of pointless wtag variable in async-thread.c Omar Sandoval
2019-09-24 14:45 ` [PATCH 0/7] btrfs: workqueue fixes+cleanups David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1568658527.git.osandov@fb.com \
--to=osandov@osandov.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.