[PATCH rfc 1/2] nvme: support smart read-only critical warning event

Sagi Grimberg sagi at grimberg.me
Mon Dec 4 23:28:53 PST 2017


>> In case a controller sent us a critical warning AER,
>> we should query the smart information and in case the
>> media was placed in read only mode, we need to set
>> all the controller namespaces (and the namespaces heads)
>> in read-only (or set to rw in case its not set).
>>
>> Given that in fabrics we may also connect to a read-only
>> subsystem, we add the disk as read-only to start with.
>> Once the subsystem will be in rw mode, we restore
>> the disk rw permissions.
> 
> We are sending the smart log notification on to userspace, so with this
> we now have two parties that are trying to clear the log page..

Not at the moment, but soon we will send smart logs to userspace, yes.

I guess we have two choices for this:

1. let userspace handle it and expose a knob to modify all controller
namespaces to r/o.

2. handle the event in the kernel, issue the log page with retain bit on
and only then notify userspace.

I personally prefer (2), what do others think?



More information about the Linux-nvme mailing list