Re: [PATCH 06/11] cifs: eliminate "first_time" parm to CIFS_SessSetup
Steve French <[email protected]> Tue, 27 Apr 2010 19:36:45 -0500
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Apr 27, 2010 at 6:20 AM, Jeff Layton <[email protected]> wrote: > On Tue, 27 Apr 2010 07:03:20 -0400 > Jeff Layton <[email protected]> wrote: > >> On Mon, 26 Apr 2010 21:45:53 -0500 >> Steve French <[email protected]> wrote: >> >> > On Sat, Apr 24, 2010 at 6:57 AM, Jeff Layton <[email protected]> wrote: >> > > We can use the is_first_ses_reconnect() function to determine this. >> > >> > This is a slight behavior change - we will end up issuing >> > another SMB negprot after reconnect (which we didn't do before). >> > >> > May be harmless, but worth thinking through >> > >> > >> >> The comment in cifs_setup_session is misleading. I don't think there's >> a behavior change. cifs_reconnect does this: >> >> server->maxBuf = 0; >> >> ...and that triggers a new negprot on reconnect in the current >> code. > > ...and I think the current behavior is correct according to the spec. > The MS-CIFS doc says: > > "An SMB_COM_NEGOTIATE exchange MUST be completed before any other SMB > messages MAY be sent to the server." > > ...since the server doesn't have any idea that this is a reconnect, I'd > assume that some (most? all?) servers would reject other SMB's on a > socket that hasn't had a negprot done on it. Your explanation makes sense - merged. -- Thanks, Steve