[PATCH 3/4] nvme-fabrics: add tp8010 support

Hannes Reinecke hare at suse.de
Wed Feb 2 00:36:29 PST 2022


On 1/31/22 17:16, Belanger, Martin wrote:
> 
>>> Hi Sagi. Thanks for the code snippet. I just had a question about your
>> comment.
>>>
>>> You say that you don’t see any point to send an event on the
>>> disconnect because it is async.  I don’t quite understand that part.
>>> For example, I've observed that when connectivity is lost the kernel
>>> will try to connect every
>>> 10 sec. And it will keep trying to connect 60 times (i.e. 10 min)
>>> before giving up. Wouldn't sending an "offline" event when
>>> connectivity is lost give user space apps a heads up that the nvme device
>> may not respond.
>>
>> Why does userspace need it?
>>
>> When the host will disconnect it will send event asynchronously, so
>> userspace cannot reliably do anything before the host disconnects.
>> Other than that I don't understand what would userspace do with "offline -
>> I/O is going to fail"...
> 
> I was just asking for completeness. Some apps may use it.
> 
We had a similar discussion during udev development; originally we had 
KOBJ_ONLINE and KOBJ_OFFLINE uevents
Turned out that the KOBJ_OFFLINE events were quite pointless (as Sagi 
indicated), and hence we settled on a single KOBJ_CHANGE event which 
typically is sent when a device/system gets back online.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list