From: John Spray Date: Mon, 8 Sep 2014 00:14:27 +0000 (+0100) Subject: client: fix trim_caps for inodes in root X-Git-Tag: v0.86~68^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00a002143af75c74a557bc4b05815b4cdad929bc;p=ceph.git 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 201c98985174..12e52beeaf66 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 {