Motr  M0
failvec.c File Reference
#include "lib/trace.h"
#include "lib/chan.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "module/instance.h"
#include "ha/failvec.h"
#include "ha/msg.h"
#include "ha/link.h"
#include "ha/note.h"
#include "pool/pool_machine.h"
#include "pool/pool.h"
#include "reqh/reqh.h"
#include "fid/fid.h"
Include dependency graph for failvec.c:

Go to the source code of this file.

Data Structures

struct  ha_fvec_handler_request
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 

Functions

static uint32_t fvec_rep_msg_vec_len (const struct m0_ha_msg *msg)
 
static const struct m0_cookiefvec_msg_cookie_get (const struct m0_ha_msg *msg)
 
static const struct m0_ha_notefvec_rep_msg_to_note (const struct m0_ha_msg *msg)
 
static const struct m0_fidfvec_msg_to_pool (const struct m0_ha_msg *msg)
 
static uint32_t fvec_msg_type (const struct m0_ha_msg *msg)
 
 M0_TL_DESCR_DEFINE (ha_fvreq, "failure-vec-req", static, struct ha_fvec_handler_request, fhr_tlink, fhr_magic, 20, 21)
 
 M0_TL_DEFINE (ha_fvreq, static, struct ha_fvec_handler_request)
 
static void ha_fvec_handler_msg (struct m0_ha_handler *hh, struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag, void *data)
 
M0_INTERNAL int m0_ha_fvec_handler_init (struct m0_ha_fvec_handler *hfh, struct m0_ha_dispatcher *hd)
 
M0_INTERNAL void m0_ha_fvec_handler_fini (struct m0_ha_fvec_handler *hfh)
 
M0_INTERNAL int m0_ha_fvec_handler_add (struct m0_ha_fvec_handler *hfh, const struct m0_fid *pool_fid, struct m0_poolmach *pool_mach, struct m0_chan *chan, struct m0_cookie *cookie)
 
M0_INTERNAL void m0_ha_fvec_rep_handler (struct m0_ha_fvec_handler *hfh, const struct m0_ha_msg *msg)
 
M0_INTERNAL void m0_ha_fvec_req_handler (struct m0_ha_fvec_handler *hfh, const struct m0_ha_msg *msg, struct m0_ha_link *hl)
 
M0_INTERNAL int m0_ha_failvec_fetch (const struct m0_fid *pool_fid, struct m0_poolmach *pmach, struct m0_chan *chan)
 
static void ha_ut_fvec_reply_populate (struct m0_ha_msg *msg)
 
static void ha_msg_fvec_build (struct m0_ha_msg *msg, const struct m0_fid *pool_fid, struct m0_ha_link *hl)
 
M0_INTERNAL int m0_ha_msg_fvec_send (const struct m0_fid *pool_fid, const struct m0_cookie *cookie, struct m0_ha_link *hl, uint32_t type)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 23 of file failvec.c.

Function Documentation

◆ fvec_msg_cookie_get()

static const struct m0_cookie* fvec_msg_cookie_get ( const struct m0_ha_msg msg)
static

Definition at line 57 of file failvec.c.

Here is the caller graph for this function:

◆ fvec_msg_to_pool()

static const struct m0_fid* fvec_msg_to_pool ( const struct m0_ha_msg msg)
static

Definition at line 69 of file failvec.c.

Here is the caller graph for this function:

◆ fvec_msg_type()

static uint32_t fvec_msg_type ( const struct m0_ha_msg msg)
static

Definition at line 74 of file failvec.c.

Here is the caller graph for this function:

◆ fvec_rep_msg_to_note()

static const struct m0_ha_note* fvec_rep_msg_to_note ( const struct m0_ha_msg msg)
static

Definition at line 63 of file failvec.c.

Here is the caller graph for this function:

◆ fvec_rep_msg_vec_len()

static uint32_t fvec_rep_msg_vec_len ( const struct m0_ha_msg msg)
static

Definition at line 51 of file failvec.c.

Here is the caller graph for this function:

◆ ha_fvec_handler_msg()

static void ha_fvec_handler_msg ( struct m0_ha_handler hh,
struct m0_ha ha,
struct m0_ha_link hl,
struct m0_ha_msg msg,
uint64_t  tag,
void *  data 
)
static

Definition at line 83 of file failvec.c.

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

◆ ha_msg_fvec_build()

static void ha_msg_fvec_build ( struct m0_ha_msg msg,
const struct m0_fid pool_fid,
struct m0_ha_link hl 
)
static

Definition at line 252 of file failvec.c.

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

◆ ha_ut_fvec_reply_populate()

static void ha_ut_fvec_reply_populate ( struct m0_ha_msg msg)
static

Definition at line 230 of file failvec.c.

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

◆ m0_ha_failvec_fetch()

M0_INTERNAL int m0_ha_failvec_fetch ( const struct m0_fid pool_fid,
struct m0_poolmach pmach,
struct m0_chan chan 
)

Requests for the failure vector for the given pool machine.

Definition at line 208 of file failvec.c.

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

◆ m0_ha_fvec_handler_add()

M0_INTERNAL int m0_ha_fvec_handler_add ( struct m0_ha_fvec_handler hfh,
const struct m0_fid pool_fid,
struct m0_poolmach pool_mach,
struct m0_chan chan,
struct m0_cookie cookie 
)

Definition at line 135 of file failvec.c.

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

◆ m0_ha_fvec_handler_fini()

M0_INTERNAL void m0_ha_fvec_handler_fini ( struct m0_ha_fvec_handler hfh)

Definition at line 126 of file failvec.c.

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

◆ m0_ha_fvec_handler_init()

M0_INTERNAL int m0_ha_fvec_handler_init ( struct m0_ha_fvec_handler hfh,
struct m0_ha_dispatcher hd 
)

Definition at line 108 of file failvec.c.

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

◆ m0_ha_fvec_rep_handler()

M0_INTERNAL void m0_ha_fvec_rep_handler ( struct m0_ha_fvec_handler hfh,
const struct m0_ha_msg msg 
)

Applies the received failure vector to respective pool-machine.

Definition at line 165 of file failvec.c.

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

◆ m0_ha_fvec_req_handler()

M0_INTERNAL void m0_ha_fvec_req_handler ( struct m0_ha_fvec_handler hfh,
const struct m0_ha_msg msg,
struct m0_ha_link hl 
)

Handles requests to fetch failure vector.

Definition at line 191 of file failvec.c.

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

◆ m0_ha_msg_fvec_send()

M0_INTERNAL int m0_ha_msg_fvec_send ( const struct m0_fid pool_fid,
const struct m0_cookie req_cookie,
struct m0_ha_link hl,
uint32_t  type 
)

Sends an HA message to store/fetch the failure vector from HA.

Definition at line 275 of file failvec.c.

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

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( ha_fvreq  ,
static  ,
struct ha_fvec_handler_request   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( ha_fvreq  ,
"failure-vec-req ,
static  ,
struct ha_fvec_handler_request  ,
fhr_tlink  ,
fhr_magic  ,
20  ,
21   
)