[PATCH v2] nvme: rdma/tcp: call nvme_mpath_stop() from reconnect workqueue

Martin Wilck mwilck at suse.com
Fri Apr 23 18:09:04 BST 2021


On Fri, 2021-04-23 at 18:43 +0200, Martin Wilck wrote:
> On Fri, 2021-04-23 at 17:50 +0200, Maurizio Lombardi wrote:
> > Hello,
> > 
> > pá 23. 4. 2021 v 15:49 odesílatel <mwilck at suse.com> napsal:
> > > From: Martin Wilck <mwilck at suse.com>
> > > 
> > > diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> > > index a0f00cb8f9f3..46287b4f4d10 100644
> > > --- a/drivers/nvme/host/tcp.c
> > > +++ b/drivers/nvme/host/tcp.c
> > > @@ -2068,6 +2068,7 @@ static void
> > > nvme_tcp_error_recovery_work(struct
> > > work_struct *work)
> > >                 return;
> > >         }
> > > 
> > > +       nvme_mpath_stop(ctrl);
> > >         nvme_tcp_reconnect_or_remove(ctrl);
> > >  }
> > > 
> > 
> > 
> > Do you think it would make sense to call nvme_mpath_stop()
> > inside nvme_tcp_reconnect_ctrl_work() too? 
> > Right before it requeues itself by calling
> > nvme_tcp_reconnect_or_remove(ctrl)?
> 
> Good point, probably yes. I'll have another look.

I did now, and I don't think it's necessary. With my patch,
nvme_mpath_stop() will be called the before the first invocation of
nvme_tcp_reconnect_ctrl_work(). The anatt timer and mpath work queue
will only be started if nvme_tcp_setup_ctrl() succeeds, so we don't
need to stop them again when it fails.

Regards
Martin





More information about the Linux-nvme mailing list