[PATCH 11/13] nvme-tcp: combine reset and recovery

Sagi Grimberg sagi at grimberg.me
Thu Mar 7 03:08:47 PST 2024



On 27/01/2024 11:30, hare at kernel.org wrote:
> From: Hannes Reinecke <hare at suse.de>
>
> Call 'connect_work' from reset to reduce duplicate code.
>
> Signed-off-by: Hannes Reinecke <hare at suse.de>
> ---
>   drivers/nvme/host/tcp.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 6c8ca08f2972..a46ab8370007 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2329,14 +2329,7 @@ static void nvme_reset_ctrl_work(struct work_struct *work)
>   		return;
>   	}
>   
> -	if (nvme_tcp_setup_ctrl(ctrl, false))
> -		goto out_fail;
> -
> -	return;
> -
> -out_fail:
> -	++ctrl->nr_reconnects;
> -	nvme_tcp_reconnect_or_remove(ctrl);
> +	queue_delayed_work(nvme_wq, &to_tcp_ctrl(ctrl)->connect_work, 0);
>   }

This breaks nvme_reset_ctrl_sync

>   
>   static void nvme_tcp_stop_ctrl(struct nvme_ctrl *ctrl)




More information about the Linux-nvme mailing list