Motr  M0
rconfc Internals

Data Structures

struct  rlock_ctx
 
struct  ver_item
 
struct  ver_accm
 
struct  rconfc_link
 

Enumerations

enum  confc_state {
  CONFC_IDLE, CONFC_ARMED, CONFC_OPEN, CONFC_FAILED,
  CONFC_DEAD
}
 
enum  { VERSION_ITEMS_TOTAL_MAX = 256 }
 

Functions

static void rconfc_start (struct m0_rconfc *rconfc)
 
static void rconfc_stop_internal (struct m0_rconfc *rconfc)
 
static uint32_t rconfc_state (const struct m0_rconfc *rconfc)
 
static bool rconfc_gate_check (struct m0_confc *confc)
 
static int rconfc_gate_skip (struct m0_confc *confc)
 
static bool rconfc_gate_drain (struct m0_clink *clink)
 
static bool ha_clink_cb (struct m0_clink *clink)
 
static void rconfc_read_lock_get (struct m0_rconfc *rconfc)
 
static void rconfc_read_lock_complete (struct m0_rm_incoming *in, int32_t rc)
 
static void rconfc_read_lock_conflict (struct m0_rm_incoming *in)
 
 M0_TL_DESCR_DEFINE (rcnf_herd, "rconfc's working confc list", M0_INTERNAL, struct rconfc_link, rl_herd, rl_magic, M0_RCONFC_LINK_MAGIC, M0_RCONFC_HERD_HEAD_MAGIC)
 
 M0_TL_DEFINE (rcnf_herd, M0_INTERNAL, struct rconfc_link)
 
 M0_TL_DESCR_DEFINE (rcnf_active, "rconfc's active confc list", M0_INTERNAL, struct rconfc_link, rl_active, rl_magic, M0_RCONFC_LINK_MAGIC, M0_RCONFC_ACTIVE_HEAD_MAGIC)
 
 M0_TL_DEFINE (rcnf_active, M0_INTERNAL, struct rconfc_link)
 
static void rconfc_load_ast_thread (struct rconfc_load_ctx *rx)
 
static int rconfc_load_ast_thread_init (struct rconfc_load_ctx *rx)
 
static void rconfc_load_ast_thread_fini (struct rconfc_load_ctx *rx)
 
static void rconfc_idle (struct m0_rconfc *rconfc)
 
static void rconfc_fail (struct m0_rconfc *rconfc, int rc)
 
