[cifs-protocol] [REG: 110120160951867] Requesting clarification of CIFS client timeout behavior

Jeff Layton jlayton at samba.org
Thu Dec 2 06:57:10 MST 2010


On Wed, 01 Dec 2010 16:08:32 -0600
"Christopher R. Hertel" <crh at samba.org> wrote:

> Below...
> 

[...]

> > In any case, this may all be a matter of opinion since the spec doesn't
> > really spell it out. It is of concern however -- it can take a VERY long
> > time for some reads or writes to complete.
> 
> I'm spending a lot of time explaining the history behind the confusion.
> These days, *no one* uses multiple physical connections bound to a single
> SMB session.  NT and above don't support it properly anyway.  This is all
> about vestigial code.
> 
> You are correct that actual behavior should be spelled out.  The problem is
> that a lot of the actual behavior is due to the requirements of unused
> transports and features, earlier dialects, and incomplete implementations.
> 
> > Consider, for instance, a small write that is long way past EOF on a
> > server with NTFS under the hood. My understanding is that NTFS will
> > zero-fill the files, and on slow storage that can take a *really* long
> > time (far longer than the default 45 second SESSTIMEOUT).
> 
> Yep.
> 
> > It would seem to make far more sense to simply apply a timeout to the
> > socket as a whole. IOW, only perform a reconnect if the server doesn't
> > respond to echoes within a reasonable amount of time (whatever
> > "reasonable" is).
> 
> This sounds like something that should be tested and then verified against
> the source code.
> 
> Probably needs two tests.  One to see what happens if the (single)
> connection is lost, and another to see what happens if a single operation
> takes a very, very long time to complete (as you describe).
> 

Yeah, I fear that this is going to require me to do "Real Work" ;)

I just started working on a patch to make samba discard WriteAndX
requests which may help me to simulate this scenario. I'll post any
results here that I find (but it may take a little while for me to
collect them).

Thanks for the info so far...

-- 
Jeff Layton <jlayton at samba.org>


More information about the cifs-protocol mailing list