linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: fix direct dispatch issue failure for clones
@ 2018-12-06 22:20 Jens Axboe
  2018-12-06 22:21 ` Jens Axboe
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jens Axboe @ 2018-12-06 22:20 UTC (permalink / raw)
  To: linux-block@vger.kernel.org; +Cc: Bart Van Assche, Mike Snitzer

After the direct dispatch corruption fix, we permanently disallow direct
dispatch of non read/write requests. This works fine off the normal IO
path, as they will be retried like any other failed direct dispatch
request. But for the blk_insert_cloned_request() that only DM uses to
bypass the bottom level scheduler, we always first attempt direct
dispatch. For some types of requests, that's now a permanent failure,
and no amount of retrying will make that succeed.

Don't use direct dispatch off the cloned insert path, always just use
bypass inserts. This still bypasses the bottom level scheduler, which is
what DM wants.

Fixes: ffe81d45322c ("blk-mq: fix corruption with direct issue")
Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

diff --git a/block/blk-core.c b/block/blk-core.c
index deb56932f8c4..4c44e6fa0d08 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2637,7 +2637,8 @@ blk_status_t blk_insert_cloned_request(struct request_queue *q, struct request *
 		 * bypass a potential scheduler on the bottom device for
 		 * insert.
 		 */
-		return blk_mq_request_issue_directly(rq);
+		blk_mq_request_bypass_insert(rq, true);
+		return BLK_STS_OK;
 	}
 
 	spin_lock_irqsave(q->queue_lock, flags);

-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-12-07  2:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-06 22:20 [PATCH] block: fix direct dispatch issue failure for clones Jens Axboe
2018-12-06 22:21 ` Jens Axboe
2018-12-06 22:46   ` Bart Van Assche
2018-12-06 22:28 ` Mike Snitzer
2018-12-06 22:32   ` Jens Axboe
2018-12-07  1:04 ` [PATCH] " jianchao.wang
2018-12-07  1:13   ` Jens Axboe
2018-12-07  1:22     ` jianchao.wang
2018-12-07  1:34       ` Jens Axboe
2018-12-07  1:58         ` Mike Snitzer
2018-12-07  2:06           ` Jens Axboe
2018-12-07  2:16             ` Jens Axboe
2018-12-07  2:28               ` Jens Axboe
2018-12-07  2:10           ` Mike Snitzer
2018-12-07  2:05         ` [PATCH] " jianchao.wang
2018-12-07  1:41     ` Mike Snitzer
2018-12-07  1:20   ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).