Motr  M0
Cas

Data Structures

struct  async_wait
 
struct  cl_ctx
 
struct  cas_ver_op
 
struct  put_del_ver_case
 
struct  meta_rec
 
struct  fopsem
 
struct  record
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CAS
 
#define SERVER_LOG_FILE_NAME   "cas_server.log"
 
#define IFID(x, y)   M0_FID_TINIT('i', (x), (y))
 
#define M0_BUFVEC_SLICE(__bufvec, __idx)
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CAS
 
#define IFID(x, y)   M0_FID_TINIT('i', (x), (y))
 
#define TFID(x, y)   M0_FID_TINIT('T', (x), (y))
 
#define CB(x)   m0_byteorder_cpu_to_be64(x)
 
#define BC(x)   m0_byteorder_be64_to_cpu(x)
 

Enumerations

enum  { COUNT = 24, COUNT_TREE = 10, COUNT_VAL_BYTES = 4096, COUNT_META_ENTRIES = 3 }
 
enum  idx_operation { IDX_CREATE, IDX_DELETE }
 
enum  { MAX_RPCS_IN_FLIGHT = 10 }
 
enum  named_version { PAST = 2, FUTURE = 3 }
 
enum  named_outcome { TOMBSTONE, PRESERVED, OVERWRITTEN }
 
enum  named_op { NOP, PUT, DEL }
 
enum  { N = 4096 }
 
enum  { BSET = true, BUNSET = false, BANY = 2 }
 
enum  { EMPTYVAL = 0, NOVAL = (uint64_t)-1 }
 
enum  { INSERTS = 1500, MULTI_INS = 15 }
 
enum  { BIG_ROWS_NUMBER = 2000, SMALL_ROWS_NUMBER = 257 }
 

Functions

static int cas_fops_init (const struct m0_sm_conf *sm_conf, const struct m0_fom_type_ops *fom_ops, const struct m0_reqh_service_type *svctype)
 
static void cas_fops_fini (void)
 
M0_INTERNAL int m0_cas_module_init (void)
 
M0_INTERNAL void m0_cas_module_fini (void)
 
M0_INTERNAL void m0_cas_id_fini (struct m0_cas_id *cid)
 
M0_INTERNAL bool m0_cas_id_invariant (const struct m0_cas_id *cid)
 
M0_INTERNAL bool cas_in_ut (void)
 
M0_INTERNAL bool m0_crv_tbs (const struct m0_crv *crv)
 
M0_INTERNAL void m0_crv_tbs_set (struct m0_crv *crv, bool tbs)
 
M0_INTERNAL struct m0_dtm0_ts m0_crv_ts (const struct m0_crv *crv)
 
M0_INTERNAL void m0_crv_ts_set (struct m0_crv *crv, const struct m0_dtm0_ts *ts)
 
M0_INTERNAL void m0_crv_init (struct m0_crv *crv, const struct m0_dtm0_ts *ts, bool tbs)
 
M0_INTERNAL int m0_crv_cmp (const struct m0_crv *left, const struct m0_crv *right)
 
M0_INTERNAL bool m0_crv_is_none (const struct m0_crv *crv)
 
 M0_BASSERT (COUNT % 2==0)
 
static int bufvec_empty_alloc (struct m0_bufvec *bufvec, uint32_t num_segs)
 
static int bufvec_cmp (const struct m0_bufvec *left, const struct m0_bufvec *right)
 
static void value_create (int size, int num, char *buf)
 
static void vals_create (int count, int size, struct m0_bufvec *vals)
 
static void vals_mix_create (int count, int large_size, struct m0_bufvec *vals)
 
static int cas_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 cas_client_fini (struct cl_ctx *cctx)
 
static void casc_ut_init (struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx)
 
static void casc_ut_fini (struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx)
 
static bool casc_chan_cb (struct m0_clink *clink)
 
static int ut_idx_crdel_wrp (enum idx_operation op, struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, m0_chan_cb_t cb, struct m0_cas_rec_reply *rep, uint32_t flags)
 
static int ut_idx_create_async (struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, m0_chan_cb_t cb, struct m0_cas_rec_reply *rep)
 
