[PATCH nvme-7.3 3/4] nvme-fabrics: add helpers for subsystem and host identity options

Christoph Hellwig hch at lst.de
Wed Sep 2 03:42:41 PDT 2026


On Sun, Aug 23, 2026 at 01:11:56AM +0300, Sagi Grimberg wrote:
>
>
> On 21/08/2026 9:25, raoxu wrote:
>> From: Xu Rao <raoxu at uniontech.com>
>>
>> The nqn, hostnqn and hostid options also start with match_strdup(), but
>> unlike the direct string replacements handled by nvmf_parse_string_option()
>> they perform option-specific validation or conversion before parsing is
>> complete.
>
> Does this warrant that they get a special handler? I am not sure I see how 
> this helps.

That doesn't.  But the fact that nvmf_parse_options is more than 400
lines in the current upstream tree is.  For non-trivial parsers
using switch statements, the code flow tends to be a lot nice when
every case is split out into a helper and not in the containing function.




More information about the Linux-nvme mailing list