]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: add a new inode release request callback
authorJeff Layton <jlayton@redhat.com>
Fri, 17 Apr 2020 13:55:41 +0000 (09:55 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 30 Apr 2020 20:20:01 +0000 (16:20 -0400)
commite3b9df78fa42add2dfea1f8bff1e00c832a35697
tree529f0af4d184ff8f13b4542c3302e77bf6e4cd1d
parentadcf12d6c329a3bd534e089bc0c8b42dfd3e4515
client: add a new inode release request callback

trim_caps() walks the list of caps on the session, and releases
non-auth caps, and attempts to trim dentries until the cache
size is under the max_caps value requested by MDS.

This is fine for FUSE, but doesn't really match the use-case of
nfs-ganesha. Ganesha typically looks up inodes by inode number, not
by dentry. It's quite possible that after a restart, we may have a
ton of outstanding inodes with no dentries associated with them.

Ganesha holds a reference to each inode, so libcephfs can't release
them, and we don't have a way to request that ganesha do so.

Add a new ino_release_callback and finisher. The intent is to allow
libcephfs to "upcall" to the application and request that it release
references to a specific inode.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/client/Client.h
src/include/cephfs/ceph_ll_client.h