Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Cc: Keith Busch <kbusch@kernel.org>,
	"Nadolski, Edmund" <edmund.nadolski@intel.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH 1/2] nvme: remove unused return code from nvme_alloc_ns
Date: Tue, 26 Nov 2019 08:47:52 -0800
Message-ID: <20191126164752.GA10487@infradead.org> (raw)
In-Reply-To: <BYAPR04MB5749859E2636E3FCF355769386450@BYAPR04MB5749.namprd04.prod.outlook.com>

On Tue, Nov 26, 2019 at 04:01:11AM +0000, Chaitanya Kulkarni wrote:
> On 11/25/2019 09:07 AM, Keith Busch wrote:
> > It would be informative to just log the error that occurred so we have
> > something indicating why an expected namespace wasn't created. Otherwise,
> > I can't think of anything else the caller should do in response to an
> > error in this path.
> 
> Please do this, shouldn't be ignoring return value completely at first
> place.

Well, what would you do instead?  We call nvme_alloc_ns during the
initial probe and every reset / recan.  If we fail to allocate a
controller for whatever reason we'd much rather still have a working
controller with at least the admin queue and maybe other namespaces
rather than shutting everything down.  So just logging a message
inside nvme_alloc_ns as suggested by Keith sounds like a good idea to
me.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 16:06 [PATCH 0/2] A few code cleanups Edmund Nadolski
2019-11-25 16:06 ` [PATCH 1/2] nvme: remove unused return code from nvme_alloc_ns Edmund Nadolski
2019-11-25 16:09   ` Johannes Thumshirn
2019-11-25 16:46     ` Nadolski, Edmund
2019-11-25 17:06       ` Keith Busch
2019-11-26  4:01         ` Chaitanya Kulkarni
2019-11-26 16:47           ` Christoph Hellwig [this message]
2019-11-25 16:06 ` [PATCH 2/2] nvme: else following return is not needed Edmund Nadolski
2019-11-26 16:48   ` Christoph Hellwig
2019-11-26 17:38     ` Keith Busch

Reply instructions:

You may reply publically 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=20191126164752.GA10487@infradead.org \
    --to=hch@infradead.org \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=edmund.nadolski@intel.com \
    --cc=jthumshirn@suse.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git