Motr
M0
|
#include "lib/trace.h"
#include "conf/confc.h"
#include "conf/cache.h"
#include "conf/obj_ops.h"
#include "conf/preload.h"
#include "conf/fop.h"
#include "motr/magic.h"
#include "fop/fom_generic.h"
#include "rpc/rpc.h"
#include "fid/fid.h"
#include "rpc/rpclib.h"
#include "rpc/rpc_machine.h"
#include "lib/arith.h"
#include "lib/misc.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/finject.h"
Go to the source code of this file.
Data Structures | |
struct | sm_waiter |
struct | confc_fop |
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF |
Enumerations | |
enum | confc_ctx_state { S_INITIAL, S_CHECK, S_WAIT_REPLY, S_WAIT_STATUS, S_RETRY_CONFD, S_SKIP_CONFD, S_GROW_CACHE, S_FAILURE, S_TERMINAL, S_NR } |
Functions | |
static int | check_st_in (struct m0_sm *mach) |
static int | wait_reply_st_in (struct m0_sm *mach) |
static int | skip_confd_st_in (struct m0_sm *mach) |
static int | retry_confd_st_in (struct m0_sm *mach) |
static int | grow_cache_st_in (struct m0_sm *mach) |
static int | failure_st_in (struct m0_sm *mach) |
static bool | check_st_invariant (const struct m0_sm *mach) |
static bool | failure_st_invariant (const struct m0_sm *mach) |
static bool | terminal_st_invariant (const struct m0_sm *mach) |
static bool | _confc_check (const void *bob) |
static bool | _ctx_check (const void *bob) |
M0_BOB_DEFINE (static, &confc_bob, m0_confc) | |
M0_BOB_DEFINE (static, &ctx_bob, m0_confc_ctx) | |
M0_INTERNAL bool | m0_confc_invariant (const struct m0_confc *confc) |
static bool | ctx_invariant (const struct m0_confc_ctx *ctx) |
static int | confc_cache_preload (struct m0_confc *confc, const char *local_conf) |
static int | connect_to_confd (struct m0_confc *confc, const char *confd_addr, struct m0_rpc_machine *rpc_mach) |
static void | disconnect_from_confd (struct m0_confc *confc) |
static void | confc_lock (struct m0_confc *confc) |
static void | confc_unlock (struct m0_confc *confc) |
static bool | confc_is_locked (const struct m0_confc *confc) |
static void | clink_cleanup_fini (struct m0_clink *link) |
M0_INTERNAL bool | m0_confc_is_inited (const struct m0_confc *confc) |
M0_INTERNAL bool | m0_confc_is_online (const struct m0_confc *confc) |
static bool | not_empty (const char *s) |
static int | confc_cache_create (struct m0_confc *confc, const char *local_conf) |
M0_INTERNAL int | m0_confc_reconnect (struct m0_confc *confc, struct m0_rpc_machine *rpc_mach, const char *confd_addr) |
M0_INTERNAL int | m0_confc_init_wait (struct m0_confc *confc, struct m0_sm_group *sm_group, const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf, uint64_t timeout_ns) |
M0_INTERNAL int | m0_confc_init (struct m0_confc *confc, struct m0_sm_group *sm_group, const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf) |
M0_INTERNAL void | m0_confc_fini (struct m0_confc *confc) |
M0_INTERNAL struct m0_confc * | m0_confc_from_obj (const struct m0_conf_obj *obj) |
M0_INTERNAL void | m0_confc_gate_ops_set (struct m0_confc *confc, struct m0_confc_gate_ops *gops) |
static bool | on_object_updated (struct m0_clink *link) |
static bool | request_check (const struct m0_confc_ctx *ctx) |
static bool | eop (const struct m0_fid *buf) |
static void | confc_group_lock (const struct m0_confc *confc) |
static void | confc_group_unlock (const struct m0_confc *confc) |
static bool | confc_group_is_locked (const struct m0_confc *confc) |
M0_INTERNAL int | m0_confc_ctx_init (struct m0_confc_ctx *ctx, struct m0_confc *confc) |
M0_INTERNAL void | m0_confc_ctx_fini_locked (struct m0_confc_ctx *ctx) |
M0_INTERNAL void | m0_confc_ctx_fini (struct m0_confc_ctx *ctx) |
M0_INTERNAL bool | m0_confc_ctx_is_completed (const struct m0_confc_ctx *ctx) |
M0_INTERNAL bool | m0_confc_ctx_is_completed_lock (const struct m0_confc_ctx *ctx) |
M0_INTERNAL int32_t | m0_confc_ctx_error (const struct m0_confc_ctx *ctx) |
M0_INTERNAL int32_t | m0_confc_ctx_error_lock (const struct m0_confc_ctx *ctx) |
M0_INTERNAL struct m0_conf_obj * | m0_confc_ctx_result (struct m0_confc_ctx *ctx) |
static bool | sm__filter (struct m0_clink *link) |
static int | sm_waiter_init (struct sm_waiter *w, struct m0_confc *confc) |
static void | sm_waiter_fini (struct sm_waiter *w) |
static int | sm_waiter_wait (struct sm_waiter *w, struct m0_conf_obj **result) |
static void | ctx_state_set (struct m0_confc_ctx *ctx, enum confc_ctx_state state) |
static void | ctx_state_fail (struct m0_confc_ctx *ctx, int rc) |
static int | path_copy (const struct m0_fid *src, struct m0_fid *dest, size_t dest_sz) |
M0_INTERNAL void | m0_confc__open (struct m0_confc_ctx *ctx, struct m0_conf_obj *origin, const struct m0_fid *path) |
M0_INTERNAL int | m0_confc__open_sync (struct m0_conf_obj **result, struct m0_conf_obj *origin, const struct m0_fid *path) |
M0_INTERNAL void | m0_confc_close (struct m0_conf_obj *obj) |
M0_INTERNAL void | m0_confc_open_by_fid (struct m0_confc_ctx *ctx, const struct m0_fid *fid) |
M0_INTERNAL int | m0_confc_open_by_fid_sync (struct m0_confc *confc, const struct m0_fid *fid, struct m0_conf_obj **result) |
M0_INTERNAL int | m0_confc_readdir (struct m0_confc_ctx *ctx, struct m0_conf_obj *dir, struct m0_conf_obj **pptr) |
M0_INTERNAL int | m0_confc_readdir_sync (struct m0_conf_obj *dir, struct m0_conf_obj **pptr) |
M0_INTERNAL struct m0_rpc_conn * | m0_confc2conn (struct m0_confc *confc) |
M0_INTERNAL struct m0_rpc_session * | m0_confc2sess (struct m0_confc *confc) |
static struct m0_confc_ctx * | mach_to_ctx (struct m0_sm *mach) |
static const struct m0_confc_ctx * | const_mach_to_ctx (const struct m0_sm *mach) |
static struct m0_confc_ctx * | ast_to_ctx (struct m0_sm_ast *ast) |
static int | path_walk (struct m0_confc_ctx *ctx) |
static int | cache_grow (struct m0_confc *confc, const struct m0_conf_fetch_resp *resp) |
static struct m0_confc_ctx * | item_to_ctx (const struct m0_rpc_item *item) |
static uint64_t * | confc_cache_ver (struct m0_confc_ctx *ctx) |
static void | conf_obj_status_reset (struct m0_confc_ctx *ctx) |
static void | on_replied (struct m0_rpc_item *item) |
static int | path_walk_complete (struct m0_confc_ctx *ctx, struct m0_conf_obj *obj, size_t ri) |
static int | request_create (struct m0_confc_ctx *ctx, const struct m0_conf_obj *orig, size_t ri) |
static void | _state_set (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast) |
static void | _state_fail (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast) |
static void | _ast_post (struct m0_sm_ast *ast, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *), int datum) |
static int | object_enrich (struct m0_conf_obj *dest, const struct m0_confx_obj *src, struct m0_confc *confc) |
static int | cached_obj_update (struct m0_confc *confc, const struct m0_confx_obj *flat) |
static m0_time_t | confc_deadline (const struct m0_confc *confc) |
static void | confc_fop_release (struct m0_ref *ref) |
static struct confc_fop * | confc_fop_alloc (struct m0_confc_ctx *ctx) |
Variables | |
static struct m0_sm_state_descr | confc_ctx_states [S_NR] |
static const struct m0_sm_conf | confc_ctx_states_conf |
static const struct m0_bob_type | confc_bob |
static const struct m0_bob_type | ctx_bob |
static const struct m0_rpc_item_ops | confc_item_ops |