]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix bad import_state check on handle_export_discover
authorSage Weil <sage@newdream.net>
Wed, 13 Apr 2011 17:17:24 +0000 (10:17 -0700)
committerSage Weil <sage@newdream.net>
Wed, 13 Apr 2011 20:58:18 +0000 (13:58 -0700)
This populates import_state[] with an bad value and leads to crashes like

mds/Migrator.h: In function 'static const char* Migrator::get_import_statename(int)', in thread '0x7f5ea8c97710'
mds/Migrator.h: 112: FAILED assert(0)
 ceph version 0.25-670-g85bd67e (commit:85bd67e0ab58876ad807b44ab2154e84b90a4f30)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0xa53ad6]
 2: (Migrator::get_import_statename(int)+0x68) [0x91ea0f]
 3: (Migrator::show_importing()+0x174) [0x90f640]

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/Migrator.cc

index d4d18a7f6db7b6422668a2184f75948144b8887e..edaa84e6c429fd636da765dc91a925d961b05efe 100644 (file)
@@ -1521,7 +1521,7 @@ void Migrator::handle_export_discover(MExportDirDiscover *m)
   }
 
   // am i retrying after ancient path_traverse results?
-  if (import_state.count(df) == 0 &&
+  if (import_state.count(df) == 0 ||
       import_state[df] != IMPORT_DISCOVERING) {
     dout(7) << "hmm import_state is off, i must be obsolete lookup" << dendl;
     m->put();