On Sat,  7 Apr 2018 11:30:24 -0700
James Smart <jsmart2...@gmail.com> wrote:

> Driver unload isn't waiting for all outstanding nvme associations
> to terminate before clearing structures. In particular, it did not
> set dev_loss_tmo to 0 such that all associations are immediately
> terminated. Thus the transport would enter reconnect timeouts and
> reattempt reconnect to an nvme controller. The call makes a call
> into the driver to create hw queues for the controller which causes
> a NULL pointer reference.
> 
> Correct by changing the teardown process to change all dev_loss_tmo
> timeouts to 0 so that they are immediate. Now the teardown process
> initiates, the remote ports unregistered and delete callback made,
> and as the assocations are immediate upon remoteport unregister, the
> transport will not longer invoke the callbacks for a new controller.
> 
> Signed-off-by: Dick Kennedy <dick.kenn...@broadcom.com>
> Signed-off-by: James Smart <james.sm...@broadcom.com>
> ---
>  drivers/scsi/lpfc/lpfc_hbadisc.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 

Hmm. This seems to be a very circumspect way of deleting all
outstanding I/O...
Is there any guarantee that nvme_fc_set_remoteport_devloss() will
return only after all callbacks are invoked?

Cheers,

Hannes

Reply via email to