[PATCH 2/5] nvme: introduce a controller state machine
Sagi Grimberg
sagi at grimberg.me
Tue Apr 19 11:35:20 PDT 2016
>>>>> - clear_bit(NVME_CTRL_RESETTING, &dev->flags);
>>>>> + if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_LIVE)) {
>>>>> + dev_warn(dev->ctrl.device, "failed to mark controller live\n");
>>>>> + goto out;
>>>>> + }
>>>>> return;
>>>>>
>>>>> out:
>>>>
>>>> You're missing a state change before removing a
>>>> dead controller...
>>>
>>> why?
>>
>> Just to have the state consistent with what the driver
>> is doing. Not a must though...
>
> Let's allocate states on an as needed basis and avoid that new
> state for now.
Didn't mean a new state, just a transition to NVME_CTRL_DELETING
if nvme_reset_work fails...
More information about the Linux-nvme
mailing list