[PATCH] nvme: block ioctls if controller not in a live state
James Smart
james.smart at broadcom.com
Mon May 14 07:47:46 PDT 2018
On 5/14/2018 7:17 AM, Christoph Hellwig wrote:
> On Wed, May 09, 2018 at 09:29:13AM -0700, James Smart wrote:
>> That is the exact intent. I do want the app to trigger off -EAGAIN in those
>> two states and try again after a delay./ Perhaps I should change from !LIVE
>> to NEW || RESETTING || CONNECTING to be more explicit. I assumed !LIVE was
>> sufficient as the other states should transition to LIVE or the delete path
>> is taken which would remove the fd all together.
> The problem is that userspace reasonably expects to be able to call
> poll/select when used on a character device and it gets -EAGAIN.
What's stopping us from adding poll support to the dev node ?
>
> Maybe the right solution here is to just do a wait_event_interruptible to
> wait for the controller being live.
That's doable. I don't like hanging the app up for what could be 60s or
so though (controller loss timeout).
--james
More information about the Linux-nvme
mailing list