Motr  M0
sliding window update fom
Collaboration diagram for sliding window update fom:

Enumerations

enum  cm_sw_update_fom_phase { SWU_UPDATE = M0_FOM_PHASE_INIT, SWU_FINI = M0_FOM_PHASE_FINISH, SWU_NR }
 

Functions

static struct m0_cmcm_swu2cm (struct m0_cm_sw_update *swu)
 
static struct m0_cm_sw_updatecm_fom2swu (struct m0_fom *fom)
 
static int swu_update (struct m0_cm_sw_update *swu)
 
static uint64_t cm_swu_fom_locality (const struct m0_fom *fom)
 
static int cm_swu_fom_tick (struct m0_fom *fom)
 
static void cm_swu_fom_fini (struct m0_fom *fom)
 
M0_INTERNAL void m0_cm_sw_update_init (struct m0_cm_type *cmtype)
 
M0_INTERNAL void m0_cm_sw_update_start (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_sw_update_complete (struct m0_cm *cm)
 

Variables

static const struct m0_fom_type_ops cm_sw_update_fom_type_ops
 
static struct m0_sm_state_descr cm_sw_update_sd [SWU_NR]
 
struct m0_sm_conf cm_sw_update_conf
 
static int(* swu_action [])(struct m0_cm_sw_update *swu)
 
static const struct m0_fom_ops cm_sw_update_fom_ops
 

Detailed Description

Implementation of sliding window update FOM. Provides mechanism to handle blocking operations like local sliding update and updating the persistent store with new sliding window. Provides interfaces to start, wakeup (if idle) and stop the sliding window update FOM.

Enumeration Type Documentation

◆ cm_sw_update_fom_phase

Enumerator
SWU_UPDATE 
SWU_FINI 
SWU_NR 

Definition at line 53 of file sw_update_fom.c.

Function Documentation

◆ cm_fom2swu()

static struct m0_cm_sw_update* cm_fom2swu ( struct m0_fom fom)
static

Definition at line 86 of file sw_update_fom.c.

Here is the caller graph for this function:

◆ cm_swu2cm()

static struct m0_cm* cm_swu2cm ( struct m0_cm_sw_update swu)
static

Definition at line 81 of file sw_update_fom.c.

Here is the caller graph for this function:

◆ cm_swu_fom_fini()

static void cm_swu_fom_fini ( struct m0_fom fom)
static

Definition at line 147 of file sw_update_fom.c.

Here is the call graph for this function:

◆ cm_swu_fom_locality()

static uint64_t cm_swu_fom_locality ( const struct m0_fom fom)
static

Definition at line 105 of file sw_update_fom.c.

◆ cm_swu_fom_tick()

static int cm_swu_fom_tick ( struct m0_fom fom)
static

Definition at line 109 of file sw_update_fom.c.

Here is the call graph for this function:

◆ m0_cm_sw_update_complete()

M0_INTERNAL void m0_cm_sw_update_complete ( struct m0_cm cm)

Definition at line 180 of file sw_update_fom.c.

Here is the caller graph for this function:

◆ m0_cm_sw_update_init()

M0_INTERNAL void m0_cm_sw_update_init ( struct m0_cm_type cmtype)

Definition at line 158 of file sw_update_fom.c.

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

◆ m0_cm_sw_update_start()

M0_INTERNAL void m0_cm_sw_update_start ( struct m0_cm cm)

Starts sliding window update FOM by submitting the corresponding FOM to request handler.

Definition at line 165 of file sw_update_fom.c.

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

◆ swu_update()

static int swu_update ( struct m0_cm_sw_update swu)
static

Definition at line 91 of file sw_update_fom.c.

Here is the call graph for this function:

Variable Documentation

◆ cm_sw_update_conf

struct m0_sm_conf cm_sw_update_conf
Initial value:
= {
.scf_name = "sm: sw update conf",
.scf_nr_states = ARRAY_SIZE(cm_sw_update_sd),
.scf_state = cm_sw_update_sd,
}
static struct m0_sm_state_descr cm_sw_update_sd[SWU_NR]
Definition: sw_update_fom.c:62
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 75 of file sw_update_fom.c.

◆ cm_sw_update_fom_ops

const struct m0_fom_ops cm_sw_update_fom_ops
static
Initial value:
= {
.fo_fini = cm_swu_fom_fini,
.fo_tick = cm_swu_fom_tick,
.fo_home_locality = cm_swu_fom_locality
}
static uint64_t cm_swu_fom_locality(const struct m0_fom *fom)
static int cm_swu_fom_tick(struct m0_fom *fom)
static void cm_swu_fom_fini(struct m0_fom *fom)

Definition at line 152 of file sw_update_fom.c.

◆ cm_sw_update_fom_type_ops

const struct m0_fom_type_ops cm_sw_update_fom_type_ops
static
Initial value:
= {
}

Definition at line 59 of file sw_update_fom.c.

◆ cm_sw_update_sd

struct m0_sm_state_descr cm_sw_update_sd[SWU_NR]
static
Initial value:
= {
[SWU_UPDATE] = {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "Update",
.sd_allowed = M0_BITS(SWU_FINI)
},
[SWU_FINI] = {
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "Fini",
.sd_allowed = 0
},
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 62 of file sw_update_fom.c.

◆ swu_action

int(* swu_action[])(struct m0_cm_sw_update *swu)
static
Initial value:
= {
}
static int swu_update(struct m0_cm_sw_update *swu)
Definition: sw_update_fom.c:91

Definition at line 101 of file sw_update_fom.c.