]> git.apps.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)
committerNathan Cutler <ncutler@suse.com>
Thu, 4 Jun 2020 13:09:26 +0000 (15:09 +0200)
commite35fbbe46203271826171051d046ebada365619b
tree85e8a99a1570d8e4220e3dcc311c5c3f703a8684
parentc9ae988f3ab4c72866955cbe89f66f1e11912d3e
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>
(cherry picked from commit e3b9df78fa42add2dfea1f8bff1e00c832a35697)
src/client/Client.cc
src/client/Client.h
src/include/cephfs/ceph_ll_client.h