OPTION(mds_kill_export_at, 0, OPT_INT, 0),
OPTION(mds_kill_import_at, 0, OPT_INT, 0),
OPTION(mds_kill_rename_at, 0, OPT_INT, 0),
+ OPTION(mds_wipe_sessions, 0, OPT_BOOL, 0),
OPTION(mds_wipe_ino_prealloc, 0, OPT_BOOL, 0),
- OPTION(mds_skip_ino, 0, OPT_LONGLONG, 0),
+ OPTION(mds_skip_ino, 0, OPT_INT, 0),
OPTION(osd_data, 0, OPT_STR, ""),
OPTION(osd_journal, 0, OPT_STR, ""),
OPTION(osd_journal_size, 0, OPT_INT, 0), // in mb
void MDS::replay_start()
{
dout(1) << "replay_start" << dendl;
-
+
// initialize gather sets
set<int> rs;
mdsmap->get_recovery_mds_set(rs);
return;
}
+ if (g_conf.mds_wipe_sessions) {
+ dout(1) << "wiping out client sessions" << dendl;
+ sessionmap.wipe();
+ sessionmap.save(new C_NoopContext);
+ }
if (g_conf.mds_wipe_ino_prealloc) {
dout(1) << "wiping out ino prealloc from sessions" << dendl;
sessionmap.wipe_ino_prealloc();
+void SessionMap::wipe()
+{
+ dout(1) << "wipe start" << dendl;
+ dump();
+ while (!session_map.empty()) {
+ Session *s = session_map.begin()->second;
+ remove_session(s);
+ }
+ version = ++projected;
+ dout(1) << "wipe result" << dendl;
+ dump();
+ dout(1) << "wipe done" << dendl;
+}
void SessionMap::wipe_ino_prealloc()
{