From: Sage Weil Date: Wed, 13 Apr 2011 17:17:24 +0000 (-0700) Subject: mds: fix bad import_state check on handle_export_discover X-Git-Tag: v0.27~78 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7c17cd32b427304a3108599911ef6cda23b152d7;p=ceph.git mds: fix bad import_state check on handle_export_discover 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 --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index d4d18a7f6db7b..edaa84e6c429f 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -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();