static int ut_idx_create (struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
 
static int ut_lookup_idx (struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
 
static int ut_idx_flagged_delete (struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep, uint32_t flags)
 
static int ut_idx_delete (struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
 
static int ut_idx_list (struct cl_ctx *cctx, const struct m0_fid *start_fid, uint64_t ids_nr, uint64_t *rep_count, struct m0_cas_ilist_reply *rep)
 
static void ut_dtx_init (struct m0_dtx **out, uint64_t version)
 
static void ut_dtx_fini (struct m0_dtx *dtx)
 
static int ut_rec_common_put (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint32_t flags)
 
int ut_rec_common_put_seq (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint32_t flags)
 
static int ut_rec_put (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_cas_rec_reply *rep, uint32_t flags)
 
static void ut_get_rep_clear (struct m0_cas_get_reply *rep, uint32_t nr)
 
static int ut_rec__get (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_get_reply *rep, uint64_t flags)
 
static int ut_rec_get (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_get_reply *rep)
 
static void ut_next_rep_clear (struct m0_cas_next_reply *rep, uint64_t nr)
 
static int ut_next_rec (struct cl_ctx *cctx, struct m0_cas_id *index, struct m0_bufvec *start_keys, uint32_t *recs_nr, struct m0_cas_next_reply *rep, uint64_t *count, uint32_t flags)
 
static int ut_rec_common_del (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint64_t flags)
 
static int ut_rec_common_del_seq (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint64_t flags)
 
static int ut_rec_del (struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_rec_reply *rep, uint64_t flags)
 
static void idx_create (void)
 
static void idx_create_fail (void)
 
static void idx_create_a (void)
 
static void idx_create_n (void)
 
static void idx_delete (void)
 
static void idx_delete_fail (void)
 
static void idx_delete_non_exist (void)
 
static void idx_delete_n (void)
 
static void idx_tree_insert (void)
 
static void idx_tree_delete (void)
 
static void idx_tree_delete_fail (void)
 
static void idx_list (void)
 
static void idx_list_fail (void)
 
static bool next_rep_equals (const struct m0_cas_next_reply *rep, void *key, void *val)
 
static void next_common (struct m0_bufvec *keys, struct m0_bufvec *values, uint32_t flags)
 
static int get_reply2bufvec (struct m0_cas_get_reply *get_rep, m0_bcount_t nr, struct m0_bufvec *out)
 
static bool has_values (struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *expected_values, uint64_t flags)
 
static bool has_versions (struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version, uint64_t flags)
 
static bool has_tombstones (struct m0_cas_id *index, const struct m0_bufvec *keys)
 
static void next_reply_breakdown (struct m0_cas_next_reply *next_rep, m0_bcount_t nr, struct m0_bufvec *out_key, struct m0_bufvec *out_val, struct m0_crv **out_ver)
 
static void next_records_verified (struct m0_cas_id *index, struct m0_bufvec *start_key, uint32_t requested_keys_nr, struct m0_bufvec *expected_keys, struct m0_bufvec *expected_values, struct m0_crv *expected_versions, int flags)
 
static void next_keys_verified (struct m0_cas_id *index, struct m0_bufvec *start_key, uint32_t requested_keys_nr, struct m0_bufvec *expected_keys, int flags)
 
static void ut_rec_common_put_verified (struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, uint64_t version, uint64_t flags)
 
static void ut_rec_common_del_verified (struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version, uint64_t flags)
 
static void put_get_verified (struct m0_cas_id *index, struct m0_bufvec *keys, struct m0_bufvec *values, struct m0_bufvec *expected_values, uint64_t version, int put_flags, int get_flags)
 
static void del_get_verified (struct m0_cas_id *index, struct m0_bufvec *keys, uint64_t version, uint64_t del_flags, uint64_t get_flags)
 
static void next_ver (void)
 
static void next_ver_exposed (void)
 
static void next (void)
 
static void next_bulk (void)
 
static void next_fail (void)
 
static void next_multi_common (struct m0_bufvec *keys, struct m0_bufvec *values)
 
static void next_multi (void)
 
static void next_multi_bulk (void)
 
static void put_common_with_ver (struct m0_bufvec *keys, struct m0_bufvec *values, uint64_t version)
 
static void put_common (struct m0_bufvec *keys, struct m0_bufvec *values)
 
static void put_overwrite_ver (void)
 
static void put_ver (void)
 
static void put (void)
 
static void recs_fragm (void)
 
static void recs_fragm_fail (void)
 
static void put_bulk (void)
 
static void put_save_common (uint32_t flags)
 
static void put_create (void)
 
static void put_overwrite (void)
 
static void put_crow (void)
 
static void put_crow_fail (void)
 
static void put_fail_common (struct m0_bufvec *keys, struct m0_bufvec *values)
 
static void put_fail (void)
 
static void put_bulk_fail (void)
 
static void upd (void)
 
static void del_common (struct m0_bufvec *keys, struct m0_bufvec *values, uint64_t version, uint64_t put_flags, uint64_t del_flags, uint64_t get_flags)
 
static void del_ver (void)
 
static void get_ver_exposed (void)
 
static void del (void)
 
static void del_bulk (void)
 
static void del_fail (void)
 
static void del_n (void)
 
static void null_value (void)
 
static void get_common (struct m0_bufvec *keys, struct m0_bufvec *values)
 
static void get (void)
 
static void get_bulk (void)
 
static void get_fail (void)
 
static void recs_count (void)
 
static void reply_too_large (void)
 
static void cas_ver_op_execute (const struct cas_ver_op *cvop, struct m0_cas_id *index)
 
static void put_del_ver_case_execute (const struct put_del_ver_case *c, struct m0_cas_id *index)
 
static void verify_version_properties (struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version)
 
static enum named_outcome outcome (const struct put_del_ver_case *c)
 
static void put_del_ver_case_verify (const struct put_del_ver_case *c, struct m0_cas_id *index)
 
static void put_del_ver (void)
 
static void cb_done (struct m0_fom *fom)
 
static void cb_fini (struct m0_fom *fom)
 
static int cid_enc (struct m0_cas_id *cid, struct m0_rpc_at_buf *at_buf)
 
static void rep_clear (void)
 
static int at_inline_fill (struct m0_rpc_at_buf *dst, struct m0_rpc_at_buf *src)
 
static void reqh_init (bool mkfs, bool use_small_credits)
 
static void _init (bool mkfs, bool use_small_credits)
 
static void init (void)
 
static void service_stop (void)
 
static void fini (void)
 
static void reinit_nomkfs (void)
 
static void init_fini (void)
 
static void init_fail (void)
 
static void reinit (void)
 
static void restart (void)
 
static void fop_release (struct m0_ref *ref)
 
static void fop_submit (struct m0_fop_type *ft, const struct m0_fid *index, struct m0_cas_rec *rec)
 
static void meta_fop_submit (struct m0_fop_type *fopt, struct meta_rec *meta_recs, int meta_recs_num)
 
static bool rec_check (const struct m0_cas_rec *rec, int rc, int key, int val)
 
static bool rep_check (int recno, uint64_t rc, int key, int val)
 
static void meta_cid_submit (struct m0_fop_type *fopt, struct m0_cas_id *cid)
 
static void meta_fid_submit (struct m0_fop_type *fopt, struct m0_fid *fid)
 
static void meta_lookup_none (void)
 
static void meta_lookup_2none (void)
 
static void meta_lookup_Nnone (void)
 
static void create (void)
 
static void cctg_create (void)
 
static void cctg_create_lookup (void)
 
static void cctg_create_delete (void)
 
static void create_lookup (void)
 
static void create_create (void)
 
static void create_delete (void)
 
static void recreate (void)
 
static void meta_cur_1 (void)
 
static void meta_cur_eot (void)
 
static void meta_cur_0 (void)
 
static void meta_cur_empty (void)
 
static void meta_cur_none (void)
 
static void meta_cur_all (void)
 
static void meta_random (void)
 
static void meta_invalid (void)
 
static void index_op_rc (struct m0_fop_type *ft, struct m0_fid *index, uint64_t key, uint64_t val, uint64_t rc)
 
static void index_op (struct m0_fop_type *ft, struct m0_fid *index, uint64_t key, uint64_t val)
 
static void insert (void)
 
static void insert_lookup (void)
 
static void insert_delete (void)
 
static void lookup_none (void)
 
static void empty_value (void)
 
static void insert_2 (void)
 
static void delete_2 (void)
 
static void insert_odd (struct m0_fid *index)
 
static void lookup_all (struct m0_fid *index)
 
static void lookup_N (void)
 
static void lookup_restart (void)
 
static void cur_N (void)
 
static void meta_mt_thread (int idx)
 
static void meta_mt (void)
 
static void meta_insert_fail (void)
 
static void meta_lookup_fail (void)
 
static void meta_delete_fail (void)
 
static void insert_fail (void)
 
static void lookup_fail (void)
 
static void delete_fail (void)
 
static void multi_values_insert (struct record *recs, int recs_count)
 
static void cur_fail (void)
 
static void multi_values_lookup (struct record *recs, int recs_count)
 
static void multi_values_delete (struct record *recs, int recs_count)
 
static void multi_insert (void)
 
static void multi_lookup (void)
 
static void multi_delete (void)
 
static void multi_insert_fail (void)
 
static void multi_lookup_fail (void)
 
static void multi_delete_fail (void)
 
static void server_restart_nomkfs (void)
 
static void multi_create_drop (void)
 
static void create_insert_drop_with_fail (bool inject_fail)
 
static void create_insert_drop ()
 
static void create_insert_drop_fail ()
 
static void init_cgc_fail_fini (void)
 

Variables

M0_INTERNAL struct m0_fop_type cas_get_fopt
 
M0_INTERNAL struct m0_fop_type cas_put_fopt
 
M0_INTERNAL struct m0_fop_type cas_del_fopt
 
M0_INTERNAL struct m0_fop_type cas_cur_fopt
 
M0_INTERNAL struct m0_fop_type cas_rep_fopt
 
M0_INTERNAL struct m0_fop_type cas_gc_fopt
 
struct m0_fop_type m0_fop_fsync_cas_fopt
 
M0_INTERNAL const struct m0_fid m0_cas_meta_fid = M0_FID_TINIT('i', 0, 0)
 
M0_INTERNAL const struct m0_fid m0_cas_ctidx_fid = M0_FID_TINIT('i', 0, 1)
 
M0_INTERNAL const struct m0_fid m0_cas_dead_index_fid = M0_FID_TINIT('i', 0, 2)
 
M0_INTERNAL const struct m0_fid_type m0_cas_index_fid_type
 
M0_INTERNAL const struct m0_fid_type m0_cctg_fid_type
 
M0_INTERNAL const struct m0_fid_type m0_dix_fid_type
 
const struct m0_tl_descr ndoms_descr
 
static char * cas_startup_cmd []
 
static const char * cdbnames [] = { "cas1" }
 
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 casc_ut_cctx
 
static struct m0_rpc_server_ctx casc_ut_sctx
 
struct m0_ut_suite cas_client_ut
 
static struct m0_reqh reqh
 
static struct m0_be_ut_backend be
 
static struct m0_be_segseg0
 
static struct m0_reqh_servicecas
 
static struct m0_reqh_servicefdmi
 
static struct m0_rpc_machine rpc_machine
 
static struct m0_cas_rep rep
 
static struct m0_cas_rec repv [N]
 
static struct m0_fid ifid = IFID(2, 3)
 
static bool mt
 
void(* cas__ut_cb_done )(struct m0_fom *fom)
 
void(* cas__ut_cb_fini )(struct m0_fom *fom)
 
static struct m0_fop_typeft []
 
static struct m0_thread t [8]
 
struct m0_ut_suite cas_service_ut
 

Detailed Description

Macro Definition Documentation

◆ BC

#define BC (   x)    m0_byteorder_be64_to_cpu(x)

Definition at line 1099 of file service_ut.c.

◆ CB

#define CB (   x)    m0_byteorder_cpu_to_be64(x)

Definition at line 1098 of file service_ut.c.

◆ IFID [1/2]

#define IFID (   x,
 
)    M0_FID_TINIT('i', (x), (y))

Definition at line 44 of file client_ut.c.

◆ IFID [2/2]

#define IFID (   x,
 
)    M0_FID_TINIT('i', (x), (y))

Definition at line 48 of file service_ut.c.

◆ M0_BUFVEC_SLICE

#define M0_BUFVEC_SLICE (   __bufvec,
  __idx 
)
Value:
M0_BUFVEC_INIT_BUF((__bufvec)->ov_buf + (__idx), \
(__bufvec)->ov_vec.v_count + (__idx))
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
Definition: vec.h:165

