Problem with files being cached

David J. Reiter dave at davidr.sd.logicon.com
Mon Jan 11 19:30:48 GMT 1999


Greetings All,
 I seem to be having a problem with files being cached, and I am
99% certain that it is not oplock related. I have set up my smb.conf
file to have oplocks turned off and I think it is set up correctly.
I believe this is correct because I then took that file and changed
it to turn oplocks on and I did get different behaviour. With oplocks
off an smbstat never shows any files being locked. With oplocks on
the file I am accessing on the PC side will show up. And after I change
it on the unix side the PC side keeps reading the old cached copy, which
is what I expect. Am I correct in checking smbstat to see if an
oplock has been granted? If nothing is listed does that mean oplocks
are turned off?

 Now the problem I have is when oplocks are turned off. First I open a
file on the PC side and then close the file (smbstatus shows that there
are no locks). I then go to the unix side and change the file. For example
from the line 1234567890 to the line ABCD. I then save the file on the
unix side and then open the file on the PC side. What comes up on the
PC side is incorrect. It will show 1234. Now if oplocks were somehow
on I would expect all of the old file to be shown, not just the first
4 characters. Samba seems to know the file size has changed, but 
for some reason uses the old data. I can close and re-open the file
and usually will get the bad version for up to a minute. After that I
will usually get the correct new version. Again I think oplocks are 
turned off because when they are on I will continue to get the old 
version of the file no matter how long I wait.

 Any suggestions would be greatly appreciated. I'll send out any
log file or setup file that you may need to look at.
My setup is like this:

Server: Sparc running Solaris 2.5.1 and gcc version 2.8.0
Client: Windows 95

Thanks in advance,

David.

David Reiter  dreiter at logicon.com
Logicon Information Technology Group 
404 Camino Del Rio South #500
San Diego, California  92108-3503
619-610-8800 x 5260




More information about the samba mailing list