[PATCH 1/1] nvme-fabrics: Generate uevent on namespace AENs

Rao, Vinay Vinay.Rao at dell.com
Fri Apr 30 06:14:55 BST 2021


+ Madhu

Hi Chaitanya, 

Some of the AEN's like ANA state change and Name Space attribute change events are of interest outside the NVME driver. 

It would be good to consider these events to be propagated up to user space. I am not yet convinced on how propagating this above to user space is problematic. 

Vinay

-----Original Message-----
From: Chaitanya Kulkarni <Chaitanya.Kulkarni at wdc.com> 
Sent: Thursday, April 29, 2021 11:52 PM
To: Belanger, Martin; Rao, Vinay; Hayes, Stuart
Cc: Christoph Hellwig; Martin Belanger; linux-nvme at lists.infradead.org; kbusch at kernel.org; axboe at fb.com; sagi at grimberg.me
Subject: Re: [PATCH 1/1] nvme-fabrics: Generate uevent on namespace AENs


[EXTERNAL EMAIL] 

On 4/29/21 10:09, Belanger, Martin wrote:
> ++Vinay Rao, Stuart Hayes.
>
> ________________________________________
> From: Christoph Hellwig <hch at lst.de>
> Sent: Thursday, April 29, 2021 02:30
> To: Martin Belanger
> Cc: linux-nvme at lists.infradead.org; kbusch at kernel.org; axboe at fb.com; 
> hch at lst.de; sagi at grimberg.me; Belanger, Martin; Belanger, Martin
> Subject: Re: [PATCH 1/1] nvme-fabrics: Generate uevent on namespace 
> AENs
>
>
> [EXTERNAL EMAIL]
>
> On Wed, Apr 28, 2021 at 04:18:25PM -0400, Martin Belanger wrote:
>> From: Martin Belanger <martin.belanger at dell.com>
>>
>> Generate uevent on NVMe Async Event Notifications for NS_CHANGED and 
>> ANA. Today the uevent handler is not capturing on 
>> NVME_AER_NOTICE_NS_CHANGED (Namespace Changed) and NVME_AER_NOTICE_ANA (Asymmetric Namespace Access).
> So the problem with these events is that they are only really useful 
> to then issue the Get Log Page command for the corresponding log page.
> But reading the log page will clear the contents of the log page.  
> That is if userspace races to do this first it will completely mess up 
> the funtionality in the kernel.
>
> This is a bit of an unfortunately design issue in the NVMe protocol.
>
> Maybe you can explain you use case in a little more detail so that we 
> can figure out what we can do instead.

>From the patch that I sent on the same topic to enforce a particular behavior either way, I remember that we've decided not to change the kernel code for usespace.





More information about the Linux-nvme mailing list