[PATCH] nvme: Boot as soon as the boot controller has been probed

Keith Busch kbusch at kernel.org
Mon Nov 9 10:05:17 EST 2020


On Sun, Nov 08, 2020 at 08:00:42PM -0800, Bart Van Assche wrote:
> On 11/8/20 6:35 PM, Keith Busch wrote:
> > The only user space visible artifact the driver creates on bind is the
> > controller character device, and access to that during a reset is
> > handled by the driver's state machine.
> 
> Hi Keith,
> 
> Is nvme_dev_fops associated with that character device? If so, in
> nvme_dev_open() I found the following:
> 
> 	switch (ctrl->state) {
> 	case NVME_CTRL_LIVE:
> 		break;
> 	default:
> 		return -EWOULDBLOCK;
> 	}
> 
> Does this mean that nvme-cli will succeed or fail depending on whether
> or not nvme_reset_work() has finished? Isn't that something that can
> cause trouble if nvme-cli is invoked from a udev rule?

Resets can happen at any time, so user space should always have been
prepared for this. Is there actually a real case that is not working for
you?



More information about the Linux-nvme mailing list