diff options
| author | Mike Snitzer <snitzer@redhat.com> | 2017-11-20 09:55:44 -0500 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2017-11-20 11:02:50 -0500 |
| commit | c9fdc42ba23eabd1ba7aef199fb9bb4b4fe5c545 (patch) | |
| tree | 0d16f66168418e400e092bd31051e26b207d637a | |
| parent | 06ede5f6086757f746b7be860ae76137f4e95032 (diff) | |
| download | linux-dm-c9fdc42ba23eabd1ba7aef199fb9bb4b4fe5c545.tar.gz | |
dm: remove use of BIOSET_NEED_RESCUER
Notice: this object is not reachable from any branch.
DM already attempted to kill the "bioset" thread once with commit
dbba42d8 ("dm: eliminate unused "bioset" process for each bio-based DM
device"). At the time it was associated with the q->bio_split bio_set
(which implicitly used/introduced the "bioset" rescuer thread).
With commit 47e0fb461f ("blk: make the bioset rescue_workqueue
optional.") the "bioset" thread was reintroduced for DM devices because
all DM bio_set allocations were inverted to opt-in to allocating the
rescue_workqueue by setting BIOSET_NEED_RESCUER. Kind of staggering
that commit 47e0fb461f was introduced without any DM Signed-off-by (nor
was any DM maintainer/developer cc'd on the original patch!)
Fact is DM doesn't have a need for BIOSET_NEED_RESCUER. Especially so
given commit d67a5f4b59 ("dm: flush queued bios when process blocks to
avoid deadlock").
That said, it would be nice if block core (and DM) could be made to
reliably fix the deadlock that commit d67a5f4b59 fixes. But previous
attempts to do so (Neil Brown has had a couple) have not worked. Until
that changes, requires time and effort, return DM back to the way it
was.
Fixes: 47e0fb461f ("blk: make the bioset rescue_workqueue optional.")
Cc: stable@vger.kernel.org # 4.13+
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Notice: this object is not reachable from any branch.
| -rw-r--r-- | drivers/md/dm-crypt.c | 3 | ||||
| -rw-r--r-- | drivers/md/dm-io.c | 3 | ||||
| -rw-r--r-- | drivers/md/dm.c | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 9fc12f556534b..9c53367d2f3ee 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2697,8 +2697,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad; } - cc->bs = bioset_create(MIN_IOS, 0, (BIOSET_NEED_BVECS | - BIOSET_NEED_RESCUER)); + cc->bs = bioset_create(MIN_IOS, 0, BIOSET_NEED_BVECS); if (!cc->bs) { ti->error = "Cannot allocate crypt bioset"; goto bad; diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index b4357ed4d5416..a8d914d5abbe6 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -58,8 +58,7 @@ struct dm_io_client *dm_io_client_create(void) if (!client->pool) goto bad; - client->bios = bioset_create(min_ios, 0, (BIOSET_NEED_BVECS | - BIOSET_NEED_RESCUER)); + client->bios = bioset_create(min_ios, 0, BIOSET_NEED_BVECS); if (!client->bios) goto bad; diff --git a/drivers/md/dm.c b/drivers/md/dm.c index de17b7193299f..a5df5691f8c81 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1141,8 +1141,7 @@ static void flush_current_bio_list(struct blk_plug_cb *cb, bool from_schedule) while ((bio = bio_list_pop(&list))) { struct bio_set *bs = bio->bi_pool; - if (unlikely(!bs) || bs == fs_bio_set || - !bs->rescue_workqueue) { + if (unlikely(!bs) || bs == fs_bio_set) { bio_list_add(¤t->bio_list[i], bio); continue; } @@ -2764,7 +2763,7 @@ struct dm_md_mempools *dm_alloc_md_mempools(struct mapped_device *md, enum dm_qu BUG(); } - pools->bs = bioset_create(pool_size, front_pad, BIOSET_NEED_RESCUER); + pools->bs = bioset_create(pool_size, front_pad, 0); if (!pools->bs) goto out; |
