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_ino_prealloc, 0, OPT_BOOL, 0),
+ OPTION(mds_skip_ino, 0, OPT_LONGLONG, 0),
OPTION(osd_data, 0, OPT_STR, ""),
OPTION(osd_journal, 0, OPT_STR, ""),
OPTION(osd_journal_size, 0, OPT_INT, 0), // in mb
int mds_kill_import_at;
int mds_kill_rename_at;
+ bool mds_wipe_ino_prealloc;
+ long long mds_skip_ino;
+
// osd
const char *osd_data;
const char *osd_journal;
projected_version = ++version;
}
+
+void InoTable::skip_inos(inodeno_t i)
+{
+ dout(10) << "skip_inos was " << free << dendl;
+ inodeno_t first = free.range_start();
+ inodeno_t last = first + i;
+ interval_set<inodeno_t> s;
+ s.insert(first, last);
+ s.intersection_of(free);
+ free.subtract(s);
+ projected_free = free;
+ projected_version = ++version;
+ dout(10) << "skip_inos now " << free << dendl;
+}
::decode(free, bl);
projected_free = free;
}
+
+ void skip_inos(inodeno_t i);
};
#endif
return;
}
+ if (g_conf.mds_wipe_ino_prealloc) {
+ dout(1) << "wiping out ino prealloc from sessions" << dendl;
+ sessionmap.wipe_ino_prealloc();
+ sessionmap.save(new C_NoopContext);
+ }
+ if (g_conf.mds_skip_ino) {
+ inodeno_t i = g_conf.mds_skip_ino;
+ dout(1) << "skipping " << i << " inodes" << dendl;
+ inotable->skip_inos(i);
+ inotable->save(new C_NoopContext);
+ }
+
if (mdsmap->get_num_mds() == 1 &&
mdsmap->get_num_failed() == 0) { // just me!
dout(2) << "i am alone, moving to state reconnect" << dendl;
}
}
}
+
+
+
+
+void SessionMap::wipe_ino_prealloc()
+{
+ for (hash_map<entity_name_t,Session*>::iterator p = session_map.begin();
+ p != session_map.end();
+ ++p) {
+ p->second->pending_prealloc_inos.clear();
+ p->second->prealloc_inos.clear();
+ p->second->used_inos.clear();
+ }
+ projected = ++version;
+}
session->trim_completed_requests(tid);
}
+ void wipe_ino_prealloc();
+
// -- loading, saving --
inodeno_t ino;
list<Context*> waiting_for_load;