[linux-cifs-client] cifs caching problem fixed? and GENERIC_WRITE vs. GENERIC_ALL fix pushed to 2.4 cvs

Steve French smfltc at us.ibm.com
Tue Feb 3 00:39:43 GMT 2004


Howard,
See below - this seems to work now based on my tests on 2.6 which has
the identical code in these routines to 2.4.  The caching/oplock problem
no longer fails with the minor change to cifsfs.c that I made today and
pushed in the bk://cifs.bkbits.net/linux-2.5cifs 2.6 development tree (I
also backported them to the 2.4 cvs version in samba.org cvs but they
have not been tested yet on 2.4).  The 2.4 code now includes the fix Ian
was asking about as well (for the odd share permissions access denied).

/localhost/stevef on /mnt type cifs (0)
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo
ls: /mnt/foo: No such file or directory
stevef95:/home/stevef/bk/linux-2.5cifs # touch !$
touch /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo
-rwxrwxrwx    1 stevef   users           0 2004-02-02 18:24 /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # rm /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # echo "This is the client" >
/mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo
-rwxrwxrwx    1 stevef   users          19 2004-02-02 18:25 /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # echo "look at server version of
file now"
look at server version of file now
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /data/pchome/stevef/foo
-rwxrwxrwx    1 stevef   users          19 2004-02-02 18:25
/data/pchome/stevef/foo
stevef95:/home/stevef/bk/linux-2.5cifs # cat /data/pchome/stevef/foo
This is the client
stevef95:/home/stevef/bk/linux-2.5cifs # perl -pi -e 's/client/server/'
/data/pchome/stevef/foo
stevef95:/home/stevef/bk/linux-2.5cifs # cat /data/pchome/stevef/foo
This is the server
stevef95:/home/stevef/bk/linux-2.5cifs # echo "Back to client view of
file"
Back to client view of file
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo
This is the server
stevef95:/home/stevef/bk/linux-2.5cifs # touch !$
touch /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo
-rwxrwxrwx    1 stevef   users          19 2004-02-02 18:27 /mnt/foo
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo
This is the server
stevef95:/home/stevef/bk/linux-2.5cifs # toch /mnt/foo
bash: toch: command not found
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo
This is the server
stevef95:/home/stevef/bk/linux-2.5cifs # /usr/local/samba/sbin/smbd -V
Version CVS 3.0.1pre1
stevef95:/home/stevef/bk/linux-2.5cifs #


Then same test with oplock enabled (default)

stevef95:/home/stevef/bk/linux-2.5cifs # cat /proc/fs/cifs/OplockEnabled
1
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo1
ls: /mnt/foo1: No such file or directory
stevef95:/home/stevef/bk/linux-2.5cifs # touch !$
touch /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo1
-rwxrwxrwx    1 stevef   users           0 2004-02-02 18:30 /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # rm !$
rm /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # echo "This is client" >
/mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo1
-rwxrwxrwx    1 stevef   users          15 2004-02-02 18:31 /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # echo "switch to server view of
same file"
switch to server view of same file
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /data/pchome/stevef/foo1
-rwxrwxrwx    1 stevef   users          15 2004-02-02 18:31
/data/pchome/stevef/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # cat /data/pchome/stevef/foo1
This is client
stevef95:/home/stevef/bk/linux-2.5cifs # perl -pi -e 's/client/server/'
/data/pchome/stevef/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # cat /data/pchome/stevef/foo1
This is server
stevef95:/home/stevef/bk/linux-2.5cifs # echo switch to client view
switch to client view
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo1
This is server
stevef95:/home/stevef/bk/linux-2.5cifs # touch !$
touch /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # ls -l /mnt/foo1
-rwxrwxrwx    1 stevef   users          15 2004-02-02 18:33 /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo1
This is server
stevef95:/home/stevef/bk/linux-2.5cifs # touch /mnt/foo1
stevef95:/home/stevef/bk/linux-2.5cifs # cat /mnt/foo1
This is server




More information about the linux-cifs-client mailing list