All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: mwilck@suse.com
Cc: Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	linux-nvme@lists.infradead.org, Hannes Reinecke <hare@suse.de>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2] nvme: avoid "(efault)" from nvme_sysfs_show_subsysnqn()
Date: Tue, 2 Feb 2021 08:58:28 +0100	[thread overview]
Message-ID: <20210202075828.GA12160@lst.de> (raw)
In-Reply-To: <20210202005951.26614-1-mwilck@suse.com>

On Tue, Feb 02, 2021 at 01:59:51AM +0100, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> While a controller is still connecting, ctrl->subsys is NULL and
> thus reading the controller's "subsysnqn" sysfs attribute returns
> "(efault)". This happens all the time when user space processes
> "add" events for NVMe controller devices.
> 
> Fix it by returning the nvmf_ctrl_options' subsysnqn attribute
> if ctrl->subsys isn't initialized yet.

This is just papering over symptoms.  We should not be sending
events or display sysfs files until the controlle is live.

In other wwords - I think we should remove the cdev_device_add
from nvme_init_ctrl to nvme_start_ctrl (+ any error handling changes
resulting from that).

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

  parent reply	other threads:[~2021-02-02  7:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  0:59 [PATCH v2] nvme: avoid "(efault)" from nvme_sysfs_show_subsysnqn() mwilck
2021-02-02  1:34 ` Chaitanya Kulkarni
2021-02-02  7:58 ` Christoph Hellwig [this message]
2021-02-03 10:01   ` Sagi Grimberg
2021-02-03 12:31   ` Martin Wilck
2021-02-03 16:51     ` Christoph Hellwig
2021-02-03 16:52     ` Keith Busch
2021-02-03 22:19       ` Sagi Grimberg
2021-02-04  2:42         ` Keith Busch
2021-02-04  7:44           ` Sagi Grimberg

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=20210202075828.GA12160@lst.de \
    --to=hch@lst.de \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=hare@suse.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mwilck@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.