]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: trim deleted inode
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 9 Aug 2013 05:43:54 +0000 (13:43 +0800)
committerSage Weil <sage@inktank.com>
Wed, 2 Oct 2013 21:42:42 +0000 (14:42 -0700)
commitf8a947d92005a4cda42cab48ddfcd6e419c0b5d7
tree1353fe94f0a6cdcaa4052f8ce429660dc67bc789
parent8fb7a47601276fe82acb271c8ac966e1b86d17f0
client: trim deleted inode

Previous patch makes MDS send notification to clients when an inode
is deleted. When receiving a such notification, we invalidate any
dentry link to the deleted inode. If there is no other reference to
the inode, the inode gets trimmed.

For cephfs fuse client, we use fuse_lowlevel_notify_inval_entry() or
fuse_lowlevel_notify_delete() to notify the kernel to trim the deleted
inode. (this is not completely reliable because we play unlink/link
tricks when  handle MDS replies. it's difficult to keep the user space
cache and kernel dcache in sync)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/client/Client.cc
src/client/Client.h
src/client/fuse_ll.cc