[PATCH V3 2/8] nvme: add sysfs attribute to change admin timeout per nvme controller
Hannes Reinecke
hare at suse.de
Thu Apr 23 06:45:33 PDT 2026
On 4/23/26 14:46, Daniel Wagner wrote:
> On Wed, Apr 22, 2026 at 01:08:44PM +0200, Maurizio Lombardi wrote:
>> On Wed Apr 22, 2026 at 12:10 PM CEST, Daniel Wagner wrote:
>>> On Fri, Apr 10, 2026 at 09:39:18AM +0200, Maurizio Lombardi wrote:
>>>> + /*
>>>> + * Wait until the controller reaches the LIVE state
>>>> + * to be sure that admin_q and fabrics_q are
>>>> + * properly initialized.
>>>> + */
>>>> + if (!test_bit(NVME_CTRL_STARTED_ONCE, &ctrl->flags))
>>>> + return -EBUSY;
>>>
>>> I assume the idea is to use an udev rule to set the value. Though I
>>> think this is racy:
>>>
>>> nvme_change_uevent(ctrl, "NVME_EVENT=connected");
>>> set_bit(NVME_CTRL_STARTED_ONCE, &ctrl->flags);
>>
>>
>> Not really, the idea was about to prevent the user from setting the
>> timeouts too early during the controller's initialization.
>
> Yes, but then how do you know when is too early? Do you read/poll the
> state of the controller?
>
Well, a timeout less than KATO is questionable, as we cannot detect any
timeouts reliably until then. So having a KATO of 20 seconds with a
command timeout of 10 seconds will be pointless.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list