From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 09/12] nvme: properly free resources for cancelled command
Date: Tue, 10 Nov 2015 20:28:11 +0000 [thread overview]
Message-ID: <20151110202811.GA6506@localhost.localdomain> (raw)
In-Reply-To: <20151110160344.GB31697@localhost.localdomain>
On Tue, Nov 10, 2015@04:03:45PM +0000, Keith Busch wrote:
> On Tue, Nov 10, 2015@09:13:57AM +0100, Christoph Hellwig wrote:
> > Set Features for set_queue_count times out we'll call the reset handler,
> > which because we are inside the probe handler will remove the device.
> > How do we care about the return value in that case?
> >
> > Can you write down a few sentences on why/how we care? I'll volunteer
> > to put them into the driver in comment form once we have all this sorted
> > out so that anyone touching the driver in the future won't be as confused.
>
> Perhaps I am thinking how probing serially worked before, and don't
> understand how this works anymore. :)
>
> You're right, we don't really care anymore if the reset handler unwinds
> it. This path is then safe to see a fake error code.
Actually this still needs to be a negative error so nvme_reset_work
doesn't clear "NVME_CTRL_RESETTING" bit. Without that, the driver gets
in an infinite reset loop.
> But the reset handler is the same "work" as probe now, so it won't get
> scheduled. Now I completely understand why we changed nvme_timeout()
> to end the request with -EIO instead of waiting for the reset work to
> cancel it. That's still unsafe since it frees the command for reuse
> while the ID is still technically owned by the controller.
next prev parent reply other threads:[~2015-11-10 20:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-07 8:44 nvme completion path optimizations and fixes V3 Christoph Hellwig
2015-11-07 8:44 ` [PATCH 01/12] block: fix blk_abort_request for blk-mq drivers Christoph Hellwig
2015-11-07 8:44 ` [PATCH 02/12] block: defer timeouts to a workqueue Christoph Hellwig
2015-11-07 8:44 ` [PATCH 03/12] nvme: factor out a nvme_unmap_data helper Christoph Hellwig
2015-11-09 18:47 ` Keith Busch
2015-11-09 18:56 ` Christoph Hellwig
2015-11-07 8:44 ` [PATCH 04/12] nvme: factor out a few helpers from req_completion Christoph Hellwig
2015-11-07 8:44 ` [PATCH 05/12] nvme: switch delete SQ/CQ to blk_execute_rq_nowait Christoph Hellwig
2015-11-07 8:45 ` [PATCH 06/12] nvme: switch abort " Christoph Hellwig
2015-11-09 21:33 ` Keith Busch
2015-11-09 21:46 ` Jens Axboe
2015-11-10 5:56 ` Christoph Hellwig
2015-11-07 8:45 ` [PATCH 07/12] nvme: special case AEN requests Christoph Hellwig
2015-11-09 21:43 ` Keith Busch
2015-11-09 21:48 ` Jens Axboe
2015-11-10 5:57 ` Christoph Hellwig
2015-11-07 8:45 ` [PATCH 08/12] nvme: simplify completion handling Christoph Hellwig
2015-11-07 8:45 ` [PATCH 09/12] nvme: properly free resources for cancelled command Christoph Hellwig
2015-11-09 18:57 ` Keith Busch
2015-11-09 19:25 ` Christoph Hellwig
2015-11-09 20:12 ` Keith Busch
2015-11-10 8:13 ` Christoph Hellwig
2015-11-10 16:03 ` Keith Busch
2015-11-10 20:28 ` Keith Busch [this message]
2015-11-16 10:05 ` Christoph Hellwig
2015-11-07 8:45 ` [PATCH 10/12] nvme: meta_sg doesn't have to be an array Christoph Hellwig
2015-11-07 8:45 ` [PATCH 11/12] nvme: merge iod and cmd_info Christoph Hellwig
2015-11-07 8:45 ` [PATCH 12/12] block: remove REQ_NO_TIMEOUT flag Christoph Hellwig
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=20151110202811.GA6506@localhost.localdomain \
--to=keith.busch@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).