]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix trim_caps for inodes in root
authorJohn Spray <john.spray@redhat.com>
Mon, 8 Sep 2014 00:14:27 +0000 (01:14 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 15 Sep 2014 14:05:14 +0000 (15:05 +0100)
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 <john.spray@redhat.com>
src/client/Client.cc

index 201c989851749c24cba55d97bc8f7999f8f77e9e..12e52beeaf660f216914c3159c138381a1715387 100644 (file)
@@ -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 {