]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't fall over discover_reply with dir_auth_hint
authorSage Weil <sage@newdream.net>
Wed, 13 Aug 2008 21:58:05 +0000 (14:58 -0700)
committerSage Weil <sage@newdream.net>
Wed, 13 Aug 2008 21:58:05 +0000 (14:58 -0700)
src/mds/MDCache.cc
src/messages/MDiscoverReply.h

index 1f63efd39922bd9476d82f1157fe8abca5746040..d88b194c462c05292b091e376af6d6f4ed92b7fc 100644 (file)
@@ -6855,7 +6855,7 @@ void MDCache::handle_discover_reply(MDiscoverReply *m)
 
   int next = m->starts_with;
 
-  if (next == MDiscoverReply::INODE) {
+  if (!p.end() && next == MDiscoverReply::INODE) {
     // add base inode
     cur = add_replica_inode(p, NULL, finished);
     dout(7) << "discover_reply got base inode " << *cur << dendl;
index 59782d31d97cdce3a117464554949a0ab7da71c2..901fab0f61d9abd50fa7eba835253f9fcb128757 100644 (file)
@@ -140,7 +140,10 @@ class MDiscoverReply : public Message {
     flag_error_dir(false),
     dir_auth_hint(CDIR_AUTH_UNKNOWN) {
   }
-  const char *get_type_name() { return "DisR"; }
+  const char *get_type_name() { return "discover_reply"; }
+  void print(ostream& out) {
+    out << "discover_reply(" << base_ino << ")";
+  }
   
   // builders
   bool is_empty() {