Motr  M0
conf_mgmt.c File Reference
#include "lib/trace.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/memory.h"
#include "lib/string.h"
#include "lib/tlist.h"
#include "fid/fid.h"
#include "conf/cache.h"
#include "conf/flip_fop.h"
#include "conf/load_fop.h"
#include "conf/obj.h"
#include "conf/onwire_xc.h"
#include "conf/preload.h"
#include "conf/obj_ops.h"
#include "conf/dir.h"
#include "conf/helpers.h"
#include "rm/rm_rwlock.h"
#include "rpc/link.h"
#include "rpc/rpclib.h"
#include "ioservice/fid_convert.h"
#include "spiel/spiel.h"
#include "spiel/conf_mgmt.h"
#include "spiel/spiel_internal.h"
#include <stdio.h>
Include dependency graph for conf_mgmt.c:

Go to the source code of this file.

Data Structures

struct  spiel_conf_param
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SPIEL
 
#define SPIEL_CONF_CHECK(cache, ...)
 

Functions

 M0_TL_DESCR_DECLARE (rpcbulk, M0_EXTERN)
 
static int spiel_rwlockable_write_domain_init (struct m0_spiel_wlock_ctx *wlx)
 
static void spiel_rwlockable_write_domain_fini (struct m0_spiel_wlock_ctx *wlx)
 
static int spiel_root_ver_update (struct m0_spiel_tx *tx, uint64_t verno)
 
void m0_spiel_tx_open (struct m0_spiel *spiel, struct m0_spiel_tx *tx)
 
int m0_spiel_tx_validate (struct m0_spiel_tx *tx)
 
void m0_spiel_tx_close (struct m0_spiel_tx *tx)
 
static bool spiel_load_cmd_invariant (struct m0_spiel_load_command *cmd)
 
static uint64_t spiel_root_conf_version (struct m0_spiel_tx *tx)
 
static void spiel_load_fop_fini (struct m0_spiel_load_command *spiel_cmd)
 
static void spiel_load_fop_release (struct m0_ref *ref)
 
static int spiel_load_fop_init (struct m0_spiel_load_command *spiel_cmd, struct m0_spiel_tx *tx)
 
static int spiel_load_fop_create (struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
 
static int spiel_load_fop_send (struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
 
static void spiel_flip_fop_release (struct m0_ref *ref)
 
static int spiel_flip_fop_send (struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
 
static int wlock_ctx_semaphore_init (struct m0_spiel_wlock_ctx *wlx)
 
static void wlock_ctx_semaphore_up (struct m0_spiel_wlock_ctx *wlx)
 
static int wlock_ctx_create (struct m0_spiel *spl)
 
static void wlock_ctx_destroy (struct m0_spiel_wlock_ctx *wlx)
 
static int wlock_ctx_connect (struct m0_spiel_wlock_ctx *wlx)
 
static void wlock_ctx_disconnect (struct m0_spiel_wlock_ctx *wlx)
 
static void spiel_tx_write_lock_complete (struct m0_rm_incoming *in, int32_t rc)
 
static void spiel_tx_write_lock_conflict (struct m0_rm_incoming *in)
 
static void wlock_ctx_creditor_setup (struct m0_spiel_wlock_ctx *wlx)
 
static void _spiel_tx_write_lock_get (struct m0_spiel_wlock_ctx *wlx)
 
static void wlock_ctx_creditor_unset (struct m0_spiel_wlock_ctx *wlx)
 
static void wlock_ctx_semaphore_down (struct m0_spiel_wlock_ctx *wlx)
 
static void wlock_ctx_owner_windup (struct m0_spiel_wlock_ctx *wlx)
 
static int spiel_tx_write_lock_get (struct m0_spiel_tx *tx)
 
static void _spiel_tx_write_lock_put (struct m0_spiel_wlock_ctx *wlx)
 
static void spiel_tx_write_lock_put (struct m0_spiel_tx *tx)
 
int m0_spiel_tx_commit_forced (struct m0_spiel_tx *tx, bool forced, uint64_t ver_forced, uint32_t *rquorum)
 
int m0_spiel_tx_commit (struct m0_spiel_tx *tx)
 
static int spiel_root_dirs_create (struct m0_conf_root *r)
 
static int spiel_node_dirs_create (struct m0_conf_node *node)
 
static int spiel_process_dirs_create (struct m0_conf_process *process)
 
static int spiel_service_dirs_create (struct m0_conf_service *service)
 
static int spiel_pool_dirs_create (struct m0_conf_pool *pool)
 
static int spiel_site_dirs_create (struct m0_conf_site *site)
 
static int spiel_rack_dirs_create (struct m0_conf_rack *rack)
 
static int spiel_enclosure_dirs_create (struct m0_conf_enclosure *enclosure)
 
static int spiel_controller_dirs_create (struct m0_conf_controller *controller)
 
static int spiel_pver_dirs_create (struct m0_conf_pver *pver)
 
static int spiel_sitev_dirs_create (struct m0_conf_objv *objv)
 
static int spiel_rackv_dirs_create (struct m0_conf_objv *objv)
 
static int spiel_enclosurev_dirs_create (struct m0_conf_objv *objv)
 
static int spiel_controllerv_dirs_create (struct m0_conf_objv *objv)
 
static int spiel_conf_parameter_check (struct m0_conf_cache *cache, struct spiel_conf_param *parameters)
 
int m0_spiel_root_add (struct m0_spiel_tx *tx, const struct m0_fid *rootfid, const struct m0_fid *mdpool, const struct m0_fid *imeta_pver, uint32_t mdredundancy, const char **params)
 
int m0_spiel_node_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, uint32_t memsize, uint32_t nr_cpu, uint64_t last_state, uint64_t flags)
 
static bool spiel_cores_is_valid (const struct m0_bitmap *cores)
 
int m0_spiel_process_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, struct m0_bitmap *cores, uint64_t memlimit_as, uint64_t memlimit_rss, uint64_t memlimit_stack, uint64_t memlimit_memlock, const char *endpoint)
 
int m0_spiel_service_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_spiel_service_info *service_info)
 
