1 /*
2  * Copyright (C) 2021 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.
3  *
4  * This file is part of MooseFS.
5  *
6  * MooseFS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, version 2 (only).
9  *
10  * MooseFS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with MooseFS; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA
18  * or visit http://www.gnu.org/licenses/gpl-2.0.html
19  */
20 
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 #include <stdio.h>
26 
27 #include "bgjobs.h"
28 #include "random.h"
29 #include "hddspacemgr.h"
30 #include "masterconn.h"
31 #include "csserv.h"
32 #include "mainserv.h"
33 #include "chartsdata.h"
34 
35 #define MODULE_OPTIONS_GETOPT ""
36 #define MODULE_OPTIONS_SWITCH
37 #define MODULE_OPTIONS_SYNOPIS ""
38 #define MODULE_OPTIONS_DESC ""
39 
40 /* Run Tab */
41 typedef int (*runfn)(void);
42 struct {
43 	runfn fn;
44 	char *name;
45 } RunTab[]={
46 	{rnd_init,"random generator"},
47 	{hdd_init,"hdd space manager"},
48 	{mainserv_init,"main server threads"},
49 	{job_init,"jobs manager"},
50 	{csserv_init,"main server acceptor"},	/* it has to be before "masterconn" */
51 	{masterconn_init,"master connection module"},
52 	{chartsdata_init,"charts module"},
53 	{(runfn)0,"****"}
54 },LateRunTab[]={
55 	{hdd_late_init,"hdd space manager - threads"},
56 	{(runfn)0,"****"}
57 },RestoreRunTab[]={
58 	{hdd_restore,"hdd space restore"},
59 	{(runfn)0,"****"}
60 };
61