]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: optimize SnapRealm::split_at()
authorYan, Zheng <zyan@redhat.com>
Tue, 23 Dec 2014 02:19:13 +0000 (10:19 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:38 +0000 (22:40 +0800)
avoid executing the 'split children' code because all snaprealms in
mdsdir has no child snaprealm.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/SnapRealm.cc

index 1a19c4821b5abeb58ad60c2934372818cbd18f0f..e28da9f5f1efbab9fc06c83170348d8879669610 100644 (file)
@@ -355,7 +355,7 @@ void SnapRealm::split_at(SnapRealm *child)
   dout(10) << "split_at " << *child 
           << " on " << *child->inode << dendl;
 
-  if (!child->inode->is_dir()) {
+  if (inode->is_mdsdir() || !child->inode->is_dir()) {
     // it's not a dir.
     if (child->inode->containing_realm) {
       //  - no open children.