]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: in choose_target_mds, break parent lookup if inode is unlinked.
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 14 Sep 2010 17:00:31 +0000 (10:00 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 14 Sep 2010 17:44:26 +0000 (10:44 -0700)
This can happen now with the recent frag changes and there's no way around it.

src/client/Client.cc

index 67cb8a9b7cf97a667848b4a1f8d4fc12f43ceae2..bd64a6b21be4ac57de66c35e36b0d23766c32410 100644 (file)
@@ -819,8 +819,12 @@ int Client::choose_target_mds(MetaRequest *req)
     while (in->snapid != CEPH_NOSNAP) {
       if (in->snapid == CEPH_SNAPDIR)
        in = in->snapdir_parent;
-      else
+      else if (in->dn)
        in = in->dn->dir->parent_inode;
+      else {
+        dout(10) << "got unlinked inode, can't look at parent" << dendl;
+        break;
+      }
     }
     is_hash = false;
   }