Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/2] blk-mq: Export iterating all tagged requests
Date: Sat, 1 Dec 2018 17:48:04 +0100	[thread overview]
Message-ID: <20181201164804.GB19557@lst.de> (raw)
In-Reply-To: <823fc3bf-78a4-c8fb-c80c-e3944f320af0@kernel.dk>

On Fri, Nov 30, 2018@01:36:09PM -0700, Jens Axboe wrote:
> On 11/30/18 1:26 PM, Keith Busch wrote:
> > A driver may wish to iterate every tagged request, not just ones that
> > satisfy blk_mq_request_started(). The intended use is so a driver may
> > terminate entered requests on quiesced queues.
> 
> How about we just move the started check into the handler passed in for
> those that care about it? Much saner to make the interface iterate
> everything, and leave whatever state check to the callback.

So we used to do that, and I changed it back in May to test for
MQ_RQ_IN_FLIGHT, and then Ming changed it to check
blk_mq_request_started.  So this is clearly a minefield of sorts..

Note that at least mtip32xx, nbd, skd and the various nvme transports
want to use the function to terminate all requests in the error
path, and it would be great to have one single understood, documented
and debugged helper for that in the core, so this is a vote for moving
more of the logic in your second helper into the core code.  skd
will need actually use ->complete to release resources for that, though
and mtip plays some odd abort bits.  If it weren't for the interesting
abort behavior in nvme-fc that means we could even unexport the
low-level interface.

  parent reply	other threads:[~2018-12-01 16:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 20:26 [PATCH 1/2] blk-mq: Export iterating all tagged requests Keith Busch
2018-11-30 20:26 ` [PATCH 2/2] nvme: Remove queue flushing hack Keith Busch
2018-11-30 20:36 ` [PATCH 1/2] blk-mq: Export iterating all tagged requests Jens Axboe
2018-11-30 20:39   ` Keith Busch
2018-12-01 16:48   ` Christoph Hellwig [this message]
2018-12-01 17:11     ` Hannes Reinecke
2018-12-01 18:32       ` Bart Van Assche
2018-12-03 18:57         ` James Smart
2018-12-04  1:33       ` Sagi Grimberg
2018-12-04 15:46         ` Keith Busch
2018-12-04 16:26           ` James Smart
2018-12-04 17:23             ` Sagi Grimberg
2018-12-04 19:13               ` James Smart
2018-12-04 17:38           ` Sagi Grimberg
2018-12-04 17:48             ` Keith Busch
2018-12-04 19:33               ` James Smart
2018-12-04 21:21                 ` Keith Busch
2018-12-04 21:43                   ` Keith Busch
2018-12-04 22:09                   ` James Smart
2018-12-03  7:44     ` Ming Lei

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=20181201164804.GB19557@lst.de \
    --to=hch@lst.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox