linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5]stop normal completion path entering a timeout req
@ 2018-06-20 13:22 Jianchao Wang
  2018-06-20 13:22 ` [PATCH 1/5] blk-mq: prevent normal completion from entering a timeout request Jianchao Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Jianchao Wang @ 2018-06-20 13:22 UTC (permalink / raw)
  To: axboe, hch, martin.petersen, keith.busch, josef, ulf.hansson
  Cc: linux-block, linux-scsi, linux-kernel

Dear all

scsi timeout and error handler are based on an assumption that normal
completion mustn't do anything on an timeout request. After 12f5b931
(blk-mq: Remove generation seqeunce), we lost this. __blk_mq_complete
request could ensure a request won't be completed twice, but it can
still complete a timeout request.
scsi (even other drivers) have been working on this assumption for many
years, it is dangerous to discard it suddenly. This patch set is to regain this.

1st patch
 - introduce blk_mq_mark_rq_complete in blk_mq_check_expired and blk_mq_complete_request
   to avoid the race between them.
 - blk_mq_complete_request cannot complete a timeout request anymore, so have to export
   __blk_mq_complete_request for LLDD timeout path
2nd ~ 5th patches
  replace the blk_mq_complete_request to __blk_mq_complete_request.

Jianchao Wang(5)
blk-mq: prevent normal completion from entering a timeout request
nbd: use __blk_mq_complete_request in timeout path
null_blk: use __blk_mq_complete_request in timeout path
mmc: use __blk_mq_complete_request in timeout path
nvme: use __blk_mq_complete_request in timeout path

 block/blk-mq.c             | 22 +++++++++++++++-------
 drivers/block/nbd.c        |  2 +-
 drivers/block/null_blk.c   |  2 +-
 drivers/mmc/core/queue.c   |  2 +-
 drivers/nvme/host/pci.c    |  8 ++++++++
 drivers/nvme/host/rdma.c   |  1 +
 drivers/nvme/target/loop.c |  1 +
 include/linux/blk-mq.h     |  1 +
 include/linux/blkdev.h     |  6 ++++++

Thanks
Jianchao

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

end of thread, other threads:[~2018-06-25 18:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-20 13:22 [PATCH 0/5]stop normal completion path entering a timeout req Jianchao Wang
2018-06-20 13:22 ` [PATCH 1/5] blk-mq: prevent normal completion from entering a timeout request Jianchao Wang
2018-06-20 13:22 ` [PATCH 2/5] nbd: use __blk_mq_complete_request in timeout path Jianchao Wang
2018-06-20 14:13   ` Josef Bacik
2018-06-20 13:22 ` [PATCH 3/5] null_blk: " Jianchao Wang
2018-06-20 13:22 ` [PATCH 4/5] mmc: " Jianchao Wang
2018-06-20 13:22 ` [PATCH 5/5] nvme: " Jianchao Wang
2018-06-20 14:39   ` Christoph Hellwig
2018-06-21  2:09     ` jianchao.wang
2018-06-24 18:07       ` Sagi Grimberg
2018-06-25  1:40         ` jianchao.wang
2018-06-25 18:51           ` Sagi Grimberg
2018-06-20 18:16 ` [PATCH 0/5]stop normal completion path entering a timeout req Keith Busch
2018-06-21  1:43   ` jianchao.wang
2018-06-21  8:19     ` Christoph Hellwig
2018-06-21  8:22       ` jianchao.wang
2018-06-22 15:10         ` Christoph Hellwig
2018-06-25  1:29           ` jianchao.wang
2018-06-21 13:13       ` jianchao.wang
2018-06-21 15:01         ` Keith Busch
2018-06-21 18:21       ` Bart Van Assche
2018-06-21 21:15         ` Keith Busch
2018-06-21 21:30           ` Bart Van Assche

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).