OSDN Git Service

nvme-fc: short-circuit reconnect retries
authorHannes Reinecke <hare@suse.de>
Fri, 21 May 2021 08:23:00 +0000 (10:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 May 2021 07:21:15 +0000 (09:21 +0200)
commitf25f8ef70ce2e85bae1a266dd5de714aefda81d2
treee5a41c9ad1e1e70ea3716c17112ac918b0b5eb02
parent3596a06583a16cf7f76d836440dfba5714c9c710
nvme-fc: short-circuit reconnect retries

Returning an nvme status from nvme_fc_create_association() indicates
that the association is established, and we should honour the DNR bit.
If it's set a reconnect attempt will just return the same error, so
we can short-circuit the reconnect attempts and fail the connection
directly.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c