<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText>Jeremy,<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp; After much of testing and debugging,
it seems that we are getting the cause why Windows takes the file offline and
the timestamp update only goes to local store.&nbsp;&nbsp; When Windows close
one particular handle through which the file had been modified, it queries the
timestamps using FIND_FIRST2 on the file after receiving the close response.
Those timestamps are then saved in CSC cache.&nbsp; &nbsp;We can see that the LastWriteTime
value returned from the create response does not match the value returned from
FIND_FRIST2 query.&nbsp; The mismatch of LastWriteTime &nbsp;causes Windows to declare
the version conflict between server copy and local cache and thus takes it
offline.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; Here are the details shown in the traces you
sent us..<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp; &nbsp;Office2003-opnclose-samba-bad.cap:<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Opening file,&nbsp; the current
time stamp is written to the excel file<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Frame
175&nbsp;&nbsp; 10.20.0.111 10.20.0.66&nbsp; SMB&nbsp;&nbsp; Trans2 Response,
FIND_FIRST2, Files: excel test.xls &nbsp;Last Write: Jul&nbsp; 8, 2009
15:10:06.000000000 <o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Frame
185&nbsp;&nbsp; 10.20.0.111 10.20.0.66&nbsp; SMB&nbsp;&nbsp; NT Create AndX
Response, FID: 0x13ff&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last
Write: Jul&nbsp; 8, 2009 15:10:06.000000000<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Frame
214&nbsp;&nbsp; 10.20.0.66&nbsp; 10.20.0.111 SMB&nbsp;&nbsp; Trans2 Request,
SET_FILE_INFO, FID: 0x13ff<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;So far so good..<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Closing file,&nbsp; the original
time stamp is supposed to be restored to the excel file<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Frame 574&nbsp;&nbsp; 10.20.0.111 10.20.0.66&nbsp; SMB&nbsp;&nbsp; Trans2
Response, FIND_FIRST2, Files: excel test.xls &nbsp;Last Write: Jul&nbsp; 8,
2009 19:36:<b>12.294000000</b><o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Frame
587&nbsp;&nbsp; 10.20.0.111 10.20.0.66&nbsp; SMB&nbsp;&nbsp; NT Create AndX
Response, FID: 0x103e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;Last Write: Jul&nbsp; 8, 2009 19:36:<b>12.000000000</b><o:p></o:p></p>

<p class=MsoPlainText>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mismatch of time stamp is
detected and remote file is closed and it is going offline.&nbsp; SET_FILEINFO
will not sent to the server any update will &nbsp;&nbsp; only goes to local
copy.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Frame 588&nbsp;&nbsp; 10.20.0.66&nbsp; 10.20.0.111 SMB&nbsp;&nbsp; Close
Request, FID: 0x103e&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></p>

<p class=MsoPlainText>&nbsp;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; &nbsp;From all the failed cases I got, I can
see that only the millisecond part is different. &nbsp;<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp; You may look at the difference between
logics of those two commands regarding LastWriteTime. &nbsp;Please let me know what
you think and, if necessary, we can continue working together to debug the
problem.&nbsp; &nbsp;<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Thanks!<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Hongwei&nbsp;&nbsp; &nbsp;&nbsp;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp; <o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>-----Original Message-----<br>
From: Jeremy Allison [mailto:jra@samba.org] <br>
Sent: Tuesday, August 18, 2009 7:30 PM<br>
To: Hongwei Sun<br>
Cc: Jeremy Allison; pfif@tridgell.net; cifs-protocol@samba.org; Edgar
Olougouna; Nick Meier<br>
Subject: Re: Excel timestamp client side-caching request<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>On Sun, Aug 16, 2009 at 05:34:39AM +0000, Hongwei Sun
wrote:<o:p></o:p></p>

<p class=MsoPlainText>&gt; Jeremy,<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp; We are still working on
identifying the issue.&nbsp; It seems that when Excel tries to send SET_INFO
when closing the file, CSC thinks ,for some reason, that the object is in
disconnected offline state and any update to the file is just applied to the
CSC local cache.&nbsp; That is why the SMB Transact2 request is not really sent
over the wire.&nbsp; It looks like that it is timing related as I have much
smaller chance to capture the condition if it is running under debugger.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;&nbsp;&nbsp;&nbsp; I will be on vacation next week until
Friday.&nbsp;&nbsp; Nick and Edgar will continue working on the issue.&nbsp; If
you have any information or requests, please let us know.&nbsp; We will also
let you know as soon as we get the root cause on the issue.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Ok, this is very interesting. If there's anything I can
do<o:p></o:p></p>

<p class=MsoPlainText>to help please let me know but it does sound like there's<o:p></o:p></p>

<p class=MsoPlainText>something the Windows CSC code sees from a Samba server<o:p></o:p></p>

<p class=MsoPlainText>that it doesn't like and causes it to make the decision<o:p></o:p></p>

<p class=MsoPlainText>that the drive is offline. You guys are in the best place<o:p></o:p></p>

<p class=MsoPlainText>to determine what that might be.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Thanks,<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Jeremy.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>