[PATCH v5 03/14] nvmet-fcloop: refactor fcloop_nport_alloc and track lport
Hannes Reinecke
hare at suse.de
Thu Apr 24 03:09:41 PDT 2025
On 4/23/25 15:21, Daniel Wagner wrote:
> The checks for a valid input values are mixed with the logic to insert a
> newly allocated nport. Refactor the function so that first the checks
> are done.
>
> This allows to untangle the setup steps into a more linear form which
> reduces the complexity of the functions.
>
> Also start tracking lport when a lport is assigned to a nport. This
> ensures, that the lport is not going away as long it is still referenced
> by a nport.
>
> Signed-off-by: Daniel Wagner <wagi at kernel.org>
> ---
> drivers/nvme/target/fcloop.c | 107 ++++++++++++++++++++++++++-----------------
> 1 file changed, 64 insertions(+), 43 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list