* added server command line option "-f" to defrag databases on startup
[citadel.git] / citadel / citserver.c
index 693357e3da999aca497d7309044ef92fde13e9d7..e79fc29dbfae7b8de124e2b0815a921071076903 100644 (file)
@@ -40,6 +40,7 @@
 
 struct CitContext *ContextList = NULL;
 int ScheduledShutdown = 0;
+int do_defrag = 0;
 
 /*
  * Various things that need to be initialized at startup
@@ -48,6 +49,9 @@ void master_startup(void) {
        lprintf(7, "Opening databases\n");
        open_databases();
 
+       if (do_defrag)
+               defrag_databases();
+
        lprintf(7, "Checking floor reference counts\n");
        check_ref_counts();