mirror of
https://github.com/ceph/ceph
synced 2025-01-31 07:22:56 +00:00
mds: notify clients about deleted inode
To make sure clients trim the deleted inode from the their cache ASAP. After all clients release the inode, we can reclaim space. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
151e6d24e4
commit
ca3987fff1
@ -1777,6 +1777,10 @@ bool Locker::issue_caps(CInode *in, Capability *only_cap)
|
||||
continue;
|
||||
}
|
||||
|
||||
// notify clients about deleted inode, to make sure they release caps ASAP.
|
||||
if (in->inode.nlink == 0)
|
||||
wanted |= CEPH_CAP_LINK_SHARED;
|
||||
|
||||
// are there caps that the client _wants_ and can have, but aren't pending?
|
||||
// or do we need to revoke?
|
||||
if (((wanted & allowed) & ~pending) || // missing wanted+allowed caps
|
||||
|
Loading…
Reference in New Issue
Block a user