diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-18 15:50:42 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-18 15:50:42 +0300 |
commit | b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9 (patch) | |
tree | b71ed4906bbe2ca96d68dbf1d6d6f0fe2676f1de /drivers/md/dm-rq.c | |
parent | 4e52cb9e2c22c9d860910794c82461064baadd9f (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | linux-b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9.tar.xz |
Merge tag 'v5.15-rc6' into asoc-5.16
Linux 5.15-rc6
Diffstat (limited to 'drivers/md/dm-rq.c')
-rw-r--r-- | drivers/md/dm-rq.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 5b95eea517d1..a896dea9750e 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -490,6 +490,14 @@ static blk_status_t dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx, struct mapped_device *md = tio->md; struct dm_target *ti = md->immutable_target; + /* + * blk-mq's unquiesce may come from outside events, such as + * elevator switch, updating nr_requests or others, and request may + * come during suspend, so simply ask for blk-mq to requeue it. + */ + if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags))) + return BLK_STS_RESOURCE; + if (unlikely(!ti)) { int srcu_idx; struct dm_table *map = dm_get_live_table(md, &srcu_idx); |