]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Properly re-calculate mdsdir inode's auth bit
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 2 Oct 2012 08:55:51 +0000 (16:55 +0800)
committerSage Weil <sage@inktank.com>
Tue, 2 Oct 2012 18:26:20 +0000 (11:26 -0700)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index 6894a9d5ef6971a8341562bc0f59954cf5667239..3b1dc2efea75eb996b9d4567c53c52478754b914 100644 (file)
@@ -3132,6 +3132,11 @@ void MDCache::recalc_auth_bits()
   for (map<CDir*,set<CDir*> >::iterator p = subtrees.begin();
        p != subtrees.end();
        ++p) {
+
+    CInode *inode = p->first->get_inode();
+    if (inode->is_mdsdir() && inode->ino() != MDS_INO_MDSDIR(mds->get_nodeid()))
+      inode->state_clear(CInode::STATE_AUTH);
+
     list<CDir*> dfq;  // dirfrag queue
     dfq.push_back(p->first);