Motr  M0
poolmach.c File Reference
#include "sns/repair.h"
Include dependency graph for poolmach.c:

Go to the source code of this file.

Functions

M0_INTERNAL int m0_poolmach_init (struct m0_poolmach *pm, struct m0_dtm *dtm)
 
M0_INTERNAL void m0_poolmach_fini (struct m0_poolmach *pm)
 
M0_INTERNAL int m0_poolmach_device_join (struct m0_poolmach *pm, struct m0_pooldev *dev)
 
M0_INTERNAL int m0_poolmach_device_leave (struct m0_poolmach *pm, struct m0_pooldev *dev)
 
M0_INTERNAL int m0_poolmach_node_join (struct m0_poolmach *pm, struct m0_poolnode *node)
 
M0_INTERNAL int m0_poolmach_node_leave (struct m0_poolmach *pm, struct m0_poolnode *node)
 
static int poolmach_recover (struct m0_persistent_sm *pmach)
 

Variables

static const struct m0_persistent_sm_ops poolmach_persistent_sm_ops
 

Function Documentation

◆ m0_poolmach_device_join()

M0_INTERNAL int m0_poolmach_device_join ( struct m0_poolmach pm,
struct m0_pooldev dev 
)

Definition at line 42 of file poolmach.c.

◆ m0_poolmach_device_leave()

M0_INTERNAL int m0_poolmach_device_leave ( struct m0_poolmach pm,
struct m0_pooldev dev 
)

Definition at line 47 of file poolmach.c.

◆ m0_poolmach_fini()

M0_INTERNAL void m0_poolmach_fini ( struct m0_poolmach pm)

Definition at line 37 of file poolmach.c.

◆ m0_poolmach_init()

M0_INTERNAL int m0_poolmach_init ( struct m0_poolmach pm,
struct m0_dtm dtm 
)

Register pool state machine as a persistent state machine with the given transaction manager instance. This allows poolmachine to update its persisten state transactionally and to be call-back on node restart.

Definition at line 31 of file poolmach.c.

◆ m0_poolmach_node_join()

M0_INTERNAL int m0_poolmach_node_join ( struct m0_poolmach pm,
struct m0_poolnode node 
)

Definition at line 52 of file poolmach.c.

◆ m0_poolmach_node_leave()

M0_INTERNAL int m0_poolmach_node_leave ( struct m0_poolmach pm,
struct m0_poolnode node 
)

Definition at line 57 of file poolmach.c.

◆ poolmach_recover()

static int poolmach_recover ( struct m0_persistent_sm *  pmach)
static

Pool machine recovery call-back.

This function is installed as m0_persistent_sm_ops::pso_recover method of a persistent state machine. It is called when a node hosting a pool machine replica reboots and starts local recovery.

Definition at line 69 of file poolmach.c.

Variable Documentation

◆ poolmach_persistent_sm_ops

const struct m0_persistent_sm_ops poolmach_persistent_sm_ops
static
Initial value:
= {
.pso_recover = poolmach_recover
}
static int poolmach_recover(struct m0_persistent_sm *pmach)
Definition: poolmach.c:69

Definition at line 76 of file poolmach.c.