[Linux-cachefs] Delaying stat check

Darren Austin darren-lists at widgit.com
Thu Jul 7 15:07:28 UTC 2011


----- Original Message -----
> Darren Austin <darren-lists at widgit.com> wrote:
> > Is there any way to make cachefilesd *NOT* re-validate it's cache of
> > a file upon access for a certain period of time?
> I suspect you're actually asking about NFS's behaviour, not
> cachefilesd's. NFS will ping the server whether or not the cache is
> attached. cachefilesd doesn't prompt it to do so.

Hi David,
  Thanks for your replies :)

My understanding, which may be completely wrong :), is that FS-Cache (with cachefilesd managing the data) would provide the cached data to the kernel without it having to re-read it via the NFS mount?

If that is the case, would there be some way of forcing the use of the cached file (including it's metadata) for a certain period of time, before allowing NFS to re-check the metadata and pull a new copy of the file (if required)?

For our set up, we do not need changed files to be immediately noticed and served - a delay of minutes is acceptable.
But even with cachefs in use, as you say, the NFS server is still accessed for every file request (presumably for the file metadata to re-validate the cached copy of the data?).  We'd like, if possible, to be able to configure cachefilesd to say "my data is still valid, don't touch the network at all" for X number of seconds after it's last been checked, and for the data from the cache to be served for that request.  After a set number of seconds from when that file was last re-validated via NFS, cachefilesd would not serve it from the cache any more, until it's been re-validated as unchanged.  Obviously if it has changed, the normal caching mechanism would apply and the whole process is repeated.

Does that make any sense, or am I waffling?! :)

Cheers,
Darren.

-- 
Darren Austin - Systems Administrator, Widgit Software.
Tel: +44 (0)1926 333680.    Web: http://www.widgit.com/
26 Queen Street, Cubbington, Warwickshire, CV32 7NA.




More information about the Linux-cachefs mailing list