[linux-cifs-client] fs synchronization with samba

Steven French sfrench at us.ibm.com
Thu Jan 6 18:00:33 GMT 2005


You can avoid client side caching completely (at the cost of not having 
the ability to do mmaps on those files on the client either) by mounting 
with the option forcedirectio - that would always work but could affect 
performance.

If you are not mounting direct, then caching is occurring on the client so 
make sure that the server supports kernel oplocks and it is enabled in the 
smb.conf on the server.

The server sends an oplock break request (in response to the loss of the 
caching token caused by the modification of the file on the server of a 
file open on the client). 

After that, Linux on the client does reread the data into the page cache - 
and note that there is up to a 1 second window of time (perhaps this 
should be configurable in the future) in which the client can have stale 
data since revalidate will not notice the updated server timestamp until 
the 1 second cifs_revalidate time is up.   If you want to see how this 
works, search for revalidate_inode in fs/cifs/inode.c - there may be ways 
to optimize this better.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com



"Steve Salazar" <eagsalazar at hotmail.com> 
Sent by: linux-cifs-client-bounces+sfrench=us.ibm.com at lists.samba.org
01/05/2005 07:37 PM
Please respond to
eagsalazar


To
linux-cifs-client at lists.samba.org
cc

Subject
[linux-cifs-client] fs synchronization with samba






While on the same files on two different terminals, one where the files 
were 
local and one where the files were mounted via cifs, I saw that the file 
that was edited on the server machine didn't show changes to that file on 
the cifs mount on the other machine until I unmounted and remounted the 
share.  I only waited a couple minutes before remounting so I don't know 
if 
it would have synched eventually but either way this is not good.  Is 
there 
a setting I should look at to make this go away?  Is this a bug?

I am using stock cifs from kernel 2.6.10 on the client and the server is 
linux samba 3.0.9-1 on fedora core 2.  Server info from 
/proc/fs/cifs/DebugData:

3) Name: 192.168.10.16  Domain: IMPINJ Mounts: 3 ServerOS: Unix
        ServerNOS: Samba 3.0.9-1.fc2    Capabilities: 0x80e3fd
        SMB session status: 1   TCP status: 1
        Local Users To Server: 1 SecMode: 0x3 Req Active: 0
MIDs:

BTW, the updates available in kernel 2.6.10 appear to have solved many bad 

problems I was having with CIFS.  Thanks alot.


_______________________________________________
linux-cifs-client mailing list
linux-cifs-client at lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list