25 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT 34 #define DUMMY_PTR 0xdeafdead 36 #define UT_DEFAULT_BLOCK_SHIFT M0_DEFAULT_BUF_SHIFT 37 #define UT_DEFAULT_BLOCK_SIZE (1ULL << M0_DEFAULT_BUF_SHIFT) 84 m0_pdclust_layout_bob_init(pl);
88 m0_pdclust_layout_bob_check(pl);
111 m0_pdclust_layout_bob_fini(pl);
125 m0_pdclust_instance_bob_init(pdi);
128 m0_pdclust_instance_bob_check(pdi);
131 m0_layout_instance_bob_init(&pdi->
pi_base);
133 m0_layout_instance_bob_check(&pdi->
pi_base);
165 m0_layout_instance_bob_fini(&pdi->
pi_base);
167 m0_pdclust_instance_bob_fini(pdi);
173 nw_xfer_request_bob_init(xfer);
190 nw_xfer_request_bob_fini(xfer);
204 data_buf_bob_init(ret);
211 data_buf_bob_fini(db);
227 data_buf_bob_init(db);
236 data_buf_bob_fini(db);
263 for (
i = 0;
i <
map->pi_max_row;
i++) {
268 if (do_alloc ==
false)
271 for (
i = 0;
i <
map->pi_max_row;
i++) {
287 for (
i = 0;
i <
map->pi_max_row;
i++) {
311 pargrp_iomap_bob_init(ret);
347 for (
r = 0;
r <
map->pi_max_row;
r++) {
348 for (
c = 0;
c <
map->pi_max_col;
c++) {
358 pargrp_iomap_bob_fini(
map);
380 m0_op_io_bob_init(ioo);
381 m0_op_obj_bob_init(&ioo->
ioo_oo);
518 ioreq_fop_bob_init(ret);
528 ioreq_fop_bob_fini(
fop);
537 target_ioreq_bob_init(ti);
547 tioreqht_tlink_init(ti);
557 tioreqht_tlink_fini(ti);
559 target_ioreq_bob_fini(ti);
676 #undef M0_TRACE_SUBSYSTEM M0_INTERNAL struct m0_layout * m0_layout_find(struct m0_layout_domain *dom, uint64_t lid)
struct m0_poolmach_state * pm_state
static const struct m0_bob_type pdclust_bob
M0_INTERNAL struct m0_pdclust_instance * ut_dummy_pdclust_instance_create(struct m0_pdclust_layout *pdl)
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void ut_dummy_pdclust_instance_delete(struct m0_pdclust_instance *pdi)
M0_INTERNAL void m0_fid_gob_make(struct m0_fid *gob_fid, uint32_t container, uint64_t key)
M0_INTERNAL int m0_indexvec_alloc(struct m0_indexvec *ivec, uint32_t len)
struct m0_pool_version * l_pver
uint64_t * ioo_failed_nodes
static int mock_pargrp_iomap_parity_recalc(struct pargrp_iomap *map)
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
static struct m0_sm_group * grp
struct m0_pool_version * pv
struct m0_poolmach pv_mach
M0_INTERNAL void ut_dummy_target_ioreq_delete(struct target_ioreq *ti)
const struct pargrp_iomap_ops mock_iomap_ops
M0_INTERNAL struct m0_obj * ut_dummy_obj_create(void)
struct m0_sm_group * oo_sm_grp
M0_INTERNAL void ut_dummy_data_buf_delete(struct data_buf *db)
struct m0_layout_instance pi_base
static int mock_pargrp_iomap_dgmode_process(struct pargrp_iomap *map, struct target_ioreq *tio, m0_bindex_t *index, uint32_t count)
M0_INTERNAL void ut_striped_layout_init(struct m0_striped_layout *stl, struct m0_layout_domain *dom)
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
#define UT_DEFAULT_BLOCK_SIZE
struct m0_sm_conf io_sm_conf
struct m0_indexvec_varr ti_bufvec
M0_INTERNAL void ut_dummy_pargrp_iomap_delete(struct pargrp_iomap *map, struct m0_client *instance)
M0_INTERNAL void ut_dummy_xfer_req_fini(struct nw_xfer_request *xfer)
M0_INTERNAL struct data_buf * ut_dummy_data_buf_create(void)
M0_INTERNAL void m0_indexvec_free(struct m0_indexvec *ivec)
M0_INTERNAL void m0_free_aligned(void *data, size_t size, unsigned shift)
static struct m0_bob_type iofop_bobtype
struct m0_poolnode * pst_nodes_array
M0_INTERNAL void ut_dummy_data_buf_fini(struct data_buf *db)
M0_INTERNAL void ut_dummy_pdclust_layout_delete(struct m0_pdclust_layout *pl, struct m0_client *instance)
M0_INTERNAL void ut_striped_layout_fini(struct m0_striped_layout *stl, struct m0_layout_domain *dom)
struct m0_pdclust_attr pl_attr
M0_INTERNAL void m0_sm_group_fini(struct m0_sm_group *grp)
struct m0_indexvec pi_ivec
M0_INTERNAL void m0_rwlock_init(struct m0_rwlock *lock)
struct m0_pooldev * pst_devices_array
static const struct m0_bob_type layout_instance_bob
M0_INTERNAL void ut_dummy_paritybufs_delete(struct pargrp_iomap *map, bool do_free)
static struct m0_sm_ast ast[NR]
M0_INTERNAL void m0_sm_group_unlock(struct m0_sm_group *grp)
uint64_t * ioo_failed_session
M0_INTERNAL void ut_dummy_xfer_req_delete(struct nw_xfer_request *xfer)
struct m0_poolnode * pd_node
struct nw_xfer_request ioo_nwxfer
M0_INTERNAL void m0_fid_set(struct m0_fid *fid, uint64_t container, uint64_t key)
M0_INTERNAL void ut_dummy_data_buf_init(struct data_buf *db)
M0_INTERNAL void ut_dummy_xfer_req_init(struct nw_xfer_request *xfer)
M0_INTERNAL uint64_t m0_pool_version2layout_id(const struct m0_fid *pv_fid, uint64_t lid)
struct m0_indexvec ioo_ext
struct m0_striped_layout pl_base
void dummy_ioreq_fop_cb(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void m0_sm_group_init(struct m0_sm_group *grp)
static struct m0_addb2_callback c
#define bob_of(ptr, type, field, bt)
struct m0_bufvec ioo_data
M0_INTERNAL struct m0_pdclust_layout * m0_layout_to_pdl(const struct m0_layout *l)
M0_INTERNAL void ut_dummy_paritybufs_create(struct pargrp_iomap *map, bool do_alloc)
M0_INTERNAL struct target_ioreq * ut_dummy_target_ioreq_create(void)
M0_INTERNAL struct m0_pdclust_layout * ut_get_pdclust_layout_from_ioo(struct m0_op_io *ioo)
M0_INTERNAL struct ioreq_fop * ut_dummy_ioreq_fop_create(void)
#define UT_DEFAULT_BLOCK_SHIFT
struct m0_rpc_session * ti_session
struct m0_op_common oo_oc
struct m0_pdclust_instance::tile_cache pi_tile_cache
static int mock_pargrp_iomap_dgmode_recover(struct pargrp_iomap *map)
M0_INTERNAL void ut_dummy_obj_delete(struct m0_obj *obj)
uint32_t pst_max_node_failures
struct target_ioreq * irf_tioreq
const struct m0_layout_instance_ops * li_ops
M0_INTERNAL void m0_sm_init(struct m0_sm *mach, const struct m0_sm_conf *conf, uint32_t state, struct m0_sm_group *grp)
M0_INTERNAL struct m0_pdclust_layout * ut_dummy_pdclust_layout_create(struct m0_client *instance)
#define M0_ALLOC_PTR(ptr)
struct m0_entity * op_entity
M0_INTERNAL struct pargrp_iomap * ut_dummy_pargrp_iomap_create(struct m0_client *instance, int num_blocks)
enum nw_xfer_state nxr_state
M0_INTERNAL void ut_dummy_ioo_delete(struct m0_op_io *ioo, struct m0_client *instance)
struct m0_entity ob_entity
M0_BOB_DEFINE(static, &layout_instance_bob, m0_layout_instance)
M0_INTERNAL void m0_sm_move(struct m0_sm *mach, int32_t rc, int state)
struct data_buf *** pi_databufs
uint32_t psu_device_index
uint32_t pst_max_device_failures
static struct m0_fop * fop
M0_INTERNAL void m0_rwlock_fini(struct m0_rwlock *lock)
static struct m0 instance
M0_INTERNAL void m0_sm_group_lock(struct m0_sm_group *grp)
M0_INTERNAL int ut_dummy_poolmach_create(struct m0_pool_version *pv)
M0_INTERNAL struct m0_op_io * ut_dummy_ioo_create(struct m0_client *instance, int num_io_maps)
int(* pi_parity_recalc)(struct pargrp_iomap *map)
M0_INTERNAL struct nw_xfer_request * ut_dummy_xfer_req_create(void)
struct nw_xfer_request * ti_nwxfer
M0_INTERNAL void ut_dummy_ioreq_fop_delete(struct ioreq_fop *fop)
struct m0_layout_instance * oo_layout_instance
M0_INTERNAL void ut_dummy_poolmach_delete(struct m0_pool_version *pv)
M0_INTERNAL void * m0_alloc_aligned(size_t size, unsigned shift)
struct m0_indexvec ti_goff_ivec
struct m0_bufvec ti_auxbufvec
static const struct m0_bob_type pdclust_instance_bob
struct m0_bufvec ioo_attr
M0_INTERNAL void m0_bob_type_tlist_init(struct m0_bob_type *bt, const struct m0_tl_descr *td)
struct m0_pool_spare_usage * pst_spare_usage_array
const struct pargrp_iomap_ops * pi_ops
struct m0_indexvec ti_ivec
#define offsetof(typ, memb)
struct m0_obj_attr ob_attr
struct pargrp_iomap ** ioo_iomaps
M0_INTERNAL void m0_sm_fini(struct m0_sm *mach)