[linux-cifs-client] [PATCH] cifs: consolidate reconnect logic in smb_init routines

Jeff Layton jlayton at redhat.com
Thu Sep 3 08:24:43 MDT 2009


On Thu, 3 Sep 2009 09:00:35 -0500
Steve French <smfrench at gmail.com> wrote:

> On Thu, Sep 3, 2009 at 6:40 AM, Jeff Layton<jlayton at redhat.com> wrote:
> > On Wed, 2 Sep 2009 20:38:49 -0500
> > Steve French <smfrench at gmail.com> wrote:
> >> EAGAIN on handle based operations if tcon succeeds).
> >>
> >> This will change behavior on paths when the session drops
> >> and tcon reconnection fails - which may be ok - but needs to be
> >> looked at.
> >>
> >
> > Good catch. Yeah, that might be an issue. I'll move the "out:" label
> > above the switch statement and that should correct it. When I have some
> > time, I'll retest and resend.
> >
> > That said, I'm not sure the design here is quite right. If it always
> > returns -EAGAIN to the caller on a handle-based operation when the tcon
> > fails isn't that going to loop indefinitely when there's a hard failure
> > with the tcon?
> >
> > Also, I'm not sure we have the list of handle-based ops correct. What
> > about the SetFileInfo calls?
> 
> Yes - I forgot to mention a related point in the earlier email.
> Are we handling checking for SMB close and SMB findclose correctly -
> do we have code in the caller that turns EAGAIN into rc = 0
> (if the session dropped, the handle is already closed).
> 
> 

Yes, that probably needs to be looked at as well. Either way though, I
suggest we shoot for no behavioral changes with the first patch and then
plan to fix what needs fixing once there aren't 2 copies of the
same code.

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list