Motr  M0
tx_group_fom.c File Reference
#include "lib/trace.h"
#include "be/tx_group_fom.h"
#include "lib/misc.h"
#include "rpc/rpc_opcodes.h"
#include "be/tx_group.h"
#include "be/tx_service.h"
Include dependency graph for tx_group_fom.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_BE
 
#define _S(name, flags, allowed)
 
#define _AST(handler)   (struct m0_sm_ast){ .sa_cb = (handler) }
 

Enumerations

enum  tx_group_fom_state {
  TGS_INIT = M0_FOM_PHASE_INIT, TGS_FINISH = M0_FOM_PHASE_FINISH, TGS_OPEN = M0_FOM_PHASE_NR, TGS_PREPARE,
  TGS_LOGGING, TGS_RECONSTRUCT, TGS_TX_OPEN, TGS_TX_CLOSE,
  TGS_REAPPLY, TGS_PLACING, TGS_PLACED, TGS_STABILIZING,
  TGS_STABLE, TGS_TX_GC_WAIT, TGS_RESET, TGS_STOPPING,
  TGS_FAILED, TGS_NR
}
 

Functions

static struct m0_be_tx_group_fomfom2tx_group_fom (const struct m0_fom *fom)
 
static void tx_group_fom_fini (struct m0_fom *fom)
 
static int tx_group_fom_tick (struct m0_fom *fom)
 
static size_t tx_group_fom_locality (const struct m0_fom *fom)
 
static void be_tx_group_fom_handle (struct m0_sm_group *gr, struct m0_sm_ast *ast)
 
static void be_tx_group_fom_iff_waiting_wakeup (struct m0_fom *fom)
 
static void be_tx_group_fom_stable (struct m0_sm_group *_, struct m0_sm_ast *ast)
 
static void be_tx_group_fom_stop (struct m0_sm_group *gr, struct m0_sm_ast *ast)
 
M0_INTERNAL void m0_be_tx_group_fom_init (struct m0_be_tx_group_fom *m, struct m0_be_tx_group *gr, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_be_tx_group_fom_fini (struct m0_be_tx_group_fom *m)
 
M0_INTERNAL void m0_be_tx_group_fom_reset (struct m0_be_tx_group_fom *m)
 
static void be_tx_group_fom_ast_post (struct m0_be_tx_group_fom *gf, struct m0_sm_ast *ast)
 
M0_INTERNAL int m0_be_tx_group_fom_start (struct m0_be_tx_group_fom *gf)
 
M0_INTERNAL void m0_be_tx_group_fom_stop (struct m0_be_tx_group_fom *gf)
 
M0_INTERNAL void m0_be_tx_group_fom_handle (struct m0_be_tx_group_fom *m)
 
M0_INTERNAL void m0_be_tx_group_fom_stable (struct m0_be_tx_group_fom *gf)
 
M0_INTERNAL struct m0_sm_groupm0_be_tx_group_fom__sm_group (struct m0_be_tx_group_fom *m)
 
M0_INTERNAL void m0_be_tx_group_fom_recovery_prepare (struct m0_be_tx_group_fom *m)
 
M0_INTERNAL void m0_be_tx_group_fom_mod_init (void)
 
M0_INTERNAL void m0_be_tx_group_fom_mod_fini (void)
 

Variables

static struct m0_sm_state_descr tx_group_fom_states [TGS_NR]
 
static const struct m0_sm_conf tx_group_fom_conf
 
static const struct m0_fom_ops tx_group_fom_ops
 
static struct m0_fom_type tx_group_fom_type
 
static const struct m0_fom_type_ops tx_group_fom_type_ops
 

Macro Definition Documentation

◆ _AST

#define _AST (   handler)    (struct m0_sm_ast){ .sa_cb = (handler) }

◆ _S

#define _S (   name,
  flags,
  allowed 
)
Value:
[name] = { \
.sd_flags = flags, \
.sd_name = #name, \
.sd_allowed = allowed \
}
int const char const void size_t int flags
Definition: dir.c:328
const char * name
Definition: trace.c:110

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_BE

Definition at line 23 of file tx_group_fom.c.