public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me,
	Keith Busch <kbusch@kernel.org>, Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH] nvme: ensure disabling pairs with unquiesce
Date: Thu, 6 Jul 2023 14:51:34 +0200	[thread overview]
Message-ID: <20230706125134.GA12730@lst.de> (raw)
In-Reply-To: <20230630174706.3807872-1-kbusch@meta.com>

> +static int nvme_disable_prepare_reset(struct nvme_dev *dev, bool shutdown);

Can we rename nvme_disable_prepare_reset while we're at it?  The
name already is a bit suboptimal in the xisting code, but with
the new calles becomes really confusing.

nvme_pci_wait_for_reset_and_disable is what I could come up with.
It feels a bit too verbose, but at least it's descriptive.

> +disable:
> +	if (!nvme_disable_prepare_reset(dev, false) &&
> +	    nvme_try_sched_reset(&dev->ctrl))

Why do we wait for a reset just to schedule another reset here?

Also I feel splitting out the changes to wait for reset from those
that add the unquiesce when we can't reset into another patch
would probably help beeing able to understand the changes here.


  reply	other threads:[~2023-07-06 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 17:47 [PATCH] nvme: ensure disabling pairs with unquiesce Keith Busch
2023-07-06 12:51 ` Christoph Hellwig [this message]
2023-07-06 15:24   ` Keith Busch

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=20230706125134.GA12730@lst.de \
    --to=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    /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