Motr
M0
|
#include "lib/trace.h"
#include "lib/memory.h"
#include "lib/finject.h"
#include "layout/pdclust.h"
#include "layout/linear_enum.h"
#include "pool/pool.h"
#include "rpc/rpclib.h"
#include "conf/helpers.h"
#include "cas/client.h"
#include "dix/imask.h"
#include "dix/layout.h"
#include "dix/meta.h"
#include "dix/client.h"
#include "dix/fid_convert.h"
#include "ut/ut.h"
#include "ut/misc.h"
Go to the source code of this file.
Data Structures | |
struct | cl_ctx |
struct | dix_rep_arr |
struct | dix_rep |
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DIX |
#define | SERVER_LOG_FILE_NAME "dix_ut.errlog" |
#define | DFID(x, y) M0_FID_TINIT('x', (x), (y)) |
#define | BYTES(bit) ((bit + 7) / 8) |
Enumerations | |
enum | { DIX_M0T1FS_LAYOUT_P = 9, DIX_M0T1FS_LAYOUT_N = 1, DIX_M0T1FS_LAYOUT_K = 3, DIX_M0T1FS_LAYOUT_S = 3 } |
enum | { COUNT = 10, COUNT_INDEX = 3 } |
enum | { MAX_RPCS_IN_FLIGHT = 10, RECV_QUEUE_LEN = 10 } |
enum | ut_dix_req_type { REQ_CREATE, REQ_DELETE, REQ_LOOKUP, REQ_NEXT, REQ_GET, REQ_PUT, REQ_DEL } |
enum | ut_pg_unit { PG_UNIT_DATA, PG_UNIT_PARITY0, PG_UNIT_PARITY1, PG_UNIT_SPARE0, PG_UNIT_SPARE1 } |
enum | { CASE_1, CASE_2, CASE_3, CASE_4 } |
Functions | |
void | imask (void) |
static char | get_bit (void *buffer, m0_bcount_t pos) |
void | imask_apply (void) |
static void | imask_empty (void) |
static void | imask_infini (void) |
static void | imask_short (void) |
static void | imask_invalid (void) |
static void | layout_check (struct m0_dix_linst *dli) |
static void | layout_create (struct m0_layout_domain *domain, struct m0_pool_version *pver) |
void | pdclust_map (void) |
void | meta_val_encdec (void) |
void | meta_val_encdec_n (void) |
void | layout_encdec (void) |
static uint64_t | dix_key (uint32_t seq_num) |
static uint64_t | dix_val (uint32_t seq_num) |
static void | dix__vals_check (struct dix_rep_arr *rep, uint32_t start_key, uint32_t first_val, uint32_t last_val) |
static void | dix_vals_check (struct dix_rep_arr *rep, uint32_t count) |
static void | dix_index_init (struct m0_dix *index, uint32_t id) |
static void | dix_predictable_index_init (struct m0_dix *index, uint32_t id) |
static void | dix_index_fini (struct m0_dix *index) |
static void | dix__kv_alloc_and_fill (struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t first, uint32_t last) |
static void | dix_kv_alloc_and_fill (struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t count) |
static void | dix_kv_destroy (struct m0_bufvec *keys, struct m0_bufvec *vals) |
static void | dix_rep_free (struct dix_rep_arr *rep) |
static struct m0_pooldev * | dix_pm_disk_find (struct m0_poolmach *pm, uint32_t sdev_idx) |
static void | dix_pm_disk_state_set (struct m0_poolmach *pm, uint32_t sdev_idx, enum m0_pool_nd_state state) |
static struct m0_poolmach * | dix_srv_poolmach (void) |
static enum m0_pool_nd_state | dix_disk_state (uint32_t sdev_idx) |
static void | dix_disk_state_set (uint32_t sdev_idx, enum m0_pool_nd_state state) |
static void | dix_disk_failure_set (uint32_t sdev_idx, enum m0_pool_nd_state state) |
static void | dix_disk_online_set (uint32_t sdev_idx) |
static void | dix_predictable_sdev_ids_fill (struct m0_dix *index) |
static uint32_t | dix_sdev_id (enum ut_pg_unit unit) |
static void | dix_cctg_id_fill (struct m0_dix *index, uint32_t sdev_idx, struct m0_cas_id *cctg_id) |
static struct m0_rpc_session * | cctg_rpc_sess (uint32_t sdev_idx) |
static int | dix_cctg_records_del (struct m0_dix *index, struct m0_bufvec *keys, uint32_t sdev_idx) |
static void | dix_cctg_records_put (struct m0_dix *index, struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t sdev_idx) |
static bool | dix_cctg_has_replica (struct m0_dix *index, struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t sdev_idx) |
static void | dix_records_erase (struct m0_dix *index, struct m0_bufvec *keys) |
static bool | dix_rec_is_deleted (struct m0_dix *index, struct m0_bufvec *keys) |
static int | dix_client_init (struct cl_ctx *cctx, const char *cl_ep_addr, const char *srv_ep_addr, const char *dbname, struct m0_net_xprt *xprt) |
static void | dix_client_fini (struct cl_ctx *cctx) |
static void | dixc_ut_init (struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx) |
static void | dixc_ut_fini (struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx) |
static int | ut_pver_find (struct m0_reqh *reqh, struct m0_fid *out) |
static void | ut_service_init (void) |
static void | ut_service_fini (void) |
static void | dix_meta_create (void) |
static int | dix_common_idx_flagged_op (const struct m0_dix *indices, uint32_t indices_nr, enum ut_dix_req_type type, uint32_t flags) |
static int | dix_common_idx_op (const struct m0_dix *indices, uint32_t indices_nr, enum ut_dix_req_type type) |
static int | dix_common_rec_op (const struct m0_dix *index, const struct m0_bufvec *keys, struct m0_bufvec *vals, const uint32_t *recs_nr, uint32_t flags, struct dix_rep_arr *rep, enum ut_dix_req_type type) |
static int | dix_ut_put (const struct m0_dix *index, const struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t flags, struct dix_rep_arr *rep) |
static int | dix_ut_get (const struct m0_dix *index, const struct m0_bufvec *keys, struct dix_rep_arr *rep) |
static int | dix_ut_del (const struct m0_dix *index, const struct m0_bufvec *keys, struct dix_rep_arr *rep) |
static int | dix_ut_next (const struct m0_dix *index, const struct m0_bufvec *start_keys, const uint32_t *recs_nr, uint32_t flags, struct dix_rep_arr *rep) |
static void | dix_index_create_and_fill (const struct m0_dix *index, const struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t flags) |
static void | dix_create (void) |
static void | dix_create_crow (void) |
static void | dix_create_dgmode (void) |
static void | dix_delete (void) |
static void | dix_delete_crow (void) |
static void | dix_delete_dgmode (void) |
static int | dix_list_op (const struct m0_fid *start_fid, uint32_t indices_nr, struct m0_fid *out_fids, uint32_t *out_fids_nr) |
static void | dix_list (void) |
static void | dix_cctgs_lookup (void) |
static void | dix_put (void) |
static void | dix_put_overwrite (void) |
static void | dix_put_crow (void) |
static void | dix_put_dgmode (void) |
static void | dix_get (void) |
static void | dix_dgmode_disks_prep (enum ut_pg_unit unit1, enum m0_pool_nd_state state1, enum ut_pg_unit unit2, enum m0_pool_nd_state state2, struct m0_dix *index, struct m0_bufvec *keys, struct m0_bufvec *vals) |
static void | dix_dgmode_disks_unprep (enum ut_pg_unit unit1, enum m0_pool_nd_state state1, enum ut_pg_unit unit2, enum m0_pool_nd_state state2, struct m0_dix *index, struct m0_bufvec *keys, struct m0_bufvec *vals) |
static void | dix_get_dgmode (void) |
static void | dix_get_resend (void) |
static void | dix_next (void) |
static void | dix_next_crow (void) |
static void | dix_next_dgmode (void) |
static void | dix_del (void) |
static void | dix_records_restore (struct m0_dix *index, struct m0_bufvec *keys, struct m0_bufvec *vals) |
static void | dix_del_dgmode (void) |
static void | dix_null_value (void) |
static void | local_failures (void) |
static void | keys_alloc (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps) |
static void | crep_val_set (struct m0_bufvec *reps, uint32_t idx, uint64_t val) |
static void | drep_val_set (struct m0_bufvec *reps, uint32_t idx, uint64_t val) |
static int | case_1_data (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr) |
static int | case_2_data (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr) |
static int | case_3_data (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr) |
static int | case_4_data (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr) |
static int | dix_rep_cmp (struct m0_dix_next_reply *a, struct m0_dix_next_reply *b) |
static void | case_data_free (struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t *recs_nr, struct m0_bufvec *start_keys) |
static void | results_check (struct m0_dix_req *req, struct m0_bufvec *dix_reps) |
void | next_merge (void) |
static void | server_is_down (void) |
Variables | |
static char * | dix_startup_cmd [] |
static const char * | cdbnames [] = { "dix1" } |
static const char * | cl_ep_addrs [] = { "0@lo:12345:34:2" } |
static const char * | srv_ep_addrs [] = { "0@lo:12345:34:1" } |
static struct cl_ctx | dix_ut_cctx |
static struct m0_rpc_server_ctx | dix_ut_sctx |
static const char * | ut_profile = "<0x7000000000000001:0>" |
static int(* | cases [])(struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr) |
struct m0_ut_suite | dix_client_ut |
#define BYTES | ( | bit | ) | ((bit + 7) / 8) |
Definition at line 163 of file client_ut.c.
#define DFID | ( | x, | |
y | |||
) | M0_FID_TINIT('x', (x), (y)) |
Definition at line 135 of file client_ut.c.
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DIX |
Definition at line 23 of file client_ut.c.
#define SERVER_LOG_FILE_NAME "dix_ut.errlog" |
Definition at line 110 of file client_ut.c.
anonymous enum |
Enumerator | |
---|---|
DIX_M0T1FS_LAYOUT_P | |
DIX_M0T1FS_LAYOUT_N | |
DIX_M0T1FS_LAYOUT_K | |
DIX_M0T1FS_LAYOUT_S |
Definition at line 41 of file client_ut.c.
anonymous enum |
Enumerator | |
---|---|
COUNT | |
COUNT_INDEX |
Definition at line 48 of file client_ut.c.
anonymous enum |
Enumerator | |
---|---|
MAX_RPCS_IN_FLIGHT | |
RECV_QUEUE_LEN |
Definition at line 53 of file client_ut.c.
anonymous enum |
Enumerator | |
---|---|
CASE_1 | |
CASE_2 | |
CASE_3 | |
CASE_4 |
Definition at line 2550 of file client_ut.c.
enum ut_dix_req_type |
Enumerator | |
---|---|
REQ_CREATE | |
REQ_DELETE | |
REQ_LOOKUP | |
REQ_NEXT | |
REQ_GET | |
REQ_PUT | |
REQ_DEL |
Definition at line 63 of file client_ut.c.
enum ut_pg_unit |
Enumerator | |
---|---|
PG_UNIT_DATA | |
PG_UNIT_PARITY0 | |
PG_UNIT_PARITY1 | |
PG_UNIT_SPARE0 | |
PG_UNIT_SPARE1 |
Definition at line 73 of file client_ut.c.
|
static |
Definition at line 3027 of file client_ut.c.
|
static |
|
static |
|
static |
Definition at line 645 of file client_ut.c.
|
static |
Definition at line 586 of file client_ut.c.
|
static |
Definition at line 952 of file client_ut.c.
|
static |
Definition at line 859 of file client_ut.c.
|
static |
Definition at line 883 of file client_ut.c.
|
static |
Definition at line 918 of file client_ut.c.
|
static |
|
static |
Definition at line 1102 of file client_ut.c.
|
static |
Definition at line 1019 of file client_ut.c.
|
static |
Definition at line 1231 of file client_ut.c.
|
static |
Definition at line 1271 of file client_ut.c.
|
static |
Definition at line 1277 of file client_ut.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1932 of file client_ut.c.
|
static |
Definition at line 1973 of file client_ut.c.
|
static |
Definition at line 756 of file client_ut.c.
|
static |
Definition at line 779 of file client_ut.c.
|
static |
Definition at line 730 of file client_ut.c.
|
static |
Definition at line 745 of file client_ut.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 1420 of file client_ut.c.
|
static |
Definition at line 640 of file client_ut.c.
|
static |
Definition at line 611 of file client_ut.c.
|
static |
|
static |
Definition at line 664 of file client_ut.c.
Definition at line 671 of file client_ut.c.
|
static |
|
static |
Definition at line 1611 of file client_ut.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 704 of file client_ut.c.
|
static |
Definition at line 624 of file client_ut.c.
|
static |
Definition at line 799 of file client_ut.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 1007 of file client_ut.c.
Definition at line 998 of file client_ut.c.
|
static |
Definition at line 2333 of file client_ut.c.
|
static |
Definition at line 3014 of file client_ut.c.
|
static |
Definition at line 678 of file client_ut.c.
|
static |
|
static |
Definition at line 719 of file client_ut.c.
|
static |
Definition at line 1403 of file client_ut.c.
|
static |
Definition at line 1396 of file client_ut.c.
|
static |
Definition at line 1410 of file client_ut.c.
|
static |
Definition at line 1387 of file client_ut.c.
|
static |
|
static |
Definition at line 606 of file client_ut.c.
|
static |
Definition at line 1145 of file client_ut.c.
|
static |
Definition at line 1128 of file client_ut.c.
|
static |
|
static |
void imask | ( | void | ) |
Definition at line 141 of file client_ut.c.
void imask_apply | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
Definition at line 2557 of file client_ut.c.
|
static |
Definition at line 321 of file client_ut.c.
|
static |
Definition at line 345 of file client_ut.c.
void layout_encdec | ( | void | ) |
|
static |
void meta_val_encdec | ( | void | ) |
void meta_val_encdec_n | ( | void | ) |
void next_merge | ( | void | ) |
void pdclust_map | ( | void | ) |
|
static |
Definition at line 3074 of file client_ut.c.
|
static |
Definition at line 1152 of file client_ut.c.
|
static |
Definition at line 1216 of file client_ut.c.
|
static |
Definition at line 1170 of file client_ut.c.
|
static |
Definition at line 3063 of file client_ut.c.
|
static |
Definition at line 123 of file client_ut.c.
|
static |
Definition at line 124 of file client_ut.c.
struct m0_ut_suite dix_client_ut |
Definition at line 3164 of file client_ut.c.
|
static |
Definition at line 113 of file client_ut.c.
|
static |
Definition at line 127 of file client_ut.c.
|
static |
Definition at line 128 of file client_ut.c.
|
static |
Definition at line 125 of file client_ut.c.
|
static |
Definition at line 134 of file client_ut.c.