]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: warn, don't crash, on trailing garbage in dir objects
authorSage Weil <sage@newdream.net>
Wed, 12 May 2010 18:53:50 +0000 (11:53 -0700)
committerSage Weil <sage@newdream.net>
Wed, 12 May 2010 18:55:10 +0000 (11:55 -0700)
src/mds/CDir.cc

index c8d65f051a3e90e6cca3cf61587ea58ad7a5fd78..99cea95bcf18bc0cf7bfec86a95db56a08e76cb3 100644 (file)
@@ -1327,7 +1327,11 @@ void CDir::_fetched(bufferlist &bl)
       }
     }
   }
-  assert(p.end());
+  if (!p.end()) {
+    stringstream ss;
+    ss << "dir " << dirfrag() << " has " << bl.length() - p.get_off() << " extra bytes";
+    cache->mds->logclient.log(LOG_WARN, ss);
+  }
 
   //cache->mds->logger->inc("newin", num_new_inodes_loaded);
   //hack_num_accessed = 0;