[linux-cifs-client] fs synchronization with samba

Esteban Salazar eagsalazar at gmail.com
Fri Jan 28 16:29:29 GMT 2005


I tried mounting with the direct option but this did not change
anything.  Just to be clear, I am not having synchronization problems
on the order of seconds.  Files do not synchronize for whole minutes
or ever if I do not unmount and remount the file systems.   The
command line I am using is:

mount -t cifs //marvin/biggig /impinj/biggig -o
directio,username=esalazar,workgroup=IMPINJ.COM

I also tried using direct instead of directio with the same results. 
I do not know the details of the server configuration but I do know
that it is running fedora core 2.  I had many other problems with
smbmount but synchronization was never one of them so I really don't
think this is a problem with the server.

Thanks in advance for any more help.



On Thu, 6 Jan 2005 12:00:33 -0600, Steven French <sfrench at us.ibm.com> wrote:
>  
> 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
>  
>


More information about the linux-cifs-client mailing list