[linux-cifs-client] Broken client-side caching - fixed by means of PATCH for 2.6 kern el (included)

Vince Negri (ASL) vnegri at asl-electronics.co.uk
Mon Apr 4 10:45:51 GMT 2005


Thanks to the co-operation of a number of people, notably Dave Stahl
and Esteban Salazar, I now have updated patches against recent 2.6.x
kernels that fix the issues both I and Dave were reporting. Dave in
particular has done a lot of real-world testing on multiple machines.

To recap, the original issue was that when using the cifs VFS module
on the client, an operation that required a read of the whole directory
(such as "ls -l *") would insert updated file size/time information
into the client-side inode without invalidating any cached data pages
related to that file. 

Dave Stahl came up with a reproducible test case:

--quote--
1) Export a share from a WinXP box - no patches, no domain membership. 
2) mount share on 2.6.10 linux system to /mnt/winxp  - mount.cifs version is
1.5 
3) On the linux box, type cat /mnt/winxp/testdir/*.txt >testfile1
(obviously assumes some text files exist) 
4) On windows box, modify one or more files in the exported testdir. 
5) cat /mnt/winxp/testdir/*.txt >testfile2 
6) testfile1 and testfile2 will be identical (incorrectly) 
7) mount -o remount /mnt/winxp (or wait some undefined (to me, anyway)
period of time greater than 15 minutes) 
8) cat /mnt/winxp/testdir/*.txt >testfile2 
9) testfile1 and testfile3 will now differ (correctly).
--end quote--


The problem existed both in the 2.6.11 kernel code, and the current
backport to 2.4 (which is where I first ran into the issue myself.)


 <<cifs_invalidate_inode_patch_2.6.10.diff>>  
<<cifs_invalidate_inode_patch_2.6.11.diff>> 

As well as inviting Steve to review the patch (he may well have a more
elegant way to achieve what the patch does) I'd appreciate any reports
from people running it even if they aren't having problems, as a way
of detecting regressions.

Regards,


Vince



Legal Disclaimer: Any views expressed by the sender of this message are
not necessarily those of Application Solutions Ltd. Information in this 
e-mail may be confidential and is for the use of the intended recipient
only, no mistake in transmission is intended to waive or compromise such 
privilege. Please advise the sender if you receive this e-mail by mistake.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cifs_invalidate_inode_patch_2.6.10.diff
Type: application/octet-stream
Size: 1433 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20050404/2698b4c6/cifs_invalidate_inode_patch_2.6.10.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cifs_invalidate_inode_patch_2.6.11.diff
Type: application/octet-stream
Size: 1431 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20050404/2698b4c6/cifs_invalidate_inode_patch_2.6.11.obj


More information about the linux-cifs-client mailing list