59 bool stob_creator =
false;
93 for (
i = 0;
i <
ctx->su_users_nr - 1; ++
i)
117 const char *dom_init_cfg,
118 const char *stob_cfg,
126 uint64_t dom_key = 0xec0de;
145 for (
i = 0;
i < stob_nr; ++
i) {
149 for (
i = 0;
i < thread_nr; ++
i) {
152 .su_destroy_sem = &destroy_sems[
i % stob_nr],
153 .su_users_nr = thread_nr / stob_nr,
154 .su_stob_key =
i % stob_nr + 1,
164 for (
i = 0;
i < stob_nr; ++
i)
175 const char *dom_init_cfg,
176 const char *stob_cfg)
183 uint64_t dom_key = 0xec0de;
184 uint64_t stob_key = 0xc0deba5e;
188 dom_key, dom_cfg, &
dom);
296 dom_cfg, dom_init_cfg,
NULL);
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void stob_ut_stob_single(struct m0_be_ut_backend *ut_be, const char *location, const char *dom_cfg, const char *dom_init_cfg, const char *stob_cfg)
M0_INTERNAL int m0_stob_locate(struct m0_stob *stob)
static void stob_ut_stob_multi(struct m0_be_ut_backend *ut_be, const char *location, const char *dom_cfg, const char *dom_init_cfg, const char *stob_cfg, int thread_nr, int stob_nr)
struct m0_semaphore * su_destroy_sem
M0_INTERNAL int m0_stob_domain_destroy(struct m0_stob_domain *dom)
void m0_stob_ut_stob_linux(void)
struct m0_be_seg * bus_seg
M0_INTERNAL int m0_ut_stob_destroy(struct m0_stob *stob, struct m0_be_domain *be_dom)
struct m0_be_ut_seg ut_seg
M0_INTERNAL const struct m0_fid * m0_stob_fid_get(struct m0_stob *stob)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_fid_cmp(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL void m0_stob_ad_init_cfg_make(char **str, struct m0_be_domain *dom)
struct m0_stob_domain * su_domain
M0_INTERNAL int m0_stob_lookup(const struct m0_stob_id *id, struct m0_stob **out)
void m0_stob_ut_stob_ad(void)
struct m0_be_ut_backend * su_ut_be
M0_INTERNAL struct m0_stob * m0_ut_stob_linux_get(void)
M0_INTERNAL int m0_stob_domain_create(const char *location, const char *str_cfg_init, uint64_t dom_key, const char *str_cfg_create, struct m0_stob_domain **out)
void m0_stob_ut_stob_null(void)
void m0_stob_ut_ad_init(struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg)
struct m0_be_ut_backend ut_be
M0_INTERNAL const struct m0_stob_id * m0_stob_id_get(struct m0_stob *stob)
static struct m0_stob * stob
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)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
struct m0_sm_group * m0_be_ut_backend_sm_group_lookup(struct m0_be_ut_backend *ut_be)
struct m0_mutex * su_lock
struct m0_be_domain but_dom
M0_INTERNAL void m0_ut_stob_put(struct m0_stob *stob, bool destroy)
M0_INTERNAL void m0_stob_domain_fini(struct m0_stob_domain *dom)
M0_INTERNAL enum m0_stob_state m0_stob_state_get(struct m0_stob *stob)
M0_INTERNAL int m0_stob_domain_init(const char *location, const char *str_cfg_init, struct m0_stob_domain **out)
M0_UT_THREADS_DEFINE(stob_ut_stob, stob_ut_stob_thread)
void m0_stob_ut_stob_perf(void)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
void m0_stob_ut_stob_perf_null(void)
#define M0_UT_THREADS_STOP(name)
M0_INTERNAL int m0_stob_find(const struct m0_stob_id *id, struct m0_stob **out)
static void stob_ut_stob_thread(void *param)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL int m0_ut_stob_create(struct m0_stob *stob, const char *str_cfg, struct m0_be_domain *be_dom)
M0_INTERNAL void m0_stob_ad_cfg_make(char **str, const struct m0_be_seg *seg, const struct m0_stob_id *bstore_id, const m0_bcount_t size)
#define M0_UT_THREADS_START(name, thread_nr, param_array)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
void m0_stob_ut_ad_fini(struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg)
M0_INTERNAL void m0_stob_get(struct m0_stob *stob)
M0_INTERNAL void m0_stob_put(struct m0_stob *stob)
void m0_be_ut_backend_thread_exit(struct m0_be_ut_backend *ut_be)