[PATCH] nvmet: return 'namespace not ready' for disabled namespaces
Sagi Grimberg
sagi at grimberg.me
Mon Aug 19 07:22:18 PDT 2024
On 19/08/2024 16:54, Hannes Reinecke wrote:
> On 8/19/24 15:17, Sagi Grimberg wrote:
>>
>>
>>
>> On 19/08/2024 15:29, Hannes Reinecke wrote:
>>> When a namespace is disabled from configfs returning 'path error'
>>> is quite an odd choice; the actual description for that error is:
>>> 'The command was not completed as a result of a controller internal
>>> error that is specific to the controller processing the command.'
>>> Which is not the case here; once disabled the namespace is disabled
>>> for the entire subsystem, not just the controller.
>>> So return 'namespace not ready' here to clarify the problem.
>>
>> Hannes, can you explain what this patch is solving?
>>
>> The reason why this error was selected is because this is a path
>> error, which will trigger a host IO failover.
>
> ???
>
> This is not a path error.
Depends on how you interpret it.
>
> # echo 0 >
> /sys/kernel/config/nvmet/subsystems/<NQN>/namespaces/<NSID>/enable
>
> will disable the namespace for all controllers. Not just the individual
> path (as there is not individual path). Failover won't change anything.
subsystems in nvmet based implementations are not limited to a single
server.
The originated reporter ran a subsystem over multiple hosts with drbd as the
backend.
In this case, disabled NS does need to signal a path error, and hence
why a path
error was chosen.
If you want to change that, please make sure that io failover works as
expected
in this case as well.
More information about the Linux-nvme
mailing list