nvme_fc: on remoteport reuse, set new nport_id and role.
authorJames Smart <jsmart2021@gmail.com>
Tue, 6 Mar 2018 04:55:49 +0000 (20:55 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Mar 2018 14:53:43 +0000 (08:53 -0600)
When reattaching to a removed remoteport that has not yet been
fully deleted as it's waiting for reconnect timeouts, be sure to
re-set the ports nport id and role.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c

index 49e2ef2..0676d44 100644 (file)
@@ -588,6 +588,8 @@ nvme_fc_attach_to_suspended_rport(struct nvme_fc_lport *lport,
                        return ERR_PTR(-ESTALE);
                }
 
+               rport->remoteport.port_role = pinfo->port_role;
+               rport->remoteport.port_id = pinfo->port_id;
                rport->remoteport.port_state = FC_OBJSTATE_ONLINE;
                rport->dev_loss_end = 0;