Definition at line 1702 of file client_ut.c.

◆ M0_TRACE_SUBSYSTEM [1/2]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CAS

Definition at line 29 of file client_ut.c.

◆ M0_TRACE_SUBSYSTEM [2/2]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CAS

Definition at line 30 of file service_ut.c.

◆ SERVER_LOG_FILE_NAME

#define SERVER_LOG_FILE_NAME   "cas_server.log"

Definition at line 43 of file client_ut.c.

◆ TFID

#define TFID (   x,
 
)    M0_FID_TINIT('T', (x), (y))

Definition at line 49 of file service_ut.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
COUNT 
Todo:
Greater number of indices produces -E2BIG error in idx-deleteN test case.
COUNT_TREE 
COUNT_VAL_BYTES 
COUNT_META_ENTRIES 

Definition at line 48 of file client_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
MAX_RPCS_IN_FLIGHT 

Definition at line 81 of file client_ut.c.

◆ anonymous enum

anonymous enum
Enumerator

Definition at line 51 of file service_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
BSET 
BUNSET 
BANY 

Definition at line 412 of file service_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
EMPTYVAL 

Record value in request is empty (has 0 bytes length). It is a valid value that is acceptable by CAS service.

NOVAL 

AT buffer with record value in request is unset (has M0_RPC_AT_EMPTY type).

Definition at line 418 of file service_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
INSERTS 
MULTI_INS 

Definition at line 1093 of file service_ut.c.

◆ anonymous enum

anonymous enum
Enumerator
BIG_ROWS_NUMBER 
SMALL_ROWS_NUMBER 

Definition at line 1844 of file service_ut.c.

◆ idx_operation

Enumerator
IDX_CREATE 
IDX_DELETE 

Definition at line 59 of file client_ut.c.

◆ named_op

enum named_op
Enumerator
NOP 
PUT 
DEL 

Definition at line 3640 of file client_ut.c.

◆ named_outcome

Enumerator
TOMBSTONE 
PRESERVED 
OVERWRITTEN 

Definition at line 3631 of file client_ut.c.

◆ named_version

Enumerator
PAST 
FUTURE 

Definition at line 3626 of file client_ut.c.

Function Documentation

◆ _init()

static void _init ( bool  mkfs,
bool  use_small_credits 
)
static

Definition at line 137 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ at_inline_fill()

static int at_inline_fill ( struct m0_rpc_at_buf dst,
struct m0_rpc_at_buf src 
)
static

Definition at line 107 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufvec_cmp()

static int bufvec_cmp ( const struct m0_bufvec left,
const struct m0_bufvec right 
)
static

Definition at line 118 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufvec_empty_alloc()

static int bufvec_empty_alloc ( struct m0_bufvec bufvec,
uint32_t  num_segs 
)
static

Definition at line 105 of file client_ut.c.

Here is the caller graph for this function:

◆ cas_client_fini()

static void cas_client_fini ( struct cl_ctx cctx)
static

Definition at line 203 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cas_client_init()

static int cas_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

Definition at line 173 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cas_fops_fini()

static void cas_fops_fini ( void  )
static

Definition at line 125 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cas_fops_init()

static int cas_fops_init ( const struct m0_sm_conf sm_conf,
const struct m0_fom_type_ops fom_ops,
const struct m0_reqh_service_type svctype 
)
static

Definition at line 55 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cas_in_ut()

M0_INTERNAL bool cas_in_ut ( void  )

Definition at line 220 of file cas.c.

Here is the caller graph for this function:

◆ cas_ver_op_execute()

static void cas_ver_op_execute ( const struct cas_ver_op cvop,
struct m0_cas_id index 
)
static

Definition at line 3661 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ casc_chan_cb()

static bool casc_chan_cb ( struct m0_clink clink)
static

Definition at line 236 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ casc_ut_fini()

static void casc_ut_fini ( struct m0_rpc_server_ctx sctx,
struct cl_ctx cctx 
)
static

Definition at line 228 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ casc_ut_init()

static void casc_ut_init ( struct m0_rpc_server_ctx sctx,
struct cl_ctx cctx 
)
static

Definition at line 213 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_done()

static void cb_done ( struct m0_fom fom)
static

Definition at line 345 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cb_fini()

static void cb_fini ( struct m0_fom fom)
static

Definition at line 380 of file service_ut.c.

Here is the caller graph for this function:

◆ cctg_create()