int m0_spiel_device_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *drive, uint32_t dev_idx, enum m0_cfg_storage_device_interface_type iface, enum m0_cfg_storage_device_media_type media, uint32_t bsize, uint64_t size, uint64_t last_state, uint64_t flags, const char *filename)
 
int m0_spiel_profile_add (struct m0_spiel_tx *tx, const struct m0_fid *fid)
 
static int spiel_profile_pool_add (struct m0_conf_profile *prof, const struct m0_fid *pool)
 
int m0_spiel_profile_pool_add (struct m0_spiel_tx *tx, const struct m0_fid *profile, const struct m0_fid *pool)
 
int m0_spiel_pool_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, uint32_t pver_policy)
 
int m0_spiel_site_add (struct m0_spiel_tx *tx, const struct m0_fid *fid)
 
int m0_spiel_rack_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
 
int m0_spiel_enclosure_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *node)
 
int m0_spiel_controller_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
 
int m0_spiel_drive_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
 
int m0_spiel_pver_actual_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_pdclust_attr *attrs, uint32_t *tolerance, uint32_t tolerance_len)
 
int m0_spiel_pver_formulaic_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, uint32_t index, const struct m0_fid *base_pver, uint32_t *allowance, uint32_t allowance_len)
 
int m0_spiel_site_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real)
 
int m0_spiel_rack_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real)
 
int m0_spiel_enclosure_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real)
 
int m0_spiel_controller_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real)
 
int m0_spiel_drive_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real)
 
static int spiel_pver_add (struct m0_conf_obj **obj_v, struct m0_conf_pver *pver)
 
static int spiel_pver_delete (struct m0_conf_obj *obj, const struct m0_conf_pver *pver)
 
static int spiel_objv_remove (struct m0_conf_obj **obj, struct m0_conf_pver *pver)
 
static int spiel_pver_iterator (struct m0_conf_obj *dir, struct m0_conf_pver *pver, int(*action)(struct m0_conf_obj **, struct m0_conf_pver *))
 
int m0_spiel_pool_version_done (struct m0_spiel_tx *tx, const struct m0_fid *fid)
 
static void spiel_pver_remove (struct m0_conf_cache *cache, struct m0_conf_pver *pver)
 
int m0_spiel_element_del (struct m0_spiel_tx *tx, const struct m0_fid *fid)
 
static int spiel_str_to_file (char *str, const char *filename)
 
static int spiel_tx_to_str (struct m0_spiel_tx *tx, uint64_t ver_forced, char **str, bool debug)
 
int m0_spiel_tx_to_str (struct m0_spiel_tx *tx, uint64_t ver_forced, char **str)
 
void m0_spiel_tx_str_free (char *str)
 
static int spiel_tx_dump (struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename, bool debug)
 
int m0_spiel_tx_dump (struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename)
 
int m0_spiel_tx_dump_debug (struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename)
 

Variables

static struct m0_rm_incoming_ops spiel_tx_ri_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SPIEL

Definition at line 23 of file conf_mgmt.c.