Motr  M0
process_foms.c File Reference
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/finject.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "be/domain.h"
#include "be/alloc.h"
#include "module/instance.h"
#include "cob/cob.h"
#include "conf/helpers.h"
#include "fop/fop.h"
#include "fop/fom_generic.h"
#include "reqh/reqh_service.h"
#include "spiel/spiel.h"
#include "rm/rm_service.h"
#include "sss/process_fops.h"
#include "sss/process_foms.h"
#include "sss/ss_svc.h"
#include "ioservice/io_service.h"
#include <unistd.h>
#include <dlfcn.h>
#include "motr/process_attr.h"
#include "motr/setup.h"
#include "pool/pool_machine.h"
#include "pool/pool.h"
#include "ioservice/storage_dev.h"
Include dependency graph for process_foms.c:

Go to the source code of this file.

Data Structures

struct  m0_sss_process_fom
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SSS
 

Enumerations

enum  ss_process_fom_phases {
  SS_PROCESS_FOM_INIT = M0_FOPH_NR + 1, SS_PROCESS_FOM_STOP, SS_PROCESS_FOM_RECONFIG_GET_DATA, SS_PROCESS_FOM_RECONFIG_DATA_WAIT,
  SS_PROCESS_FOM_RECONFIG, SS_PROCESS_FOM_HEALTH, SS_PROCESS_FOM_COUNTER, SS_PROCESS_FOM_QUIESCE,
  SS_PROCESS_FOM_RUNNING_LIST, SS_PROCESS_FOM_LIB_LOAD
}
 

Functions

static int ss_process_fom_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
 
static int ss_process_fom_tick (struct m0_fom *fom)
 
static int ss_process_fom_tick__init (struct m0_fom *fom, const struct m0_reqh *reqh)
 
static void ss_process_fom_fini (struct m0_fom *fom)
 
static size_t ss_process_fom_home_locality (const struct m0_fom *fom)
 
static int ss_process_health (struct m0_reqh *reqh, int32_t *h)
 
static struct m0_reqh_servicess_ioservice_find (struct m0_reqh *reqh)
 
 M0_TL_DESCR_DECLARE (seg, M0_EXTERN)
 
static int ss_be_segs_stats_ingest (struct m0_be_domain *dom, struct m0_ss_process_rep *rep)
 
static int ss_ios_stats_ingest (struct m0_ss_process_rep *rep)
 
static int ss_process_stats (struct m0_reqh *reqh, struct m0_ss_process_rep *rep)
 
static int ss_bytecount_stats_ingest (struct m0_cob_domain *cdom, struct m0_ss_process_rep *rep)
 
static int ss_process_counter (struct m0_reqh *reqh, struct m0_ss_process_rep *rep)
 
static int ss_process_quiesce (struct m0_reqh *reqh)
 
static int ss_fop_process_svc_to_buf (struct m0_reqh_service *svc, struct m0_buf *buf)
 
static int ss_fop_process_svc_list_fill (struct m0_ss_process_svc_list_rep *fop, struct m0_reqh *reqh)
 
static void ss_process_confc_ctx_arm (struct m0_sss_process_fom *pfom)
 
static bool ss_process_confc_ctx_completed (struct m0_fom *fom)
 
static int ss_process_reconfig_data_get (struct m0_fom *fom)
 
static int ss_process_reconfig (struct m0_fom *fom)
 
static int ss_process_lib_load (struct m0_fom *fom)
 
static int ss_process_fom_tail (struct m0_fom *fom, int rc)
 

Variables

enum ss_process_fom_phases M0_XCA_DOMAIN
 
static struct m0_fom_ops ss_process_fom_ops
 
const struct m0_fom_type_ops ss_process_fom_type_ops
 
struct m0_sm_state_descr ss_process_fom_phases []
 
struct m0_sm_conf ss_process_fom_conf
 
struct m0_reqh_service_type m0_ios_type
 
struct m0_reqh_service_type m0_rpc_service_type
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SSS

Definition at line 26 of file process_foms.c.

Enumeration Type Documentation

◆ ss_process_fom_phases

Enumerator
SS_PROCESS_FOM_INIT 
SS_PROCESS_FOM_STOP 
SS_PROCESS_FOM_RECONFIG_GET_DATA 
SS_PROCESS_FOM_RECONFIG_DATA_WAIT 
SS_PROCESS_FOM_RECONFIG 
SS_PROCESS_FOM_HEALTH 
SS_PROCESS_FOM_COUNTER 
SS_PROCESS_FOM_QUIESCE 
SS_PROCESS_FOM_RUNNING_LIST 
SS_PROCESS_FOM_LIB_LOAD 

Definition at line 68 of file process_foms.c.

Function Documentation

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( seg  ,
M0_EXTERN   
)

◆ ss_be_segs_stats_ingest()

static int ss_be_segs_stats_ingest ( struct m0_be_domain dom,
struct m0_ss_process_rep rep 
)
static

Definition at line 289 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_bytecount_stats_ingest()