static void cctg_create ( void  )
static

Test component catalogue creation.

Definition at line 557 of file service_ut.c.

Here is the call graph for this function:

◆ cctg_create_delete()

static void cctg_create_delete ( void  )
static

Test component catalogue creation and deletion.

Definition at line 617 of file service_ut.c.

Here is the call graph for this function:

◆ cctg_create_lookup()

static void cctg_create_lookup ( void  )
static

Test component catalogue creation and lookup.

Definition at line 589 of file service_ut.c.

Here is the call graph for this function:

◆ cid_enc()

static int cid_enc ( struct m0_cas_id cid,
struct m0_rpc_at_buf at_buf 
)
static

Definition at line 75 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

static void create ( void  )
static

Test index creation.

Definition at line 546 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_create()

static void create_create ( void  )
static

Test index creation of the same index again.

Definition at line 670 of file service_ut.c.

Here is the call graph for this function:

◆ create_delete()

static void create_delete ( void  )
static

Test index deletion.

Definition at line 685 of file service_ut.c.

Here is the call graph for this function:

◆ create_insert_drop()

static void create_insert_drop ( )
static

Definition at line 1936 of file service_ut.c.

Here is the call graph for this function:

◆ create_insert_drop_fail()

static void create_insert_drop_fail ( )
static

Definition at line 1941 of file service_ut.c.

Here is the call graph for this function:

◆ create_insert_drop_with_fail()

static void create_insert_drop_with_fail ( bool  inject_fail)
static

Test for index drop GC.

To test dididing tree clear by transactions run: sudo ./utils/m0run m0ut – -t cas-service:create-insert-drop -c

Definition at line 1864 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_lookup()

static void create_lookup ( void  )
static

Test index creation and index lookup.

Definition at line 657 of file service_ut.c.

Here is the call graph for this function:

◆ cur_fail()

static void cur_fail ( void  )
static

Definition at line 1442 of file service_ut.c.

Here is the call graph for this function:

◆ cur_N()

static void cur_N ( void  )
static

Test iteration over multiple values (with restart).

Definition at line 1178 of file service_ut.c.

Here is the call graph for this function:

◆ del()

static void del ( void  )
static

Definition at line 3157 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ del_bulk()

static void del_bulk ( void  )
static

Definition at line 3179 of file client_ut.c.

Here is the call graph for this function:

◆ del_common()

static void del_common ( struct m0_bufvec keys,
struct m0_bufvec values,
uint64_t  version,
uint64_t  put_flags,
uint64_t  del_flags,
uint64_t  get_flags 
)
static

Definition at line 3027 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ del_fail()

static void del_fail ( void  )
static

Definition at line 3194 of file client_ut.c.

Here is the call graph for this function:

◆ del_get_verified()

static void del_get_verified ( struct m0_cas_id index,
struct m0_bufvec keys,
uint64_t  version,
uint64_t  del_flags,
uint64_t  get_flags 
)
static

Definition at line 1670 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ del_n()

static void del_n ( void  )
static

Definition at line 3242 of file client_ut.c.

Here is the call graph for this function:

◆ del_ver()

static void del_ver ( void  )
static

Definition at line 3052 of file client_ut.c.

Here is the call graph for this function:

◆ delete_2()

static void delete_2 ( void  )
static

Test delete of a non-existing key

Definition at line 1083 of file service_ut.c.

Here is the call graph for this function:

◆ delete_fail()

static void delete_fail ( void  )
static

Definition at line 1371 of file service_ut.c.

Here is the call graph for this function:

◆ empty_value()

static void empty_value ( void  )
static

Test insert, lookup, delete of the record with NULL value.

Definition at line 1040 of file service_ut.c.

Here is the call graph for this function:

◆ fini()

static void fini ( void  )
static

Definition at line 183 of file service_ut.c.

Here is the call graph for this function:

◆ fop_release()

static void fop_release ( struct m0_ref ref)
static

Definition at line 336 of file service_ut.c.

Here is the caller graph for this function:

◆ fop_submit()

static void fop_submit ( struct m0_fop_type ft,
const struct m0_fid index,
struct m0_cas_rec rec 
)
static
Note
There is no need to finalise the locally allocated fop: rpc was never used, so there are no resources to free.

Definition at line 384 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

static void get ( void  )
static

Definition at line 3392 of file client_ut.c.

Here is the call graph for this function:

◆ get_bulk()

static void get_bulk ( void  )
static

Definition at line 3414 of file client_ut.c.

Here is the call graph for this function:

◆ get_common()

static void get_common ( struct m0_bufvec keys,
struct m0_bufvec values 
)
static

Definition at line 3358 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_fail()

static void get_fail ( void  )
static

Definition at line 3468 of file client_ut.c.

Here is the call graph for this function:

◆ get_reply2bufvec()

static int get_reply2bufvec ( struct m0_cas_get_reply get_rep,
m0_bcount_t  nr,
struct m0_bufvec out 
)
static

Definition at line 1339 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ver_exposed()

static void get_ver_exposed ( void  )
static

Definition at line 3082 of file client_ut.c.

Here is the call graph for this function:

◆ has_tombstones()

static bool has_tombstones ( struct m0_cas_id index,
const struct m0_bufvec keys 
)
static

Definition at line 1443 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_values()

static bool has_values ( struct m0_cas_id index,
const struct m0_bufvec keys,
const struct m0_bufvec expected_values,
uint64_t  flags 
)
static

Definition at line 1361 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_versions()

static bool has_versions ( struct m0_cas_id index,
const struct m0_bufvec keys,
uint64_t  version,
uint64_t  flags 
)
static

Definition at line 1417 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ idx_create()

static void idx_create ( void  )
static

Definition at line 752 of file client_ut.c.

Here is the call graph for this function:

◆ idx_create_a()

static void idx_create_a ( void  )
static

Definition at line 804 of file client_ut.c.

Here is the call graph for this function:

◆ idx_create_fail()

static void idx_create_fail ( void  )
static

Definition at line 774 of file client_ut.c.

Here is the call graph for this function:

◆ idx_create_n()

static void idx_create_n ( void  )
static

Definition at line 819 of file client_ut.c.

Here is the call graph for this function:

◆ idx_delete()

static void idx_delete ( void  )
static

Definition at line 840 of file client_ut.c.

Here is the call graph for this function:

◆ idx_delete_fail()

static void idx_delete_fail ( void  )
static

Definition at line 859 of file client_ut.c.

Here is the call graph for this function:

◆ idx_delete_n()

static void idx_delete_n ( void  )
static

Definition at line 907 of file client_ut.c.

Here is the call graph for this function:

◆ idx_delete_non_exist()

static void idx_delete_non_exist ( void  )
static

Definition at line 886 of file client_ut.c.

Here is the call graph for this function:

◆ idx_list()

static void idx_list ( void  )
static

Get list of indices from the end. Should contain two records: the last index and -ENOENT record.

Definition at line 1108 of file client_ut.c.

Here is the call graph for this function:

◆ idx_list_fail()

static void idx_list_fail ( void  )
static

Definition at line 1180 of file client_ut.c.

