[linux-cifs-client] File Locking

Jeff Layton jlayton at redhat.com
Wed Jul 9 11:38:07 GMT 2008


On Wed, 9 Jul 2008 11:57:24 +0100
Chris Roberts <cjr at tridentgarages.co.uk> wrote:

> We seem to have a problem whereby both a user on the W2K server and a user on 
> a Linux client can both access a file simultaneously.
> 
> For example:
> 
>  * User 1 opens the file and starts working on it
>  * User 2 opens the file and starts working on it
>  * User 1 saves the file and exits
>  * User 2 saves the file and exits
>  * User 1 has lost their changes
> 
> I don't think it matters which user opens the document first.
> 
> The mount was made with:
> 
> sudo mount -t cifs //hostname.domain.com/D$ /path/to/mointpoint -o 
> auto,rw,uid=1001,gid=1006,file_mode=0664,dir_mode=0775,iocharset=iso8859-15,credentials=/path/to/credentials
> 
> This was working fine a few months ago, indeed it even prevented a second user 
> from opening the file as read-only.  I have a horrible feeling I may have 
> tweaked something to get around that problem, but if so, I cannot remember 
> what.  Or perhaps it changed on the last update.
> 

Is it possible there were userspace or application changes that caused
this?

You may want to try backing up to earlier kernels to see when the
problem was introduced. It sounds like the problem is easily
reproducible, so that's probably the easiest way to start narrowing
things down.

> I cannot work out how to determine my version of cifs, but smbfs is 
> 3.0.24-6etch10.
> 

Try:

# modinfo cifs

> I would appreciate any pointers to resolve this problem, which is resulting in 
> lost work for my users.
> 
> Thank you.
> 


-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list