[Linux-cachefs] API request

David Howells dhowells at redhat.com
Wed Aug 7 10:05:57 UTC 2013


Milosz Tanski <milosz at adfin.com> wrote:

> I would like to find out if you could add a new API for re-validating
> a cookie. My use case is still FSCache support for Ceph.
> 
> Ceph has a notion of capabilities (like CACHE cap) that can be
> granted, revoked or given up. For example the code there to give up
> the cache cap when the inode file reference count goes to 0.

What exactly do you mean here?  When the last iput() happens and an inode is
merely discarded from memory (and not necessarily deleted)?

> In that case it calls a invalidate on the data. Obviously. I would like to
> have to avoid invalidating the data since it's entirely likely when we
> re-open it next it'll still not have changed.

You could instead just cease calling on fscache for that inode rather than
invalidating the cache object, perhaps by setting a flag to tell ceph's
read/write ignore caching.  Ideally you'd release the cooie if you're not
using it so that (a) it can be culled if the cache needs to make space and (b)
it doesn't use up unswappable kernel resources.

> There's also cases

There's an incomplete sentence here.  Was something missed or should this have
been deleted?

David




More information about the Linux-cachefs mailing list