23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 62 .
ml_name =
"stob UT helper is initialised",
103 return rc == 0 ? usm :
NULL;
112 rc = usm ==
NULL ? -ENOMEM : 0;
258 }
while (rc_c == -EAGAIN);
341 if (be_dom !=
NULL) {
373 #undef M0_TRACE_SUBSYSTEM M0_INTERNAL struct m0_stob_domain * m0_stob_dom_get(struct m0_stob *stob)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
M0_INTERNAL struct m0_stob * m0_ut_stob_open(struct m0_stob_domain *dom, uint64_t stob_key, const char *str_cfg)
M0_INTERNAL int m0_indexvec_alloc(struct m0_indexvec *ivec, uint32_t len)
static uint64_t ut_stob_linux_key_alloc(void)
M0_INTERNAL int m0_stob_locate(struct m0_stob *stob)
M0_INTERNAL void m0_ut_stob_close(struct m0_stob *stob, bool destroy)
static struct m0_sm_group * grp
struct ut_stob_module * usm_private
#define M0_LOG(level,...)
struct m0_ut_stob_module i_ut_stob_module
M0_INTERNAL const struct m0_fid * m0_stob_domain_id_get(const struct m0_stob_domain *dom)
M0_INTERNAL int m0_ut_stob_destroy_by_stob_id(struct m0_stob_id *stob_id)
M0_INTERNAL int m0_ut_stob_destroy(struct m0_stob *stob, struct m0_be_domain *be_dom)
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
static struct m0_stob * ut_stob_linux_create_by_key(uint64_t stob_key, char *stob_create_cfg)
M0_INTERNAL struct m0 * m0_get(void)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_dtx_done_sync(struct m0_dtx *tx)
static void level_ut_stob_leave(struct m0_module *module)
M0_INTERNAL struct m0_stob * m0_ut_stob_linux_get_by_key(uint64_t stob_key)
static const char * ut_stob_domain_create_cfg
M0_INTERNAL struct m0_stob * m0_ut_stob_linux_get(void)
static bool ut_stob_use_dtx(struct m0_stob_domain *dom)
struct m0_be_ut_backend ut_be
static struct m0_stob * stob
M0_INTERNAL void m0_stob_destroy_credit(struct m0_stob *stob, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_be_tx_credit_add(struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
#define bob_of(ptr, type, field, bt)
static struct m0_stob_domain * dom
M0_INTERNAL void m0_stob_id_make(uint64_t container, uint64_t key, const struct m0_fid *dom_id, struct m0_stob_id *stob_id)
static const uint64_t ut_stob_domain_key
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL uint8_t m0_stob_type_id_by_name(const char *name)
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
struct m0_sm_group * m0_be_ut_backend_sm_group_lookup(struct m0_be_ut_backend *ut_be)
struct m0_be_domain but_dom
M0_INTERNAL void m0_ut_stob_put(struct m0_stob *stob, bool destroy)
const unsigned m0_levels_ut_stob_nr
M0_INTERNAL int m0_ut_stob_create_by_stob_id(struct m0_stob_id *stob_id, const char *str_cfg)
M0_INTERNAL void m0_stob_domain_fini(struct m0_stob_domain *dom)
M0_INTERNAL int m0_stob_create(struct m0_stob *stob, struct m0_dtx *dtx, const char *str_cfg)
M0_INTERNAL void m0_ut_stob_fini(void)
M0_INTERNAL int m0_stob_punch_credit(struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_stob_destroy(struct m0_stob *stob, struct m0_dtx *dtx)
M0_INTERNAL enum m0_stob_state m0_stob_state_get(struct m0_stob *stob)
M0_INTERNAL int m0_stob_domain_create_or_init(const char *location, const char *str_cfg_init, uint64_t dom_key, const char *str_cfg_create, struct m0_stob_domain **out)
#define M0_ALLOC_PTR(ptr)
const struct m0_bob_type m0_ut_be_backend_bobtype
static struct ut_stob_module * ut_stob_module_get(void)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
struct m0_stob_domain * usm_dom_linux
static const char * ut_stob_domain_init_cfg
M0_INTERNAL int m0_stob_find(const struct m0_stob_id *id, struct m0_stob **out)
M0_INTERNAL int m0_dtx_open_sync(struct m0_dtx *tx)
M0_INTERNAL void m0_ut_dtx_close(struct m0_dtx *dtx)
#define M0_ASSERT_INFO(cond, fmt,...)
M0_INTERNAL struct m0_dtx * m0_ut_dtx_open(struct m0_be_tx_credit *cred, struct m0_be_domain *be_dom)
M0_INTERNAL int m0_ut_stob_create(struct m0_stob *stob, const char *str_cfg, struct m0_be_domain *be_dom)
M0_INTERNAL int m0_stob_punch(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
M0_INTERNAL void m0_stob_create_credit(struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
static const char * ut_stob_domain_location
M0_INTERNAL int m0_ut_stob_init(void)
M0_INTERNAL uint8_t m0_stob_domain__type_id(const struct m0_fid *dom_id)
M0_INTERNAL void m0_stob_put(struct m0_stob *stob)
struct m0_modlev m0_levels_ut_stob[]
M0_INTERNAL void m0_dtx_prep(struct m0_dtx *tx, const struct m0_be_tx_credit *cred)
static int level_ut_stob_enter(struct m0_module *module)
M0_INTERNAL struct m0_stob * m0_ut_stob_linux_create(char *stob_create_cfg)