Here is the call graph for this function:

◆ idx_tree_delete()

static void idx_tree_delete ( void  )
static

Definition at line 990 of file client_ut.c.

Here is the call graph for this function:

◆ idx_tree_delete_fail()

static void idx_tree_delete_fail ( void  )
static

Definition at line 1043 of file client_ut.c.

Here is the call graph for this function:

◆ idx_tree_insert()

static void idx_tree_insert ( void  )
static

Definition at line 935 of file client_ut.c.

Here is the call graph for this function:

◆ index_op()

static void index_op ( struct m0_fop_type ft,
struct m0_fid index,
uint64_t  key,
uint64_t  val 
)
static

Definition at line 961 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ index_op_rc()

static void index_op_rc ( struct m0_fop_type ft,
struct m0_fid index,
uint64_t  key,
uint64_t  val,
uint64_t  rc 
)
static

Definition at line 942 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

static void init ( void  )
static

Definition at line 164 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_cgc_fail_fini()

static void init_cgc_fail_fini ( void  )
static

Definition at line 1946 of file service_ut.c.

Here is the call graph for this function:

◆ init_fail()

static void init_fail ( void  )
static

Different fails during service startup.

Definition at line 211 of file service_ut.c.

Here is the call graph for this function:

◆ init_fini()

static void init_fini ( void  )
static

"init-fini" test: initialise and finalise a cas service.

Definition at line 202 of file service_ut.c.

Here is the call graph for this function:

◆ insert()

static void insert ( void  )
static

Test insertion (in a non-meta index).

Definition at line 970 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert_2()

static void insert_2 ( void  )
static

Test insert of an existing key

Definition at line 1066 of file service_ut.c.

Here is the call graph for this function:

◆ insert_delete()

static void insert_delete ( void  )
static

Test insert+delete.

Definition at line 1008 of file service_ut.c.

Here is the call graph for this function:

◆ insert_fail()

static void insert_fail ( void  )
static

Definition at line 1317 of file service_ut.c.

Here is the call graph for this function:

◆ insert_lookup()

static void insert_lookup ( void  )
static

Test insert+lookup.

Definition at line 985 of file service_ut.c.

Here is the call graph for this function:

◆ insert_odd()

static void insert_odd ( struct m0_fid index)
static

Definition at line 1101 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup_all()

static void lookup_all ( struct m0_fid index)
static

Definition at line 1114 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup_fail()

static void lookup_fail ( void  )
static

Definition at line 1341 of file service_ut.c.

Here is the call graph for this function:

◆ lookup_N()

static void lookup_N ( void  )
static

Test lookup of multiple values.

Definition at line 1135 of file service_ut.c.

Here is the call graph for this function:

◆ lookup_none()

static void lookup_none ( void  )
static

Test lookup of a non-existing key

Definition at line 1026 of file service_ut.c.

Here is the call graph for this function:

◆ lookup_restart()

static void lookup_restart ( void  )
static

Test lookup after restart.

Definition at line 1147 of file service_ut.c.

Here is the call graph for this function:

◆ M0_BASSERT()

M0_BASSERT ( COUNT 2 = =0)

◆ m0_cas_id_fini()

M0_INTERNAL void m0_cas_id_fini ( struct m0_cas_id cid)

Definition at line 198 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cas_id_invariant()

M0_INTERNAL bool m0_cas_id_invariant ( const struct m0_cas_id cid)

Definition at line 207 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cas_module_fini()

M0_INTERNAL void m0_cas_module_fini ( void  )

Definition at line 188 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cas_module_init()

M0_INTERNAL int m0_cas_module_init ( void  )

Test CAS module re-initialisation.

Definition at line 173 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_crv_cmp()

M0_INTERNAL int m0_crv_cmp ( const struct m0_crv left,
const struct m0_crv right 
)

Compare two versions. Note, tombstones are checked at the end which means that if there are two different operations with the same version (for example, PUT@10 and DEL@10) then the operation that sets the tombstone (DEL@10) is always considered to be "newer" than the other one. It helps to ensure operations have the same order on any server despite the order of execution.

Definition at line 275 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_crv_init()

M0_INTERNAL void m0_crv_init ( struct m0_crv crv,
const struct m0_dtm0_ts ts,
bool  tbs 
)

Definition at line 251 of file cas.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_crv_is_none()

M0_INTERNAL bool m0_crv_is_none ( const struct m0_crv crv)

Definition at line 282 of file cas.c.

Here is the caller graph for this function:

◆ m0_crv_tbs()

M0_INTERNAL bool m0_crv_tbs ( const struct m0_crv crv)

Definition at line 225 of file cas.c.

Here is the caller graph for this function:

◆ m0_crv_tbs_set()

M0_INTERNAL void m0_crv_tbs_set ( struct m0_crv crv,
bool  tbs 
)

Definition at line 230 of file cas.c.

Here is the caller graph for this function:

◆ m0_crv_ts()

M0_INTERNAL struct m0_dtm0_ts m0_crv_ts ( const struct m0_crv crv)

Definition at line 238 of file cas.c.

Here is the caller graph for this function:

◆ m0_crv_ts_set()

M0_INTERNAL void m0_crv_ts_set ( struct m0_crv crv,
const struct m0_dtm0_ts ts 
)

Definition at line 245 of file cas.c.

Here is the caller graph for this function:

◆ meta_cid_submit()

static void meta_cid_submit ( struct m0_fop_type fopt,
struct m0_cas_id cid 
)
static

Definition at line 467 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_cur_0()

static void meta_cur_0 ( void  )
static

Test meta-cursor empty iteration.

Definition at line 762 of file service_ut.c.

Here is the call graph for this function:

◆ meta_cur_1()

static void meta_cur_1 ( void  )
static

Test that meta-cursor returns an existing index.

Definition at line 719 of file service_ut.c.

Here is the call graph for this function:

◆ meta_cur_all()

static void meta_cur_all ( void  )
static

Test meta-cursor starting from meta-index.

Definition at line 822 of file service_ut.c.

Here is the call graph for this function:

◆ meta_cur_empty()

static void meta_cur_empty ( void  )
static

Test meta-cursor on empty meta-index.

Definition at line 781 of file service_ut.c.

Here is the call graph for this function:

◆ meta_cur_eot()

static void meta_cur_eot ( void  )
static

Test that meta-cursor detects end of the tree.

Definition at line 740 of file service_ut.c.

Here is the call graph for this function:

◆ meta_cur_none()

static void meta_cur_none ( void  )
static

Test meta-cursor with non-existent starting point.

Definition at line 799 of file service_ut.c.

Here is the call graph for this function:

◆ meta_delete_fail()

static void meta_delete_fail ( void  )
static

Definition at line 1302 of file service_ut.c.

Here is the call graph for this function:

◆ meta_fid_submit()

static void meta_fid_submit ( struct m0_fop_type fopt,
struct m0_fid fid 
)
static

Definition at line 485 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_fop_submit()

static void meta_fop_submit ( struct m0_fop_type fopt,
struct meta_rec meta_recs,
int  meta_recs_num 
)
static

Definition at line 432 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_insert_fail()

