[linux-cifs-client] SMB_COM_CLOSE and LastWriteTime

Jeff Layton jlayton at redhat.com
Fri Apr 25 11:01:24 GMT 2008


On Fri, 25 Apr 2008 11:56:47 +0530
Suresh Jayaraman <sjayaraman at suse.de> wrote:

> Jeff Layton wrote:
> > On Thu, 24 Apr 2008 17:26:58 +0200
> > Guenter Kukkukk <linux at kukkukk.com> wrote:
> > 
> >> Am Donnerstag, 24. April 2008 schrieb Jeff Layton:
> >>> On Thu, 24 Apr 2008 16:13:46 +0200
> >>> Guenter Kukkukk <linux at kukkukk.com> wrote:
> >>>
> >>> I tested out the patch that you sent on March 13 and it seems to fix
> >>> the problem of setting times against win2k3. My only concern is that it
> >>> looks like it rips out some of the code that did an implicit
> >>> open/setattr/close of a file when it's not already open. Some comments
> >>> seem to indicate that older servers needed the file open in order to
> >>> properly set the time. Do we know that this won't break against older
> >>> servers?
> 
> I was under the impression that Steve's commit - 
> 50531444fac593c8c8e3ff2e41944d9507bb4665 fixed the "cp -p issue" with 
> Windows servers, though I didn't verify on 2.6.25. Looks like the issue 
> is still reproducible (Or) is this now specific to Win98 only?
> 

There are 2 separate problems:

1) CIFS could buffer up writes and issue them after the LastWriteTime
had been set on the server. Obviously, once CIFS flushes the writes,
they may clobber the time that had been set.

2) Some servers (win2k3 in particular, but probably others) allow you
to set the LastWriteTime via a SET_PATH_INFO call, but when the close
call comes in, it overwrites that time with the current time on the box.

The patch you mention fixes problem #1, but doesn't fix problem #2.
Guenter's patch seems to fix problem #2 (at least for win2k3). The
current debate is about the completeness of that fix, and what measures
we need to take for legacy servers.

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list