static int ss_bytecount_stats_ingest ( struct m0_cob_domain cdom,
struct m0_ss_process_rep rep 
)
static

Definition at line 384 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_fop_process_svc_list_fill()

static int ss_fop_process_svc_list_fill ( struct m0_ss_process_svc_list_rep fop,
struct m0_reqh reqh 
)
static

Definition at line 486 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_fop_process_svc_to_buf()

static int ss_fop_process_svc_to_buf ( struct m0_reqh_service svc,
struct m0_buf buf 
)
static

Definition at line 468 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_ios_stats_ingest()

static int ss_ios_stats_ingest ( struct m0_ss_process_rep rep)
static

Definition at line 313 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_ioservice_find()

static struct m0_reqh_service* ss_ioservice_find ( struct m0_reqh reqh)
static

Definition at line 276 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_confc_ctx_arm()

static void ss_process_confc_ctx_arm ( struct m0_sss_process_fom pfom)
static

Definition at line 529 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_confc_ctx_completed()

static bool ss_process_confc_ctx_completed ( struct m0_fom fom)
static

Definition at line 539 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_counter()

static int ss_process_counter ( struct m0_reqh reqh,
struct m0_ss_process_rep rep 
)
static

Definition at line 415 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_fom_create()

static int ss_process_fom_create ( struct m0_fop fop,
struct m0_fom **  out,
struct m0_reqh reqh 
)
static

Definition at line 154 of file process_foms.c.

Here is the call graph for this function:

◆ ss_process_fom_fini()

static void ss_process_fom_fini ( struct m0_fom fom)
static

Definition at line 213 of file process_foms.c.

Here is the call graph for this function:

◆ ss_process_fom_home_locality()

static size_t ss_process_fom_home_locality ( const struct m0_fom fom)
static

Definition at line 741 of file process_foms.c.

◆ ss_process_fom_tail()

static int ss_process_fom_tail ( struct m0_fom fom,
int  rc 
)
static

Definition at line 654 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_fom_tick()

static int ss_process_fom_tick ( struct m0_fom fom)
static

Do nothing here. Signal SIGQUIT is sent from m0_ss_process_stop_fop_release when FOP is freed.

Definition at line 668 of file process_foms.c.

Here is the call graph for this function:

◆ ss_process_fom_tick__init()

static int ss_process_fom_tick__init ( struct m0_fom fom,
const struct m0_reqh reqh 
)
static

Definition at line 227 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_health()

static int ss_process_health ( struct m0_reqh reqh,
int32_t *  h 
)
static

Definition at line 251 of file process_foms.c.

Here is the caller graph for this function:

◆ ss_process_lib_load()

static int ss_process_lib_load ( struct m0_fom fom)
static

Definition at line 620 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_quiesce()

static int ss_process_quiesce ( struct m0_reqh reqh)
static

Initiates process of stopping services found in M0_RST_STARTED state.

Avoids stopping a number of vital services to sustain the ability to:

  • SSS - handle further incoming commands if any
  • RPC - communicate with cluster nodes, including local communication
  • RMS - handle resource requests, owner balancing, etc., that the controlled services depend on

Definition at line 443 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_reconfig()

static int ss_process_reconfig ( struct m0_fom fom)
static

Definition at line 569 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_reconfig_data_get()

static int ss_process_reconfig_data_get ( struct m0_fom fom)
static

Definition at line 551 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ss_process_stats()

static int ss_process_stats ( struct m0_reqh reqh,
struct m0_ss_process_rep rep 
)
static

Definition at line 371 of file process_foms.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ M0_XCA_DOMAIN

enum ss_process_fom_phases M0_XCA_DOMAIN

◆ ss_process_fom_conf

struct m0_sm_conf ss_process_fom_conf
Initial value:
= {
.scf_name = "ss-process-fom-sm",
.scf_nr_states = ARRAY_SIZE(ss_process_fom_phases),
.scf_state = ss_process_fom_phases
}
ss_process_fom_phases
Definition: process_foms.c:68
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 143 of file process_foms.c.

◆ ss_process_fom_ops

struct m0_fom_ops ss_process_fom_ops
static
Initial value:
= {
.fo_tick = ss_process_fom_tick,
.fo_home_locality = ss_process_fom_home_locality,
}
static void ss_process_fom_fini(struct m0_fom *fom)
Definition: process_foms.c:213
static int ss_process_fom_tick(struct m0_fom *fom)
Definition: process_foms.c:668
static size_t ss_process_fom_home_locality(const struct m0_fom *fom)
Definition: process_foms.c:741

Definition at line 81 of file process_foms.c.

◆ ss_process_fom_phases

Definition at line 91 of file process_foms.c.

◆ ss_process_fom_type_ops

const struct m0_fom_type_ops ss_process_fom_type_ops
Initial value:
= {
.fto_create = ss_process_fom_create
}
static int ss_process_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
Definition: process_foms.c:154

Definition at line 87 of file process_foms.c.