static void meta_insert_fail ( void  )
static

Definition at line 1271 of file service_ut.c.

Here is the call graph for this function:

◆ meta_invalid()

static void meta_invalid ( void  )
static

Test invalid meta-operations.

Definition at line 912 of file service_ut.c.

Here is the call graph for this function:

◆ meta_lookup_2none()

static void meta_lookup_2none ( void  )
static

Test meta-lookup of 2 non-existent indices.

Definition at line 506 of file service_ut.c.

Here is the call graph for this function:

◆ meta_lookup_fail()

static void meta_lookup_fail ( void  )
static

Definition at line 1285 of file service_ut.c.

Here is the call graph for this function:

◆ meta_lookup_Nnone()

static void meta_lookup_Nnone ( void  )
static

Test meta-lookup of multiple non-existent indices.

Definition at line 527 of file service_ut.c.

Here is the call graph for this function:

◆ meta_lookup_none()

static void meta_lookup_none ( void  )
static

Test meta-lookup of a non-existent index.

Definition at line 495 of file service_ut.c.

Here is the call graph for this function:

◆ meta_mt()

static void meta_mt ( void  )
static

Test multi-threaded meta-operations.

Definition at line 1251 of file service_ut.c.

Here is the call graph for this function:

◆ meta_mt_thread()

static void meta_mt_thread ( int  idx)
static

Definition at line 1232 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_random()

static void meta_random ( void  )
static

Test random meta-operations.

Definition at line 866 of file service_ut.c.

Here is the call graph for this function:

◆ multi_create_drop()

static void multi_create_drop ( void  )
static

Definition at line 1787 of file service_ut.c.

Here is the call graph for this function:

◆ multi_delete()

static void multi_delete ( void  )
static

Definition at line 1581 of file service_ut.c.

Here is the call graph for this function:

◆ multi_delete_fail()

static void multi_delete_fail ( void  )
static

Definition at line 1676 of file service_ut.c.

Here is the call graph for this function:

◆ multi_insert()

static void multi_insert ( void  )
static

Definition at line 1531 of file service_ut.c.

Here is the call graph for this function:

◆ multi_insert_fail()

static void multi_insert_fail ( void  )
static

Definition at line 1616 of file service_ut.c.

Here is the call graph for this function:

◆ multi_lookup()

static void multi_lookup ( void  )
static

Definition at line 1552 of file service_ut.c.

Here is the call graph for this function:

◆ multi_lookup_fail()

static void multi_lookup_fail ( void  )
static

Definition at line 1641 of file service_ut.c.

Here is the call graph for this function:

◆ multi_values_delete()

static void multi_values_delete ( struct record recs,
int  recs_count 
)
static

Definition at line 1508 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_values_insert()

static void multi_values_insert ( struct record recs,
int  recs_count 
)
static

Definition at line 1418 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_values_lookup()

static void multi_values_lookup ( struct record recs,
int  recs_count 
)
static

Definition at line 1485 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next()

static void next ( void  )
static

Definition at line 1977 of file client_ut.c.

Here is the call graph for this function:

◆ next_bulk()

static void next_bulk ( void  )
static

Definition at line 2054 of file client_ut.c.

Here is the call graph for this function:

◆ next_common()

static void next_common ( struct m0_bufvec keys,
struct m0_bufvec values,
uint32_t  flags 
)
static

Definition at line 1225 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_fail()

static void next_fail ( void  )
static

Definition at line 2101 of file client_ut.c.

Here is the call graph for this function:

◆ next_keys_verified()

static void next_keys_verified ( struct m0_cas_id index,
struct m0_bufvec start_key,
uint32_t  requested_keys_nr,
struct m0_bufvec expected_keys,
int  flags 
)
static

Definition at line 1593 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_multi()

static void next_multi ( void  )
static

Definition at line 2215 of file client_ut.c.

Here is the call graph for this function:

◆ next_multi_bulk()

static void next_multi_bulk ( void  )
static

Definition at line 2237 of file client_ut.c.

Here is the call graph for this function:

◆ next_multi_common()

static void next_multi_common ( struct m0_bufvec keys,
struct m0_bufvec values 
)
static

Definition at line 2158 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_records_verified()

static void next_records_verified ( struct m0_cas_id index,
struct m0_bufvec start_key,
uint32_t  requested_keys_nr,
struct m0_bufvec expected_keys,
struct m0_bufvec expected_values,
struct m0_crv expected_versions,
int  flags 
)
static

Definition at line 1534 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_rep_equals()

static bool next_rep_equals ( const struct m0_cas_next_reply rep,
void *  key,
void *  val 
)
static

Definition at line 1217 of file client_ut.c.

Here is the caller graph for this function:

◆ next_reply_breakdown()

static void next_reply_breakdown ( struct m0_cas_next_reply next_rep,
m0_bcount_t  nr,
struct m0_bufvec out_key,
struct m0_bufvec out_val,
struct m0_crv **  out_ver 
)
static

Definition at line 1499 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_ver()

static void next_ver ( void  )
static

Definition at line 1710 of file client_ut.c.

Here is the call graph for this function:

◆ next_ver_exposed()

static void next_ver_exposed ( void  )
static

Definition at line 1864 of file client_ut.c.

Here is the call graph for this function:

◆ null_value()

static void null_value ( void  )
static

Definition at line 3293 of file client_ut.c.

Here is the call graph for this function:

◆ outcome()

static enum named_outcome outcome ( const struct put_del_ver_case c)
static

Definition at line 3746 of file client_ut.c.

Here is the caller graph for this function:

◆ put()

static void put ( void  )
static

Definition at line 2450 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_bulk()

static void put_bulk ( void  )
static

Definition at line 2681 of file client_ut.c.

Here is the call graph for this function:

◆ put_bulk_fail()

static void put_bulk_fail ( void  )
static

Definition at line 2962 of file client_ut.c.

Here is the call graph for this function:

◆ put_common()

static void put_common ( struct m0_bufvec keys,
struct m0_bufvec values 
)
static

Definition at line 2308 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_common_with_ver()

static void put_common_with_ver ( struct m0_bufvec keys,
struct m0_bufvec values,
uint64_t  version 
)
static

Definition at line 2284 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_create()

static void put_create ( void  )
static

Definition at line 2815 of file client_ut.c.

Here is the call graph for this function:

◆ put_crow()

static void put_crow ( void  )
static

Definition at line 2831 of file client_ut.c.

Here is the call graph for this function:

◆ put_crow_fail()

static void put_crow_fail ( void  )
static

Definition at line 2877 of file client_ut.c.

Here is the call graph for this function:

◆ put_del_ver()

static void put_del_ver ( void  )
static

Definition at line 3816 of file client_ut.c.

Here is the call graph for this function:

◆ put_del_ver_case_execute()

static void put_del_ver_case_execute ( const struct put_del_ver_case c,
struct m0_cas_id index 
)
static

Definition at line 3680 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_del_ver_case_verify()

static void put_del_ver_case_verify ( const struct put_del_ver_case c,
struct m0_cas_id index 
)
static

Definition at line 3768 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_fail()

