Motr  M0
isync.c File Reference
#include "lib/trace.h"
#include "lib/finject.h"
#include "motr/client.h"
#include "motr/st/st.h"
#include "motr/st/st_misc.h"
#include "motr/st/st_assert.h"
#include "lib/memory.h"
Include dependency graph for isync.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 
#define ST_VAL_STRING   ("Client Index Test.")
 

Enumerations

enum  { ST_MAX_KEY_LEN = 64 }
 
enum  { IDX_CREATE = 0, IDX_DELETE, IDX_KV_ADD, IDX_KV_DEL }
 

Functions

static void idx_bufvec_free (struct m0_bufvec *bv)
 
static struct m0_bufvecidx_bufvec_alloc (int nr)
 
static int idx_fill_kv_pairs (struct m0_uint128 id, int start, struct m0_bufvec *keys, struct m0_bufvec *vals)
 
static int idx_add_or_del_kv_pairs (int opcode, struct m0_uint128 id, int nr_kvp, bool dont_fini_op, struct m0_op **op_out, struct m0_idx **idx_out)
 
static int idx_create_or_delete (int opcode, struct m0_uint128 id, bool dont_fini_op, struct m0_op **op_out, struct m0_idx **idx_out)
 
static void isync_error_handling (void)
 
static void isync_by_sync_op (void)
 
static void isync_on_op (void)
 
static void isync_on_idx_delete (void)
 
static void isync_on_kv_delete (void)
 
static int st_isync_init (void)
 
static int st_isync_fini (void)
 

Variables

struct m0_container st_isync_container
 
struct st_suite st_suite_isync
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 23 of file isync.c.

◆ ST_VAL_STRING

#define ST_VAL_STRING   ("Client Index Test.")

Definition at line 36 of file isync.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ST_MAX_KEY_LEN 

Definition at line 34 of file isync.c.

◆ anonymous enum

anonymous enum
Enumerator
IDX_CREATE 
IDX_DELETE 
IDX_KV_ADD 
IDX_KV_DEL 

Definition at line 38 of file isync.c.

Function Documentation

◆ idx_add_or_del_kv_pairs()

static int idx_add_or_del_kv_pairs ( int  opcode,
struct m0_uint128  id,
int  nr_kvp,
bool  dont_fini_op,
struct m0_op **  op_out,
struct m0_idx **  idx_out 
)
static

Definition at line 152 of file isync.c.

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

◆ idx_bufvec_alloc()

static struct m0_bufvec* idx_bufvec_alloc ( int  nr)
static

Definition at line 63 of file isync.c.

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

◆ idx_bufvec_free()

static void idx_bufvec_free ( struct m0_bufvec bv)
static

Definition at line 47 of file isync.c.

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

◆ idx_create_or_delete()

static int idx_create_or_delete ( int  opcode,
struct m0_uint128  id,
bool  dont_fini_op,
struct m0_op **  op_out,
struct m0_idx **  idx_out 
)
static

Definition at line 221 of file isync.c.

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

◆ idx_fill_kv_pairs()

static int idx_fill_kv_pairs ( struct m0_uint128  id,
int  start,
struct m0_bufvec keys,
struct m0_bufvec vals 
)
static

Definition at line 87 of file isync.c.

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

◆ isync_by_sync_op()

static void isync_by_sync_op ( void  )
static

Definition at line 318 of file isync.c.

Here is the call graph for this function:

◆ isync_error_handling()

static void isync_error_handling ( void  )
static

Tests for error handling for an SYNC op such as failures in launching op.

Definition at line 275 of file isync.c.

Here is the call graph for this function:

◆ isync_on_idx_delete()

static void isync_on_idx_delete ( void  )
static

Definition at line 405 of file isync.c.

Here is the call graph for this function:

◆ isync_on_kv_delete()

static void isync_on_kv_delete ( void  )
static

Definition at line 445 of file isync.c.

Here is the call graph for this function:

◆ isync_on_op()

static void isync_on_op ( void  )
static

Definition at line 361 of file isync.c.

Here is the call graph for this function:

◆ st_isync_fini()

static int st_isync_fini ( void  )
static

Definition at line 515 of file isync.c.

◆ st_isync_init()

static int st_isync_init ( void  )
static

Definition at line 495 of file isync.c.

Here is the call graph for this function:

Variable Documentation

◆ st_isync_container

struct m0_container st_isync_container

Definition at line 45 of file isync.c.

◆ st_suite_isync

struct st_suite st_suite_isync
Initial value:
= {
.ss_name = "isync_st",
.ss_init = st_isync_init,
.ss_fini = st_isync_fini,
.ss_tests = {
{ "isync_error_handling", &isync_error_handling},
{ "isync_by_sync_op", &isync_by_sync_op},
{ "isync_on_op", &isync_on_op},
{ "isync_on_idx_delete", &isync_on_idx_delete},
{ "isync_on_kv_delete", &isync_on_kv_delete},
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void isync_on_idx_delete(void)
Definition: isync.c:405
static int st_isync_init(void)
Definition: isync.c:495
static void isync_on_op(void)
Definition: isync.c:361
static void isync_error_handling(void)
Definition: isync.c:275
static void isync_by_sync_op(void)
Definition: isync.c:318
static void isync_on_kv_delete(void)
Definition: isync.c:445
static int st_isync_fini(void)
Definition: isync.c:515

Definition at line 520 of file isync.c.