+80
−18
Loading
Previously, one bdev_nvme_failover() call tried only one alternate path. However, when the controller has more than two alternate paths and its reconnect_delay_sec is non-zero, if the first failover failed, the following retries will be delayed with reconnect_delay_sec seconds. We want all alternate paths to be tried immediately but want to set backoff if we try the same alternate path again in a single bdev_nvme_failover() call. Hence, add last_failed_tsc to nvme_path_id structure. Set the current timestamp to the last_failed_tsc when bdev_nvme_failover() is called or reconnect is failed, or clear the last_failed_tsc if reconnect succeeds. Then, control trid switch and reconnect timing based on the last_failed_tsc. Add comments in the source code to explain this complex logic and modify unit tests to test this behavior. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I464ea12a32efe0de3889a6705fa0a6c92aeadbd6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16864 Reviewed-by:
Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>