static void put_fail ( void  )
static

Definition at line 2942 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_fail_common()

static void put_fail_common ( struct m0_bufvec keys,
struct m0_bufvec values 
)
static

Definition at line 2918 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_get_verified()

static void put_get_verified ( struct m0_cas_id index,
struct m0_bufvec keys,
struct m0_bufvec values,
struct m0_bufvec expected_values,
uint64_t  version,
int  put_flags,
int  get_flags 
)
static

Definition at line 1652 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_overwrite()

static void put_overwrite ( void  )
static

Definition at line 2823 of file client_ut.c.

Here is the call graph for this function:

◆ put_overwrite_ver()

static void put_overwrite_ver ( void  )
static

Definition at line 2319 of file client_ut.c.

Here is the call graph for this function:

◆ put_save_common()

static void put_save_common ( uint32_t  flags)
static

Definition at line 2739 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_ver()

static void put_ver ( void  )
static

Definition at line 2423 of file client_ut.c.

Here is the call graph for this function:

◆ rec_check()

static bool rec_check ( const struct m0_cas_rec rec,
int  rc,
int  key,
int  val 
)
static

Definition at line 455 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recreate()

static void recreate ( void  )
static

Test index deletion and re-creation.

Definition at line 700 of file service_ut.c.

Here is the call graph for this function:

◆ recs_count()

static void recs_count ( void  )
static

Definition at line 3512 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recs_fragm()

static void recs_fragm ( void  )
static

Definition at line 2475 of file client_ut.c.

Here is the call graph for this function:

◆ recs_fragm_fail()

static void recs_fragm_fail ( void  )
static

Definition at line 2614 of file client_ut.c.

Here is the call graph for this function:

◆ reinit()

static void reinit ( void  )
static

Definition at line 298 of file service_ut.c.

Here is the call graph for this function:

◆ reinit_nomkfs()

static void reinit_nomkfs ( void  )
static

Definition at line 193 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rep_check()

static bool rep_check ( int  recno,
uint64_t  rc,
int  key,
int  val 
)
static

Definition at line 462 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rep_clear()

static void rep_clear ( void  )
static

Definition at line 93 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reply_too_large()

static void reply_too_large ( void  )
static

Definition at line 3565 of file client_ut.c.

Here is the call graph for this function:

◆ reqh_init()

static void reqh_init ( bool  mkfs,
bool  use_small_credits 
)
static

Definition at line 114 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restart()

static void restart ( void  )
static

Test service re-start with existing meta-index.

Definition at line 312 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ server_restart_nomkfs()

static void server_restart_nomkfs ( void  )
static

Tests different operations after server re-start. Server restart is emulated by re-initialisation of request handler along with BE subsystem. No mkfs is performed for BE, so on-disk data between restarts is not modified.

Definition at line 1725 of file service_ut.c.

Here is the call graph for this function:

◆ service_stop()

static void service_stop ( void  )
static

Definition at line 169 of file service_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ upd()

static void upd ( void  )
static

Definition at line 2974 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_dtx_fini()

static void ut_dtx_fini ( struct m0_dtx dtx)
static

Definition at line 462 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_dtx_init()

static void ut_dtx_init ( struct m0_dtx **  out,
uint64_t  version 
)
static

Definition at line 436 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_get_rep_clear()

static void ut_get_rep_clear ( struct m0_cas_get_reply rep,
uint32_t  nr 
)
static

Definition at line 551 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_crdel_wrp()

static int ut_idx_crdel_wrp ( enum idx_operation  op,
struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
m0_chan_cb_t  cb,
struct m0_cas_rec_reply rep,
uint32_t  flags 
)
static

Definition at line 250 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_create()

static int ut_idx_create ( struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
struct m0_cas_rec_reply rep 
)
static

Definition at line 327 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_create_async()

static int ut_idx_create_async ( struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
m0_chan_cb_t  cb,
struct m0_cas_rec_reply rep 
)
static

Definition at line 317 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_delete()

static int ut_idx_delete ( struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
struct m0_cas_rec_reply rep 
)
static

Definition at line 389 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_flagged_delete()

static int ut_idx_flagged_delete ( struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
struct m0_cas_rec_reply rep,
uint32_t  flags 
)
static

Definition at line 379 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_idx_list()

static int ut_idx_list ( struct cl_ctx cctx,
const struct m0_fid start_fid,
uint64_t  ids_nr,
uint64_t *  rep_count,
struct m0_cas_ilist_reply rep 
)
static

Definition at line 397 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_lookup_idx()

static int ut_lookup_idx ( struct cl_ctx cctx,
const struct m0_fid ids,
uint64_t  ids_nr,
struct m0_cas_rec_reply rep 
)
static

Definition at line 335 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_next_rec()

static int ut_next_rec ( struct cl_ctx cctx,
struct m0_cas_id index,
struct m0_bufvec start_keys,
uint32_t *  recs_nr,
struct m0_cas_next_reply rep,
uint64_t *  count,
uint32_t  flags 
)
static

Definition at line 625 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_next_rep_clear()

static void ut_next_rep_clear ( struct m0_cas_next_reply rep,
uint64_t  nr 
)
static

Definition at line 614 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec__get()

static int ut_rec__get ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
struct m0_cas_get_reply rep,
uint64_t  flags 
)
static

Definition at line 559 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_del()

static int ut_rec_common_del ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
struct m0_dtx dtx,
struct m0_cas_rec_reply rep,
uint64_t  flags 
)
static

Definition at line 673 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_del_seq()

static int ut_rec_common_del_seq ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
struct m0_dtx dtx,
struct m0_cas_rec_reply rep,
uint64_t  flags 
)
static

Definition at line 718 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_del_verified()

static void ut_rec_common_del_verified ( struct m0_cas_id index,
const struct m0_bufvec keys,
uint64_t  version,
uint64_t  flags 
)
static

Definition at line 1627 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_put()

static int ut_rec_common_put ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
const struct m0_bufvec values,
struct m0_dtx dtx,
struct m0_cas_rec_reply rep,
uint32_t  flags 
)
static

Definition at line 468 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_put_seq()

int ut_rec_common_put_seq ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
const struct m0_bufvec values,
struct m0_dtx dtx,
struct m0_cas_rec_reply rep,
uint32_t  flags 
)

Definition at line 512 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_common_put_verified()

static void ut_rec_common_put_verified ( struct m0_cas_id index,
const struct m0_bufvec keys,
const struct m0_bufvec values,
uint64_t  version,
uint64_t  flags 
)
static

Definition at line 1604 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_del()

static int ut_rec_del ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
struct m0_cas_rec_reply rep,
uint64_t  flags 
)
static

Definition at line 740 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_get()

static int ut_rec_get ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
struct m0_cas_get_reply rep 
)
static

Definition at line 606 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ut_rec_put()

static int ut_rec_put ( struct cl_ctx cctx,
struct m0_cas_id index,
const struct m0_bufvec keys,
const struct m0_bufvec values,
struct m0_cas_rec_reply rep,
uint32_t  flags 
)
static

Definition at line 539 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vals_create()

