From 00a002143af75c74a557bc4b05815b4cdad929bc Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 8 Sep 2014 01:14:27 +0100 Subject: [PATCH] client: fix trim_caps for inodes in root Previously client would fail to release caps for files in the root directory in response to CEPH_SESSION_RECALL_STATE messages. Signed-off-by: John Spray --- src/client/Client.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index 201c9898517..12e52beeaf6 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3183,6 +3183,12 @@ void Client::trim_caps(MetaSession *s, int max) while (q != in->dn_set.end()) { Dentry *dn = *q++; if (dn->lru_is_expireable()) { + if (dn->dir->parent_inode->ino == MDS_INO_ROOT) { + // Only issue one of these per DN for inodes in root: handle + // others more efficiently by calling for root-child DNs at + // the end of this function. + _schedule_invalidate_dentry_callback(dn, true); + } trim_dentry(dn); } else {