From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> Stray dir inodes are no longer base inodes, they are in the mdsdir and the mdrdir is base inode. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/MDCache.cc | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8598f46..8c83abc 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -3315,10 +3315,9 @@ void MDCache::rejoin_send_rejoins() p->second->add_scatterlock_state(root); } } - for (int i = 0; i < NUM_STRAY; ++i) { - CInode *s = get_inode(MDS_INO_STRAY(p->first, i)); - if (s) - p->second->add_weak_inode(s->vino()); + if (CInode *in = get_inode(MDS_INO_MDSDIR(p->first))) { + if (in) + p->second->add_weak_inode(in->vino()); } } else { // strong @@ -3334,15 +3333,14 @@ void MDCache::rejoin_send_rejoins() p->second->add_scatterlock_state(root); } } - for (int i = 0; i < NUM_STRAY; ++i) { - if (CInode *in = get_inode(MDS_INO_STRAY(p->first, i))) { - p->second->add_weak_inode(in->vino()); - p->second->add_strong_inode(in->vino(), - in->get_caps_wanted(), - in->filelock.get_state(), - in->nestlock.get_state(), - in->dirfragtreelock.get_state()); - } + + if (CInode *in = get_inode(MDS_INO_MDSDIR(p->first))) { + p->second->add_weak_inode(in->vino()); + p->second->add_strong_inode(in->vino(), + in->get_caps_wanted(), + in->filelock.get_state(), + in->nestlock.get_state(), + in->dirfragtreelock.get_state()); } } } -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html