static void vals_create ( int  count,
int  size,
struct m0_bufvec vals 
)
static

Definition at line 143 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vals_mix_create()

static void vals_mix_create ( int  count,
int  large_size,
struct m0_bufvec vals 
)
static

Definition at line 155 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value_create()

static void value_create ( int  size,
int  num,
char *  buf 
)
static

Definition at line 129 of file client_ut.c.

Here is the caller graph for this function:

◆ verify_version_properties()

static void verify_version_properties ( struct m0_cas_id index,
const struct m0_bufvec keys,
uint64_t  version 
)
static

Definition at line 3699 of file client_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ be

struct m0_be_ut_backend be
static

Definition at line 59 of file service_ut.c.

◆ cas

struct m0_reqh_service* cas
static

Definition at line 61 of file service_ut.c.

◆ cas__ut_cb_done

void(* cas__ut_cb_done) (struct m0_fom *fom)

Definition at line 1712 of file service.c.

◆ cas__ut_cb_fini

void(* cas__ut_cb_fini) (struct m0_fom *fom)

Definition at line 1713 of file service.c.

◆ cas_client_ut

struct m0_ut_suite cas_client_ut

Definition at line 3893 of file client_ut.c.

◆ cas_cur_fopt

M0_INTERNAL struct m0_fop_type cas_cur_fopt

Definition at line 50 of file cas.c.

◆ cas_del_fopt

M0_INTERNAL struct m0_fop_type cas_del_fopt

Definition at line 49 of file cas.c.

◆ cas_gc_fopt

M0_INTERNAL struct m0_fop_type cas_gc_fopt

Definition at line 52 of file cas.c.

◆ cas_get_fopt

M0_INTERNAL struct m0_fop_type cas_get_fopt

Definition at line 47 of file cas.c.

◆ cas_put_fopt

M0_INTERNAL struct m0_fop_type cas_put_fopt

Definition at line 48 of file cas.c.

◆ cas_rep_fopt

M0_INTERNAL struct m0_fop_type cas_rep_fopt

Definition at line 51 of file cas.c.

◆ cas_service_ut

struct m0_ut_suite cas_service_ut

Definition at line 1959 of file service_ut.c.

◆ cas_startup_cmd

char* cas_startup_cmd[]
static
Initial value:
= {
"m0d", "-T", "linux",
"-D", "cs_sdb", "-S", "cs_stob",
"-A", "linuxstob:cs_addb_stob",
"-e", M0_NET_XPRT_PREFIX_DEFAULT":0@lo:12345:34:1",
"-H", "0@lo:12345:34:1",
"-w", "10", "-F",
"-c", M0_SRC_PATH("cas/ut/conf.xc")
}
#define M0_SRC_PATH(name)
Definition: misc.h:48
#define M0_NET_XPRT_PREFIX_DEFAULT
Definition: net.h:98
#define M0_UT_CONF_PROCESS
Definition: misc.h:45

Definition at line 83 of file client_ut.c.

◆ casc_ut_cctx

struct cl_ctx casc_ut_cctx
static

Definition at line 98 of file client_ut.c.

◆ casc_ut_sctx

struct m0_rpc_server_ctx casc_ut_sctx
static
Initial value:
= {
.rsx_argv = cas_startup_cmd,
.rsx_log_file_name = SERVER_LOG_FILE_NAME
}
static char * cas_startup_cmd[]
Definition: client_ut.c:83
#define SERVER_LOG_FILE_NAME
Definition: client_ut.c:43
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 99 of file client_ut.c.

◆ cdbnames

const char* cdbnames[] = { "cas1" }
static

Definition at line 94 of file client_ut.c.

◆ cl_ep_addrs

const char* cl_ep_addrs[] = { "0@lo:12345:34:2" }
static

Definition at line 95 of file client_ut.c.

◆ fdmi

struct m0_reqh_service* fdmi
static

Definition at line 62 of file service_ut.c.

◆ ft

struct m0_fop_type* ft[]
static
Initial value:
= {
}
M0_INTERNAL struct m0_fop_type cas_get_fopt
Definition: cas.c:47
M0_INTERNAL struct m0_fop_type cas_cur_fopt
Definition: cas.c:50
M0_INTERNAL struct m0_fop_type cas_del_fopt
Definition: cas.c:49
M0_INTERNAL struct m0_fop_type cas_put_fopt
Definition: cas.c:48

Definition at line 856 of file service_ut.c.

◆ ifid

struct m0_fid ifid = IFID(2, 3)
static

Definition at line 66 of file service_ut.c.

◆ m0_cas_ctidx_fid

M0_INTERNAL const struct m0_fid m0_cas_ctidx_fid = M0_FID_TINIT('i', 0, 1)

FID of the catalogue-index index.

Definition at line 151 of file cas.c.

◆ m0_cas_dead_index_fid

M0_INTERNAL const struct m0_fid m0_cas_dead_index_fid = M0_FID_TINIT('i', 0, 2)

FID of the "dead index" catalogue (used to collect deleted indices).

Definition at line 156 of file cas.c.

◆ m0_cas_index_fid_type

M0_INTERNAL const struct m0_fid_type m0_cas_index_fid_type
Initial value:
= {
.ft_id = 'i',
.ft_name = "cas-index"
}

Definition at line 158 of file cas.c.

◆ m0_cas_meta_fid

M0_INTERNAL const struct m0_fid m0_cas_meta_fid = M0_FID_TINIT('i', 0, 0)

FID of the meta-index. It has the smallest possible FID in order to be always the first during iteration over existing indices.

Definition at line 146 of file cas.c.

◆ m0_cctg_fid_type

M0_INTERNAL const struct m0_fid_type m0_cctg_fid_type
Initial value:
= {
.ft_id = 'T',
.ft_name = "component-catalogue"
}

Definition at line 163 of file cas.c.

◆ m0_dix_fid_type

M0_INTERNAL const struct m0_fid_type m0_dix_fid_type
Initial value:
= {
.ft_id = 'x',
.ft_name = "distributed-index"
}

Definition at line 168 of file cas.c.

◆ m0_fop_fsync_cas_fopt

struct m0_fop_type m0_fop_fsync_cas_fopt

Definition at line 53 of file cas.c.

◆ mt

bool mt
static

Definition at line 67 of file service_ut.c.

◆ ndoms_descr

const struct m0_tl_descr ndoms_descr

◆ rep

struct m0_cas_rep rep
static

Definition at line 64 of file service_ut.c.

◆ repv

struct m0_cas_rec repv[N]
static

Definition at line 65 of file service_ut.c.

◆ reqh

struct m0_reqh reqh
static

Definition at line 58 of file service_ut.c.

◆ rpc_machine

struct m0_rpc_machine rpc_machine
static

Definition at line 63 of file service_ut.c.

◆ seg0

struct m0_be_seg* seg0
static

Definition at line 60 of file service_ut.c.

◆ srv_ep_addrs

const char* srv_ep_addrs[] = { "0@lo:12345:34:1" }
static

Definition at line 96 of file client_ut.c.

◆ t

struct m0_thread t[8]
static

Definition at line 1230 of file service_ut.c.