static void rconfc_conf_load_fini (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rconfc_conf_full_load (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static uint64_t _confc_ver_read (const struct m0_confc *confc)
 
static const char * _confc_remote_addr_read (const struct m0_confc *confc)
 
static int _confc_cache_clean (struct m0_confc *confc)
 
static int _confc_cache_clean_lock (struct m0_confc *confc)
 
static int _confc_phony_init (struct m0_confc *confc)
 
static void _confc_phony_fini (struct m0_confc *phony)
 
static int _confc_phony_cache_append (struct m0_confc *confc, const struct m0_fid *fid)
 
static void _confc_phony_cache_remove (struct m0_confc *confc, const struct m0_fid *fid)
 
static int rlock_ctx_read_domain_init (struct rlock_ctx *rlx)
 
static void rlock_ctx_read_domain_fini (struct rlock_ctx *rlx)
 
static struct m0_rconfcrlock_ctx_incoming_to_rconfc (struct m0_rm_incoming *in)
 
static bool rlock_ctx_is_online (struct rlock_ctx *rlx)
 
static void rlock_ctx_disconnect (struct rlock_ctx *rlx)
 
static int rlock_ctx_connect (struct rlock_ctx *rlx, const char *ep)
 
static int rlock_ctx_create (struct m0_rconfc *parent, struct m0_rpc_machine *rmach, struct rlock_ctx **out)
 
static void rlock_ctx_destroy (struct rlock_ctx *rlx)
 
static enum m0_rm_owner_state rlock_ctx_creditor_state (struct rlock_ctx *rlx)
 
static int rlock_ctx_creditor_setup (struct rlock_ctx *rlx, const char *ep)
 
static void rlock_ctx_creditor_unset (struct rlock_ctx *rlx)
 
static void rlock_ctx_owner_windup (struct rlock_ctx *rlx)
 
static void ver_accm_init (struct ver_accm *va, int total)
 
static uint32_t rconfc_confd_count (const char **confd_addr)
 
static bool rconfc_confd_addr_are_all_unique (const char **confd_addr)
 
static bool rconfc_is_locked (struct m0_rconfc *rconfc)
 
static void rconfc_read_lock_put (struct m0_rconfc *rconfc)
 
static void rconfc__ast_post (struct m0_rconfc *rconfc, void *datum, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
 
static void rconfc_link_ast_post (struct rconfc_link *lnk, void *datum, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
 
static void rconfc_ast_post (struct m0_rconfc *rconfc, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
 
static void rconfc_state_set (struct m0_rconfc *rconfc, int state)
 
static void _failure_ast_cb (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
 
static void rconfc_fail_ast (struct m0_rconfc *rconfc, int rc)
 
M0_INTERNAL bool m0_rconfc_reading_is_allowed (const struct m0_rconfc *rconfc)
 
static bool rconfc_quorum_is_reached (struct m0_rconfc *rconfc)
 
static void rconfc_active_all_unlink (struct m0_rconfc *rconfc)
 
static void rconfc_herd_link_subscribe (struct rconfc_link *lnk)
 
static void rconfc_link_fini_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rconfc_herd_link_unsubscribe (struct rconfc_link *lnk)
 
static struct m0_reqhrconfc_link2reqh (struct rconfc_link *lnk)
 
static bool rconfc_herd_link__on_death_cb (struct m0_clink *clink)
 
static void rconfc_herd_link_init (struct rconfc_link *lnk)
 
M0_INTERNAL void rconfc_herd_link_fini (struct rconfc_link *lnk)
 
static void rconfc_herd_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc_herd_fini_cb (struct m0_clink *link)
 
static void rconfc_ha_update_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc_ha_update_cb (struct m0_clink *link)
 
static int rconfc_herd_fini (struct m0_rconfc *rconfc)
 
static void rconfc_herd_link_destroy (struct rconfc_link *lnk)
 
M0_INTERNAL void rconfc_herd_link_cleanup (struct rconfc_link *lnk)
 
static void rconfc_herd_prune (struct m0_rconfc *rconfc)
 
static int rconfc_herd_destroy (struct m0_rconfc *rconfc)
 
M0_INTERNAL struct rconfc_linkrconfc_herd_find (struct m0_rconfc *rconfc, const char *addr)
 
static int rconfc_herd_update (struct m0_rconfc *rconfc, const char **confd_addr, struct m0_fid_arr *confd_fids)
 
static void rconfc_active_add (struct m0_rconfc *rconfc, struct rconfc_link *lnk)
 
static void rconfc_active_populate (struct m0_rconfc *rconfc)
 
static int rconfc_conductor_connect (struct m0_rconfc *rconfc, struct rconfc_link *lnk)
 
static int rconfc_conductor_iterate (struct m0_rconfc *rconfc)
 
static void rconfc_entrypoint_debug_print (struct m0_ha_entrypoint_rep *entrypoint)
 
static int rconfc_entrypoint_consume (struct m0_rconfc *rconfc)
 
static int rconfc_start_internal (struct m0_rconfc *rconfc)
 
static void rconfc_start_ast_cb (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
 
static void rconfc_read_lock_retry (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
 
static void rconfc_owner_creditor_reset (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
 
static bool rlock_owner_clink_cb (struct m0_clink *cl)
 
static void rconfc_creditor_death_handle (struct m0_rconfc *rconfc)
 
static void rconfc_conductor_disconnected (struct m0_rconfc *rconfc)
 
static void rconfc_conductor_disconnected_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc_conductor_disconnect_cb (struct m0_clink *clink)
 
static void rconfc_conductor_drained (struct m0_rconfc *rconfc)
 
static void rconfc_conductor_drain (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc_unpinned_cb (struct m0_clink *link)
 
static void rlock_conflict_handle (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rconfc_rlock_windup (struct m0_rconfc *rconfc)
 
static void rconfc_stop_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc_quorum_is_possible (struct m0_rconfc *rconfc)
 
static bool rconfc_quorum_test (struct m0_rconfc *rconfc, struct m0_confc *confc)
 
static int rconfc_conductor_engage (struct m0_rconfc *rconfc)
 
static void rconfc_cctx_fini (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rconfc_herd_cctxs_fini (struct m0_rconfc *rconfc)
 
static void rconfc_version_elected (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool rconfc__cb_quorum_test (struct m0_clink *clink)
 
static void rconfc_version_elect (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static int rconfc_local_load (struct m0_rconfc *rconfc)
 
M0_INTERNAL void m0_rconfc_lock (struct m0_rconfc *rconfc)
 
M0_INTERNAL void m0_rconfc_unlock (struct m0_rconfc *rconfc)
 
M0_INTERNAL int m0_rconfc_init (struct m0_rconfc *rconfc, const struct m0_fid *profile, struct m0_sm_group *sm_group, struct m0_rpc_machine *rmach, m0_rconfc_cb_t expired_cb, m0_rconfc_cb_t ready_cb)
 
M0_INTERNAL int m0_rconfc_start (struct m0_rconfc *rconfc)
 
M0_INTERNAL int m0_rconfc_start_wait (struct m0_rconfc *rconfc, uint64_t timeout_ns)
 
M0_INTERNAL void m0_rconfc_stop (struct m0_rconfc *rconfc)
 
M0_INTERNAL void m0_rconfc_stop_sync (struct m0_rconfc *rconfc)
 
M0_INTERNAL void m0_rconfc_fini (struct m0_rconfc *rconfc)
 
M0_INTERNAL uint64_t m0_rconfc_ver_max_read (struct m0_rconfc *rconfc)
 
M0_INTERNAL void m0_rconfc_fatal_cb_set (struct m0_rconfc *rconfc, m0_rconfc_cb_t cb)
 
M0_INTERNAL int m0_rconfc_confd_endpoints (struct m0_rconfc *rconfc, const char ***eps)
 
M0_INTERNAL int m0_rconfc_rm_endpoint (struct m0_rconfc *rconfc, char **ep)
 
M0_INTERNAL void m0_rconfc_rm_fid (struct m0_rconfc *rconfc, struct m0_fid *out)
 
M0_INTERNAL bool m0_rconfc_is_preloaded (struct m0_rconfc *rconfc)
 

Variables

struct m0_confc_gate_ops m0_rconfc_gate_ops
 
struct m0_rm_incoming_ops m0_rconfc_ri_ops
 
static struct m0_sm_state_descr rconfc_states []
 
static const struct m0_sm_conf rconfc_sm_conf
 

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VERSION_ITEMS_TOTAL_MAX 

Definition at line 77 of file rconfc_internal.h.

◆ confc_state

Enumerator
CONFC_IDLE 

0 The confd is connected to with no reading

CONFC_ARMED 

1 Reading version from the confd has started

CONFC_OPEN 

2 The confd was used to engage conductor

CONFC_FAILED 

3 Reading failure registered with the confd

CONFC_DEAD 

4 The confd has failed to establish connection

Definition at line 37 of file rconfc_internal.h.

Function Documentation

◆ _confc_cache_clean()

static int _confc_cache_clean ( struct m0_confc confc)
static
Todo:
Confc root pointer is not valid anymore after cache cleanup, so it should be reinitialised. The easiest way would be to reinitialise confc completely, but user can create confc contexts during reelection, so let's reinitialise root object in different way.

Definition at line 767 of file rconfc.c.

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

◆ _confc_cache_clean_lock()

static int _confc_cache_clean_lock ( struct m0_confc confc)
static

Definition at line 785 of file rconfc.c.

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

◆ _confc_phony_cache_append()

static int _confc_phony_cache_append ( struct m0_confc confc,
const struct m0_fid fid 
)
static

Appends fake object to phony cache if it's not there yet.

Definition at line 845 of file rconfc.c.

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

◆ _confc_phony_cache_remove()

static void _confc_phony_cache_remove ( struct m0_confc confc,
const struct m0_fid fid 
)
static

Removes fake conf object with respective fid from phony cache. Object status needs to be forced to M0_CS_MISSING to safely pass m0_conf_cache_del().

Definition at line 885 of file rconfc.c.

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

◆ _confc_phony_fini()

static void _confc_phony_fini ( struct m0_confc phony)
static

Finalisation of the phony confc. Indicates that no HA notification is expected anymore, so the instance must be removed from HA client list and drained safely.

Definition at line 830 of file rconfc.c.

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

◆ _confc_phony_init()

static int _confc_phony_init ( struct m0_confc confc)
static

Phony confc initialisation. Done with no confd address, and cache being fed with minimal formal local cache string containing root object only. Once initialised, it is expected to append proper object FIDs, obtained from HA and watched for death notifications during entire rconfc instance life cycle.

Definition at line 804 of file rconfc.c.

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

◆ _confc_remote_addr_read()

static const char* _confc_remote_addr_read ( const struct m0_confc confc)
static

Safe remote confd address reading

Definition at line 760 of file rconfc.c.

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

◆ _confc_ver_read()

static uint64_t _confc_ver_read ( const struct m0_confc confc)
static

Definition at line 754 of file rconfc.c.

Here is the caller graph for this function:

◆ _failure_ast_cb()

static void _failure_ast_cb ( struct m0_sm_group *grp  M0_UNUSED,
struct m0_sm_ast ast 
)
static

Definition at line 1215 of file rconfc.c.

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

◆ ha_clink_cb()

static bool ha_clink_cb ( struct m0_clink clink)
static

Definition at line 3142 of file rconfc.c.

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

◆ m0_rconfc_confd_endpoints()

M0_INTERNAL int m0_rconfc_confd_endpoints ( struct m0_rconfc rconfc,
const char ***  eps 
)

Allocates and fills eps with confd endpoints from m0_rconfc::rc_herd list. Returns number of endpoints or -ENOMEM if memory allocation was failed during duplication of an endpoint.

Precondition
rconfc_state(rconfc) != M0_RCS_INIT

Definition at line 3081 of file rconfc.c.

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

◆ m0_rconfc_fatal_cb_set()

M0_INTERNAL void m0_rconfc_fatal_cb_set ( struct m0_rconfc rconfc,
m0_rconfc_cb_t  cb 
)

Installs rconfc fatal callback.

Precondition
rconfc is locked.

Definition at line 3067 of file rconfc.c.

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

◆ m0_rconfc_fini()

M0_INTERNAL void m0_rconfc_fini ( struct m0_rconfc rconfc)

Finalises rconfc instance.

Definition at line 3009 of file rconfc.c.

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

◆ m0_rconfc_init()

M0_INTERNAL int m0_rconfc_init ( struct m0_rconfc rconfc,
const struct m0_fid profile,
struct m0_sm_group sm_group,
struct m0_rpc_machine rmach,
m0_rconfc_cb_t  expired_cb,
m0_rconfc_cb_t  ready_cb 
)

Initialise redundant configuration client instance.

If initialisation fails, then finalisation is done internally. No explicit m0_rconfc_fini() is needed.

Parameters
rconfc- rconfc instance
profile- makes sense for clients only, otherwise - &M0_FID0.
sm_group- state machine group to be used with confc. Opening conf objects later in context of this SM group is prohibited, so providing locality SM group is a bad choice. Use locality0 (m0_locality0_get()) or some dedicated SM group.
rmach- RPC machine to be used to communicate with confd
exp_cb- callback, a "configuration just expired" event
ready_cb- rconfc is ready for reading configuration

Definition at line 2860 of file rconfc.c.

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

◆ m0_rconfc_is_preloaded()

M0_INTERNAL bool m0_rconfc_is_preloaded ( struct m0_rconfc rconfc)

When running 'pre-loaded' mode no communication with a herd of confd instances, reaching quorum, getting read lock, blocking read context, etc. is supposed on such rconfc instance. In this case it just shells the pre-filled rc_confc while having all event mechanisms disabled. In this case rconfc remains to be in M0_RCS_INIT state.

Note
Due to being in M0_RCS_INIT state calling m0_rconfc_ver_max_read(), m0_rconfc_rm_endpoint() and m0_rconfc_confd_endpoints() makes no sense with such rconfc, and therefore, prohibited. Rconfc starting and stopping under the circumstances causes no effect on the internal state machine, which remains in M0_RCS_INIT state during all its life.

Definition at line 3135 of file rconfc.c.

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

◆ m0_rconfc_lock()

M0_INTERNAL void m0_rconfc_lock ( struct m0_rconfc rconfc)

Definition at line 2841 of file rconfc.c.

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

◆ m0_rconfc_reading_is_allowed()

M0_INTERNAL bool m0_rconfc_reading_is_allowed ( const struct m0_rconfc rconfc)

Indicates whether rconfc in M0_RCS_IDLE state or not, In M0_RCS_IDLE state rconfc holds a read lock and a client is able to read configuration.

Definition at line 1241 of file rconfc.c.

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

◆ m0_rconfc_rm_endpoint()

M0_INTERNAL int m0_rconfc_rm_endpoint ( struct m0_rconfc rconfc,
char **  ep 
)

Allocates and fills ep with RM endpoint from m0_rconfc::rc_rlock_ctx::rlc_rm_addr. Returns 0 if success or -ENOMEM if memory allocation was failed during duplication of the endpoint.

Precondition
rconfc_state(rconfc) != M0_RCS_INIT

Definition at line 3106 of file rconfc.c.

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

◆ m0_rconfc_rm_fid()

M0_INTERNAL void m0_rconfc_rm_fid ( struct m0_rconfc rconfc,
struct m0_fid out 
)

Returns the fid of active RM obtained by entrypoint request to HA.

Precondition
rconfc_state(rconfc) != M0_RCS_INIT

Definition at line 3122 of file rconfc.c.

Here is the call graph for this function:

◆ m0_rconfc_start()

M0_INTERNAL int m0_rconfc_start ( struct m0_rconfc rconfc)

Rconfc starts with obtaining all necessary information (cluster "entry point") from HA service.

Rconfc continues with election, where allocated confc instances poll corresponding confd for configuration version number they currently run. At the same time confd availability is tested.

Election ends when some version has a quorum. At the same time the active list is populated with rconfc_link instances which confc points to confd of the newly elected version.

Function is asynchronous, user can wait on rconfc->rc_sm.sm_chan until rconfc->rc_sm.sm_state in (M0_RCS_IDLE, M0_RCS_FAILURE). M0_RCS_FAILURE state means that start failed, return code can be obtained from rconfc->rc_sm.sm_rc.

Note
Even with unsuccessful startup rconfc instance requires for explicit m0_rconfc_stop(). The behavior is to provide an ability to call m0_rconfc_ver_max_read() even after unsuccessful version election.

When m0_rconfc::rc_local_conf is not NULL during start, m0_rconfc::rc_confc is pre-loaded from the local configuration string. Such rconfc instance does not participate in standard rconfc activity like holding read lock, version election etc., and being pre-loaded it can only be stopped and finalised.

Note
if rconfc starts successfully and m0_rconfc::rc_ready_cb is not NULL, then the callback is invoked.
See also
m0_rconfc_is_preloaded()

Definition at line 2928 of file rconfc.c.

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

◆ m0_rconfc_start_wait()

M0_INTERNAL int m0_rconfc_start_wait ( struct m0_rconfc rconfc,
uint64_t  timeout_ns 
)

Synchronous version of m0_rconfc_start() with limited deadline. Use M0_TIME_NEVER value to indicate infinite waiting.

Definition at line 2942 of file rconfc.c.

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

◆ m0_rconfc_stop()

M0_INTERNAL void m0_rconfc_stop ( struct m0_rconfc rconfc)

Finalises dedicated m0_rconfc::rc_confc instance and puts all the acquired resources back.

Function is asynchronous, user should wait on rconfc->rc_sm.sm_chan until rconfc->rc_sm.sm_state is M0_RCS_FINAL.

Note
User is not allowed to call m0_rconfc_start() again on stopped rconfc instance as well as other API. The only calls allowed with stopped instance are m0_rconfc_ver_max_read() and m0_rconfc_fini().

Definition at line 2978 of file rconfc.c.

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

◆ m0_rconfc_stop_sync()

M0_INTERNAL void m0_rconfc_stop_sync ( struct m0_rconfc rconfc)

Synchronous version of m0_rconfc_stop().

Definition at line 2995 of file rconfc.c.

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

◆ m0_rconfc_unlock()

M0_INTERNAL void m0_rconfc_unlock ( struct m0_rconfc rconfc)

Definition at line 2855 of file rconfc.c.

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

◆ m0_rconfc_ver_max_read()

M0_INTERNAL uint64_t m0_rconfc_ver_max_read ( struct m0_rconfc rconfc)

Maximum version number the herd confc elements gathered from their confd peers.

Note
Supposed to be called internally, e.g. by spiel during transaction opening.
Precondition
rconfc_state(rconfc) != M0_RCS_INIT

Definition at line 3052 of file rconfc.c.

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

◆ M0_TL_DEFINE() [1/2]

M0_TL_DEFINE ( rcnf_herd  ,
M0_INTERNAL  ,
struct rconfc_link   
)

◆ M0_TL_DEFINE() [2/2]

M0_TL_DEFINE ( rcnf_active  ,
M0_INTERNAL  ,
struct rconfc_link   
)

◆ M0_TL_DESCR_DEFINE() [1/2]

M0_TL_DESCR_DEFINE ( rcnf_herd  ,
"rconfc's working confc list ,
M0_INTERNAL  ,
struct rconfc_link  ,
rl_herd  ,
rl_magic  ,
M0_RCONFC_LINK_MAGIC  ,
M0_RCONFC_HERD_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [2/2]

M0_TL_DESCR_DEFINE ( rcnf_active  ,
"rconfc's active confc list ,
M0_INTERNAL  ,
struct rconfc_link  ,
rl_active  ,
rl_magic  ,
M0_RCONFC_LINK_MAGIC  ,
M0_RCONFC_ACTIVE_HEAD_MAGIC   
)

◆ rconfc__ast_post()

static void rconfc__ast_post ( struct m0_rconfc rconfc,
void *  datum,
void(*)(struct m0_sm_group *, struct m0_sm_ast *)  cb 
)
static

Definition at line 1150 of file rconfc.c.

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

◆ rconfc__cb_quorum_test()

static bool rconfc__cb_quorum_test ( struct m0_clink clink)
static

Callback attached to confc context clink. Fires when reading from one of confd instances is done, and therefore, the confd version is known to the moment of context completion. When context is complete, the entire herd is tested for quorum.

Note
Even after initialisation completion late confc replies yet still possible and to be done in background filling in the active list.
Callback is executed in context of rconfc sm group, because corresponding confc was inited with rconfc sm group. And this group is used for all confc contexts attached to confc later.

Definition at line 2657 of file rconfc.c.

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

◆ rconfc_active_add()

static void rconfc_active_add ( struct m0_rconfc rconfc,
struct rconfc_link lnk 
)
static

Definition at line 1718 of file rconfc.c.

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

◆ rconfc_active_all_unlink()

static void rconfc_active_all_unlink ( struct m0_rconfc rconfc)
static

Definition at line 1253 of file rconfc.c.

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

◆ rconfc_active_populate()

static void rconfc_active_populate ( struct m0_rconfc rconfc)
static

Re-populates the active list based on the herd items current status. Population starts when quorum version is found.

Definition at line 1729 of file rconfc.c.

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

◆ rconfc_ast_post()

static void rconfc_ast_post ( struct m0_rconfc rconfc,
void(*)(struct m0_sm_group *, struct m0_sm_ast *)  cb 
)
static

Definition at line 1179 of file rconfc.c.

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

◆ rconfc_cctx_fini()

static void rconfc_cctx_fini ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Finalises one completed confc context. Scheduled from rconfc__cb_quorum_test().

Definition at line 2529 of file rconfc.c.

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

◆ rconfc_conductor_connect()

static int rconfc_conductor_connect ( struct m0_rconfc rconfc,
struct rconfc_link lnk 
)
static

Connects "conductor" confc to the confd server identified by the provided link. Initialises the confc in case it was not done before.

Definition at line 1747 of file rconfc.c.

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

◆ rconfc_conductor_disconnect_cb()

static bool rconfc_conductor_disconnect_cb ( struct m0_clink clink)
static

Definition at line 2130 of file rconfc.c.

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

◆ rconfc_conductor_disconnected()

static void rconfc_conductor_disconnected ( struct m0_rconfc rconfc)
static

Definition at line 2094 of file rconfc.c.

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

◆ rconfc_conductor_disconnected_ast()

static void rconfc_conductor_disconnected_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 2120 of file rconfc.c.

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

◆ rconfc_conductor_drain()

static void rconfc_conductor_drain ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Drain confc cache because of read lock conflict.

Waits for cache objects being entirely unpinned. This is done by just waiting on a first pinned object met in cache. When the one appears unpinned, the checking for other objects is repeated until no more pinned object remains. Finally makes the cache empty.

Definition at line 2164 of file rconfc.c.

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

◆ rconfc_conductor_drained()

static void rconfc_conductor_drained ( struct m0_rconfc rconfc)
static

Definition at line 2142 of file rconfc.c.

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

◆ rconfc_conductor_engage()

static int rconfc_conductor_engage ( struct m0_rconfc rconfc)
static

Puts "conductor" confc in effect. In case the confc is not initialised yet, the initialisation happens first inside rconfc_conductor_connect(). Then connection to the very first responsive confd from active list is established. Ultimately, consumer is notified about configuration expiration by calling callback provided during m0_rconfc_init().

Definition at line 2506 of file rconfc.c.

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

◆ rconfc_conductor_iterate()

static int rconfc_conductor_iterate ( struct m0_rconfc rconfc)
static

Iterates through active list entries and tries to connect next confd address. Finishes with either connection succeeded or list exhausted.

The intended effect is that all spare confc items are going to be marked CONFC_IDLE with the following exceptions:

  • the newly connected item is marked CONFC_OPEN
  • the previously connected item, i.e. the one which failure led to the iteration, is marked CONFC_FAILED
  • every item found non-responsive during the iteration is marked CONFC_FAILED
Note
All CONFC_FAILED items are going to be re-set to CONFC_IDLE, and due to this, re-tried when next iteration starts.
Note
The iteration procedure above performs synchronous connection in rconfc_conductor_connect() with every remote confd in rcnf_active list until the connection succeeds. Every failed case is going to take some time until CONDUCTOR_TIMEOUT_DEFAULT expires. Theoretically this may keep rconfc AST thread busy for some time while conductor is still trying to get to connected state.

It is worth mentioning that the iteration is done with empty conductor's cache, so there are no consumers trying to access conf objects from other threads while rconfc remains locked. This may diminish the influence of possible blocking effect of the synchronous connection approach.

Nevertheless, this synchronism may be a subject for future rconfc redesign in case any negative effects get revealed.

New design is to partition the rconfc_conductor_iterate() logic. The first part preceding the while() above is to prepare iteration and start iterator FOM that is to re-implement the logic of the while() block. rconfc_version_elected() is going to be affected as well. New design is going to bring extra complexity into existent rconfc design.

However, the redesign must take into consideration the fact that rconfc_gate_skip() re-uses the rconfc_conductor_iterate() logic and currently expects it to be performed exactly synchronous way. So, the redesign must be done not only in regard to post-election phase (rconfc_version_elected() partitioning), but asynchronous confc gating must be designed as well.

Again, it is worth mentioning that with current logic of full conf loading before rconfc announces the conf ready, the confd skipping may occur only during conf loading, when it is guaranteed to have no conf consumers accessing objects in cache at the time.

Definition at line 1799 of file rconfc.c.

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

◆ rconfc_conf_full_load()

static void rconfc_conf_full_load ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 720 of file rconfc.c.

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

◆ rconfc_conf_load_fini()

static void rconfc_conf_load_fini ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 704 of file rconfc.c.

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

◆ rconfc_confd_addr_are_all_unique()

static bool rconfc_confd_addr_are_all_unique ( const char **  confd_addr)
static

Reports confd addresses uniqueness. Tested along with fids uniqueness during rconfc_herd_update().

Definition at line 1114 of file rconfc.c.

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

◆ rconfc_confd_count()

static uint32_t rconfc_confd_count ( const char **  confd_addr)
static

Definition at line 1099 of file rconfc.c.

Here is the caller graph for this function:

◆ rconfc_creditor_death_handle()

static void rconfc_creditor_death_handle ( struct m0_rconfc rconfc)
static

Definition at line 2077 of file rconfc.c.

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

◆ rconfc_entrypoint_consume()

static int rconfc_entrypoint_consume ( struct m0_rconfc rconfc)
static

Definition at line 1914 of file rconfc.c.

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

◆ rconfc_entrypoint_debug_print()

static void rconfc_entrypoint_debug_print ( struct m0_ha_entrypoint_rep entrypoint)
static

Definition at line 1897 of file rconfc.c.

Here is the caller graph for this function:

◆ rconfc_fail()

static void rconfc_fail ( struct m0_rconfc rconfc,
int  rc 
)
static

Definition at line 1195 of file rconfc.c.

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

◆ rconfc_fail_ast()

static void rconfc_fail_ast ( struct m0_rconfc rconfc,
int  rc 
)
static

Definition at line 1233 of file rconfc.c.

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

◆ rconfc_gate_check()

static bool rconfc_gate_check ( struct m0_confc confc)
static

Called during m0_confc_ctx_init(). Confc context initialisation appears blocked until rconfc allows read operations.

Note
Caller is blocked until rconfc reelection is finished. Caller (e.g. ios start sm) might be in the same sm group with rconfc sm group. So, m0_rconfc_lock() and m0_rconfc_unlock() will use the recursive version of sm group lock/unlock respectively.
See also
m0_confc_gate_ops::go_check

Definition at line 2218 of file rconfc.c.

Here is the call graph for this function:

◆ rconfc_gate_drain()

static bool rconfc_gate_drain ( struct m0_clink clink)
static

Called when all confc contexts are detached from conductor confc, and therefore its cache can be cleaned.

See also
m0_confc_gate_ops::go_drain

Definition at line 2263 of file rconfc.c.

Here is the call graph for this function:

◆ rconfc_gate_skip()

static int rconfc_gate_skip ( struct m0_confc confc)
static

Called from configuration reading state machine being in S_SKIP_CONFD state.

See also
m0_confc_gate_ops::go_skip

Definition at line 2247 of file rconfc.c.

Here is the call graph for this function:

◆ rconfc_ha_update_ast()

static void rconfc_ha_update_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 1470 of file rconfc.c.

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

◆ rconfc_ha_update_cb()

static bool rconfc_ha_update_cb ( struct m0_clink link)
static

Definition at line 1502 of file rconfc.c.

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

◆ rconfc_herd_ast()

static void rconfc_herd_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 1451 of file rconfc.c.

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

◆ rconfc_herd_cctxs_fini()

static void rconfc_herd_cctxs_fini ( struct m0_rconfc rconfc)
static

Finalises all completed confc contexts from the herd.

Definition at line 2550 of file rconfc.c.

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

◆ rconfc_herd_destroy()

static int rconfc_herd_destroy ( struct m0_rconfc rconfc)
static

Definition at line 1589 of file rconfc.c.

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

◆ rconfc_herd_find()

M0_INTERNAL struct rconfc_link * rconfc_herd_find ( struct m0_rconfc rconfc,
const char *  addr 
)

Definition at line 1603 of file rconfc.c.

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

◆ rconfc_herd_fini()

static int rconfc_herd_fini ( struct m0_rconfc rconfc)
static

Definition at line 1512 of file rconfc.c.

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

◆ rconfc_herd_fini_cb()

static bool rconfc_herd_fini_cb ( struct m0_clink link)
static

Definition at line 1458 of file rconfc.c.

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

◆ rconfc_herd_link__on_death_cb()

static bool rconfc_herd_link__on_death_cb ( struct m0_clink clink)
static

The callback is called when corresponding HA notification arrives to phony confc. Death notification results in disabling respective link and putting it to dead state. Any other sort of notification is ignored.

Definition at line 1298 of file rconfc.c.

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

◆ rconfc_herd_link_cleanup()

M0_INTERNAL void rconfc_herd_link_cleanup ( struct rconfc_link lnk)

Definition at line 1572 of file rconfc.c.

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

◆ rconfc_herd_link_destroy()

static void rconfc_herd_link_destroy ( struct rconfc_link lnk)
static

Definition at line 1565 of file rconfc.c.

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

◆ rconfc_herd_link_fini()

M0_INTERNAL void rconfc_herd_link_fini ( struct rconfc_link lnk)

Definition at line 1433 of file rconfc.c.

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

◆ rconfc_herd_link_init()

static void rconfc_herd_link_init ( struct rconfc_link lnk)
static

Definition at line 1405 of file rconfc.c.

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

◆ rconfc_herd_link_subscribe()

static void rconfc_herd_link_subscribe ( struct rconfc_link lnk)
static

Performs subscription to HA notifications regarding confd death.

Definition at line 1266 of file rconfc.c.

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

◆ rconfc_herd_link_unsubscribe()

static void rconfc_herd_link_unsubscribe ( struct rconfc_link lnk)
static

Dismisses subscription to HA notifications in case it was done previously.

Definition at line 1282 of file rconfc.c.

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

◆ rconfc_herd_prune()

static void rconfc_herd_prune ( struct m0_rconfc rconfc)
static

Definition at line 1579 of file rconfc.c.

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

◆ rconfc_herd_update()

static int rconfc_herd_update ( struct m0_rconfc rconfc,
const char **  confd_addr,
struct m0_fid_arr confd_fids 
)
static

Allocates a herd of confc instances in accordance with the number of addresses of confd servers to be in touch with.

Definition at line 1615 of file rconfc.c.

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

◆ rconfc_idle()

static void rconfc_idle ( struct m0_rconfc rconfc)
static

Definition at line 2404 of file rconfc.c.

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

◆ rconfc_is_locked()

static bool rconfc_is_locked ( struct m0_rconfc rconfc)
static

Definition at line 1128 of file rconfc.c.

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

◆ rconfc_link2reqh()

static struct m0_reqh* rconfc_link2reqh ( struct rconfc_link lnk)
inlinestatic

Definition at line 1288 of file rconfc.c.

Here is the caller graph for this function:

◆ rconfc_link_ast_post()

static void rconfc_link_ast_post ( struct rconfc_link lnk,
void *  datum,
void(*)(struct m0_sm_group *, struct m0_sm_ast *)  cb 
)
static

Definition at line 1166 of file rconfc.c.

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

◆ rconfc_link_fini_ast()

static void rconfc_link_fini_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static
Todo:
The dead confd fid is going to be removed from phony cache, and the link object to be finalised in rconfc_link_fom_fini(). Therefore, no way remains to listen for the confd state changes in future. You may be tempted by an idea of reviving the link in case the confd is announced M0_NC_ONLINE later, but consider the following analysis:

Merits:

The only merit of getting the link online is this may bring an additional active list entry into the effect, in case the revived confd runs version that was elected previously.

The merit is diminished by the fact that rconfc performs full conf load every time it obtains read lock, so using an alternative active link may be needed only during the conf load, and never happens after that until the moment of next version reelection.

Demerits:

a) The phony object must remain cached, and the herd link object must remain in the list during all the rconfc life.

b) Herd link revival is not an instant action. It requires the confc to connect, and invoke conf reading in case of success. If reading succeeds, the conf version must be qualified, and in case it matches with the currently elected one, the entry must be finally added to active list. The entire routine seems to require an additional state machine to be added to herd link. The machine must be reconciled with rconfc state machine. This is ultimately to additionally complicate the existing rconfc state machine, and do that rather seriously. Otherwise, controlling rconfc state while having the revival in background may result in unpredictable races.

c) There may be several concurrent M0_NC_ONLINE events, or state jitters, that in combination with async processing make the whole logic be really non-trivial compared to on-death processing.

So the merit of having an additional active entry is going to be achieved at the cost of over-complicating the existing rconfc design and an impact on rconfc code maintainability and extensibility. At the same time a simple version reelection may achieve the same result at sufficiently lower cost, as all the logic of entrypoint re-querying is already implemented in the context of MOTR-2113,2150.

Definition at line 1321 of file rconfc.c.

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

◆ rconfc_load_ast_thread()

static void rconfc_load_ast_thread ( struct rconfc_load_ctx rx)
static

Definition at line 673 of file rconfc.c.

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

◆ rconfc_load_ast_thread_fini()

static void rconfc_load_ast_thread_fini ( struct rconfc_load_ctx rx)
static

Definition at line 693 of file rconfc.c.

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

◆ rconfc_load_ast_thread_init()

static int rconfc_load_ast_thread_init ( struct rconfc_load_ctx rx)
static

Definition at line 683 of file rconfc.c.

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

◆ rconfc_local_load()

static int rconfc_local_load ( struct m0_rconfc rconfc)
static

Definition at line 2804 of file rconfc.c.

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

◆ rconfc_owner_creditor_reset()

static void rconfc_owner_creditor_reset ( struct m0_sm_group *grp  M0_UNUSED,
struct m0_sm_ast ast 
)
static

Definition at line 2043 of file rconfc.c.

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

◆ rconfc_quorum_is_possible()

static bool rconfc_quorum_is_possible ( struct m0_rconfc rconfc)
static

Definition at line 2431 of file rconfc.c.

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

◆ rconfc_quorum_is_reached()

static bool rconfc_quorum_is_reached ( struct m0_rconfc rconfc)
static

Definition at line 1247 of file rconfc.c.

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

◆ rconfc_quorum_test()

static bool rconfc_quorum_test ( struct m0_rconfc rconfc,
struct m0_confc confc 
)
static

Function tests if quorum reached to the moment.

Definition at line 2456 of file rconfc.c.

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

◆ rconfc_read_lock_complete()

static void rconfc_read_lock_complete ( struct m0_rm_incoming in,
int32_t  rc 
)
static

Called when read lock request completes.

Parameters
in– read request object
rc– read request result code indicating success (rc == 0) or failure

Reset rm request to do the retry operation.

Definition at line 2765 of file rconfc.c.

Here is the call graph for this function:

◆ rconfc_read_lock_conflict()

static void rconfc_read_lock_conflict ( struct m0_rm_incoming in)
static

Called when a conflicting lock acquisition is initiated somewhere in the cluster. All conflicting read locks get revoked as the result firing m0_rm_incoming_ops::rio_conflict() events for resource borrowers. Deprived of read lock, rconfc disallows any configuration reading. As well, the cached data appears outdated, and has to be dropped.

Definition at line 2386 of file rconfc.c.

Here is the call graph for this function:

◆ rconfc_read_lock_get()

static void rconfc_read_lock_get ( struct m0_rconfc rconfc)
static

Definition at line 1881 of file rconfc.c.

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

◆ rconfc_read_lock_put()

static void rconfc_read_lock_put ( struct m0_rconfc rconfc)
static

Read Lock cancellation

Definition at line 1134 of file rconfc.c.

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

◆ rconfc_read_lock_retry()

static void rconfc_read_lock_retry ( struct m0_sm_group *grp  M0_UNUSED,
struct m0_sm_ast ast 
)
static

Definition at line 2032 of file rconfc.c.

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

◆ rconfc_rlock_windup()

static void rconfc_rlock_windup ( struct m0_rconfc rconfc)
static

Release sm group lock to prevent dead-lock with rconfc_read_lock_conflict. In worst case rconfc_rlock_windup() acquires locks in "rconfc sm group lock"->"rm owner lock" order and rconfc_read_lock_conflict in reverse order.

Definition at line 2316 of file rconfc.c.

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

◆ rconfc_start()

static void rconfc_start ( struct m0_rconfc rconfc)
static

Definition at line 1987 of file rconfc.c.

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

◆ rconfc_start_ast_cb()

static void rconfc_start_ast_cb ( struct m0_sm_group *grp  M0_UNUSED,
struct m0_sm_ast ast 
)
static

Definition at line 2022 of file rconfc.c.

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

◆ rconfc_start_internal()

static int rconfc_start_internal ( struct m0_rconfc rconfc)
static

Definition at line 1967 of file rconfc.c.

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

◆ rconfc_state()

static uint32_t rconfc_state ( const struct m0_rconfc rconfc)
inlinestatic

Definition at line 1094 of file rconfc.c.

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

◆ rconfc_state_set()

static void rconfc_state_set ( struct m0_rconfc rconfc,
int  state 
)
static

Definition at line 1186 of file rconfc.c.

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

◆ rconfc_stop_ast_cb()

static void rconfc_stop_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 2366 of file rconfc.c.

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

◆ rconfc_stop_internal()

static void rconfc_stop_internal ( struct m0_rconfc rconfc)
static

Definition at line 2336 of file rconfc.c.

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

◆ rconfc_unpinned_cb()

static bool rconfc_unpinned_cb ( struct m0_clink link)
static

Definition at line 2192 of file rconfc.c.

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

◆ rconfc_version_elect()

static void rconfc_version_elect ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Version election start. Iterates through confc herd and makes every entry to start asynchronous reading from corresponding confd.

Definition at line 2728 of file rconfc.c.

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

◆ rconfc_version_elected()

static void rconfc_version_elected ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 2586 of file rconfc.c.

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

◆ rlock_conflict_handle()

static void rlock_conflict_handle ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 2287 of file rconfc.c.

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

◆ rlock_ctx_connect()

static int rlock_ctx_connect ( struct rlock_ctx rlx,
const char *  ep 
)
static

Definition at line 944 of file rconfc.c.

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

◆ rlock_ctx_create()

static int rlock_ctx_create ( struct m0_rconfc parent,
struct m0_rpc_machine rmach,
struct rlock_ctx **  out 
)
static

Definition at line 981 of file rconfc.c.

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

◆ rlock_ctx_creditor_setup()

static int rlock_ctx_creditor_setup ( struct rlock_ctx rlx,
const char *  ep 
)
static

Definition at line 1026 of file rconfc.c.

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

◆ rlock_ctx_creditor_state()

static enum m0_rm_owner_state rlock_ctx_creditor_state ( struct rlock_ctx rlx)
static

Definition at line 1021 of file rconfc.c.

Here is the caller graph for this function:

◆ rlock_ctx_creditor_unset()

static void rlock_ctx_creditor_unset ( struct rlock_ctx rlx)
static

Definition at line 1057 of file rconfc.c.

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

◆ rlock_ctx_destroy()

static void rlock_ctx_destroy ( struct rlock_ctx rlx)
static

Definition at line 1010 of file rconfc.c.

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

◆ rlock_ctx_disconnect()

static void rlock_ctx_disconnect ( struct rlock_ctx rlx)
static

Definition at line 927 of file rconfc.c.

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

◆ rlock_ctx_incoming_to_rconfc()

static struct m0_rconfc* rlock_ctx_incoming_to_rconfc ( struct m0_rm_incoming in)
static

Definition at line 914 of file rconfc.c.

Here is the caller graph for this function:

◆ rlock_ctx_is_online()

static bool rlock_ctx_is_online ( struct rlock_ctx rlx)
static

Definition at line 922 of file rconfc.c.

Here is the caller graph for this function:

◆ rlock_ctx_owner_windup()

static void rlock_ctx_owner_windup ( struct rlock_ctx rlx)
static

Definition at line 1068 of file rconfc.c.

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

◆ rlock_ctx_read_domain_fini()

static void rlock_ctx_read_domain_fini ( struct rlock_ctx rlx)
static

Definition at line 909 of file rconfc.c.

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

◆ rlock_ctx_read_domain_init()

static int rlock_ctx_read_domain_init ( struct rlock_ctx rlx)
static

Definition at line 904 of file rconfc.c.

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

◆ rlock_owner_clink_cb()

static bool rlock_owner_clink_cb ( struct m0_clink cl)
static

Definition at line 2060 of file rconfc.c.

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

◆ ver_accm_init()

static void ver_accm_init ( struct ver_accm va,
int  total 
)
static

Definition at line 1083 of file rconfc.c.

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

Variable Documentation

◆ m0_rconfc_gate_ops

struct m0_confc_gate_ops m0_rconfc_gate_ops
Initial value:
= {
.go_check = rconfc_gate_check,
.go_skip = rconfc_gate_skip,
.go_drain = rconfc_gate_drain,
}
static bool rconfc_gate_check(struct m0_confc *confc)
Definition: rconfc.c:2218
static bool rconfc_gate_drain(struct m0_clink *clink)
Definition: rconfc.c:2263
static int rconfc_gate_skip(struct m0_confc *confc)
Definition: rconfc.c:2247

Definition at line 566 of file rconfc.c.

◆ m0_rconfc_ri_ops

struct m0_rm_incoming_ops m0_rconfc_ri_ops
Initial value:
= {
.rio_complete = rconfc_read_lock_complete,
.rio_conflict = rconfc_read_lock_conflict,
}
static void rconfc_read_lock_complete(struct m0_rm_incoming *in, int32_t rc)
Definition: rconfc.c:2765
static void rconfc_read_lock_conflict(struct m0_rm_incoming *in)
Definition: rconfc.c:2386

Definition at line 576 of file rconfc.c.

◆ rconfc_sm_conf

const struct m0_sm_conf rconfc_sm_conf
static
Initial value:
= {
.scf_name = "Rconfc",
.scf_nr_states = ARRAY_SIZE(rconfc_states),
.scf_state = rconfc_states
}
static struct m0_sm_state_descr rconfc_states[]
Definition: rconfc.c:581
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 649 of file rconfc.c.

◆ rconfc_states

struct m0_sm_state_descr rconfc_states[]
static

Definition at line 581 of file rconfc.c.