[PATCH] nvmet-fc: simplify and fix nvmet_fc_alloc_hostport

James Smart jsmart2021 at gmail.com
Sat Mar 6 19:26:09 GMT 2021


On 3/4/2021 12:12 AM, amit.engel at dell.com wrote:
> From: Amit Engel <amit.engel at dell.com>
> 
> Alloc newhost only if no host has been found in host_list
> Add a missing tgtport release reference
> 
> Signed-off-by: Amit Engel <amit.engel at dell.com>

I don't see a reason for this change...   The whole point of allocating 
first was to ensure you had memory if there was dynamic change of the 
host_list while waiting for memory to be alloc'd. Also not nice to be 
holding the lock while allocating.

It's very possible for there to be other requests for possibly the same 
remote port as well as other remote ports on the hostport as LS requests 
are receive and then posted as work items, allowing them to be run in 
parallel.

Is there a real issue to be resolved ?

-- james




More information about the Linux-nvme mailing list