58 unit =
conf->ct_unitsize;
60 for (nob =
conf->ct_total,
grp = 0; nob > 0;
61 nob -= unit * (pl_N + pl_K),
grp++) {
66 for (idx = 0; idx < pl_N + pl_K; ++idx) {
74 struct m0t1fs_conn *
conn;
82 M0_ASSERT(obj < conf->ct_pool_version.pv_attr.pa_P);
95 while (
conn->cs_inflight >=
conf->ct_inflight_max)
115 for (
i = 0;
i <
conf->ct_nr_clients; ++
i) {
118 for (j = 0; j <
conf->ct_nr_threads; ++j) {
142 lin_attr.
lla_nr =
conf->ct_pool_version.pv_attr.pa_P;
151 pl_attr.
pa_P =
conf->ct_pool_version.pv_attr.pa_P;
153 lid = 0x4332543146535349;
179 struct m0_fid pv_id = {0x789, 0x101112};
184 conf->ct_nr_servers *
conf->ct_nr_devices,
187 for (
i = 0;
i <
conf->ct_nr_servers; ++
i) {
197 sizeof conf->ct_client[0]);
202 for (
i = 0;
i <
conf->ct_nr_clients; ++
i) {
208 sizeof c->cc_thread[0]);
210 sizeof c->cc_srv[0]);
211 for (j = 0; j <
conf->ct_nr_servers; ++j)
213 "inflight:%i:%i",
i, j);
214 for (j = 0; j <
conf->ct_nr_threads; ++j) {
222 delta =
i *
conf->ct_client_step +
223 j *
conf->ct_thread_step;
243 for (
i = 0;
i <
conf->ct_nr_clients; ++
i) {
246 if (
c->cc_thread !=
NULL) {
247 for (j = 0; j <
conf->ct_nr_threads; ++j) {
250 cth = &
c->cc_thread[j];
257 if (
c->cc_srv !=
NULL) {
258 for (j = 0; j <
conf->ct_nr_servers; ++j)
266 for (
i = 0;
i <
conf->ct_nr_servers; ++
i)
M0_INTERNAL void sim_thread_init(struct sim *state, struct sim_thread *thread, unsigned stacksize, sim_func_t func, void *arg)
M0_INTERNAL void m0_pool_fini(struct m0_pool *pool)
M0_INTERNAL int m0_layout_domain_init(struct m0_layout_domain *dom)
M0_INTERNAL void sim_chan_fini(struct sim_chan *chan)
static struct m0_sm_group * grp
M0_INTERNAL void sim_free(void *ptr)
M0_INTERNAL struct m0_layout_enum * m0_striped_layout_to_enum(const struct m0_striped_layout *stl)
struct m0_layout_instance pi_base
M0_INTERNAL void m0_uint128_init(struct m0_uint128 *u128, const char *magic)
M0_INTERNAL void m0_layout_domain_fini(struct m0_layout_domain *dom)
M0_INTERNAL void m0_fid_convert_cob2adstob(const struct m0_fid *cob_fid, struct m0_stob_id *stob_id)
M0_INTERNAL int m0_linear_enum_build(struct m0_layout_domain *dom, const struct m0_layout_linear_attr *attr, struct m0_layout_linear_enum **out)
const struct m0_fid_type m0_cob_fid_type
M0_INTERNAL void sim_log(struct sim *s, enum sim_log_level level, const char *format,...)
struct m0t1fs_client * cth_client
struct m0_pdclust_attr pl_attr
M0_INTERNAL void net_rpc_process(struct sim_thread *t, struct net_conf *net, struct net_srv *srv, struct m0_stob_id *stob_id, unsigned long long offset, unsigned long count)
M0_INTERNAL void sim_chan_init(struct sim_chan *chan, char *format,...)
M0_INTERNAL void sim_thread_exit(struct sim_thread *thread)
M0_INTERNAL int m0_layout_instance_build(struct m0_layout *l, const struct m0_fid *fid, struct m0_layout_instance **out)
M0_INTERNAL int m0_pool_init(struct m0_pool *pool, const struct m0_fid *id, enum m0_pver_policy_code pver_policy)
static void layout_build(struct m0t1fs_conf *conf)
M0_INTERNAL void m0_fid_set(struct m0_fid *fid, uint64_t container, uint64_t key)
struct m0_layout_enum lle_base
M0_INTERNAL void sim_thread_fini(struct sim_thread *thread)
const struct m0_layout_enum_ops * le_ops
struct m0_striped_layout pl_base
static int threads_start(struct sim_callout *call)
M0_INTERNAL void m0t1fs_fini(struct m0t1fs_conf *conf)
M0_INTERNAL void m0t1fs_init(struct sim *s, struct m0t1fs_conf *conf)
static struct m0_addb2_callback c
static struct m0_thread t[8]
M0_INTERNAL int m0_pool_version_init(struct m0_pool_version *pv, const struct m0_fid *id, struct m0_pool *pool, uint32_t pool_width, uint32_t nr_nodes, uint32_t nr_data, uint32_t nr_failures, uint32_t nr_spare)
M0_INTERNAL void sim_timer_add(struct sim *state, sim_time_t delta, sim_call_t *cfunc, void *datum)
struct m0t1fs_conf * cc_conf
M0_INTERNAL struct m0_pdclust_layout * m0_layout_to_pdl(const struct m0_layout *l)
M0_INTERNAL void sim_sleep(struct sim_thread *thread, sim_time_t nap)
struct m0_pdclust_instance pi
M0_INTERNAL void sim_chan_wait(struct sim_chan *chan, struct sim_thread *thread)
M0_INTERNAL void sim_chan_signal(struct sim_chan *chan)
M0_INTERNAL unsigned long long sim_rnd(unsigned long long a, unsigned long long b)
M0_INTERNAL void * sim_alloc(size_t size)
M0_INTERNAL void m0_pdclust_instance_map(struct m0_pdclust_instance *pi, const struct m0_pdclust_src_addr *src, struct m0_pdclust_tgt_addr *tgt)
M0_INTERNAL int m0_layout_standard_types_register(struct m0_layout_domain *dom)
void(* leo_get)(const struct m0_layout_enum *e, uint32_t idx, const struct m0_fid *gfid, struct m0_fid *out)
M0_INTERNAL void net_srv_init(struct sim *s, struct net_srv *srv)
struct m0_layout_instance * cth_layout_instance
struct m0_uint128 pa_seed
M0_INTERNAL struct m0_layout * m0_pdl_to_layout(struct m0_pdclust_layout *pl)
struct m0_pdclust_tgt_addr tgt
struct m0t1fs_client::m0t1fs_conn * cc_srv
M0_INTERNAL enum m0_pdclust_unit_type m0_pdclust_unit_classify(const struct m0_pdclust_layout *pl, int unit)
static void m0t1fs_layout_fini(struct m0t1fs_conf *conf)
M0_INTERNAL int m0_pdclust_build(struct m0_layout_domain *dom, uint64_t lid, const struct m0_pdclust_attr *attr, struct m0_layout_enum *le, struct m0_pdclust_layout **out)
M0_INTERNAL void m0_layout_standard_types_unregister(struct m0_layout_domain *dom)
M0_INTERNAL void m0_layout_instance_fini(struct m0_layout_instance *li)
M0_INTERNAL struct m0_pdclust_instance * m0_layout_instance_to_pdi(const struct m0_layout_instance *li)
static void thread_loop(struct sim *s, struct sim_thread *t, void *arg)
M0_INTERNAL void m0_layout_put(struct m0_layout *l)
M0_INTERNAL void sim_name_set(char **name, const char *format,...)
M0_INTERNAL void net_srv_fini(struct net_srv *srv)
static struct m0_addb2_source * s
struct m0_pdclust_src_addr src
struct sim_thread cth_thread
static struct net_srv srv
M0_INTERNAL void m0_fid_tassume(struct m0_fid *fid, const struct m0_fid_type *ft)