[linux-cifs-client] Polished patch to avoid data-loss

Maximiliano Curia maxy at rivero.com.ar
Fri Jan 13 12:58:51 GMT 2006


On Thursday 12 January 2006 19:33, you wrote:
> I don't believe it is a good idea to mix the "forcedirectio" concept (no
> data caching) with the concept of /proc/fs/cifs/LookupCacheEnable (no
> metadata/timestamp caching) - so would like to keep those distinct - even
> though file size updates can be 1 second late by default it can be
> configured via /proc to disable that size caching.

The problem is that if a file is growing in size, using "directio" with 
LookupCacheEnable=1, does not cause cifs to re-read the end of the file, so 
you are implicitly caching data (or, actually, the absence of data).

The last patch I sent does not modify the meaning of "LookupCacheEnable" in 
the rest of the code.  The new code just makes sure that the size is not 
cached when using "directio".

Implementing the "notify" behaviour might be a better solution to this problem 
(as is already commented in the code), but I guess this might imply a lot of 
changes in the code.

-- 
Saludos,
 /\/\ /\ >< `/


More information about the linux-cifs-client mailing list