Motr  M0
write.c File Reference
#include "lib/trace.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 write.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 
#define write_objs(nr_objs, size, unit_size, verify)
 
#define INDEX(ivec, i)   ((ivec)->iv_index[(i)])
 
#define COUNT(ivec, i)   ((ivec)->iv_vec.v_count[(i)])
 

Enumerations

enum  { MAX_OPS = 16 }
 
enum  { SMALL_OBJ_SIZE = 1 * DEFAULT_PARGRP_DATA_SIZE, MEDIUM_OBJ_SIZE = 12 * DEFAULT_PARGRP_DATA_SIZE, LARGE_OBJ_SIZE = 120 * DEFAULT_PARGRP_DATA_SIZE }
 

Functions

static int create_obj (struct m0_uint128 *oid, int unit_size)
 
static int bufvec_cmp (struct m0_bufvec b1, struct m0_bufvec b2)
 
static int write_verify (struct m0_bufvec *data_w, struct m0_uint128 oid, int start, int stride, int unit_size, int nr_ops)
 
static int write_obj (struct m0_uint128 oid, int start, int stride, int unit_size, int nr_ops, bool verify)
 
static void write_small_objs (void)
 
static void write_medium_objs (void)
 
static void write_large_objs (void)
 
static void write_with_layout_id (void)
 
static void write_pargrps_in_parallel_ops (void)
 
static void write_pargrps_rmw (void)
 
static int write_verify_unorder (struct m0_bufvec *data_w, struct m0_uint128 oid, int start, int stride, int unit_size, int nr_ops, int nr_ent)
 
static int write_unordered_obj (struct m0_uint128 oid, int start, int stride, int unit_size, int nr_ops, int nr_ent, bool verify)
 
static void write_unorder_pargrp (void)
 
static void write_pargrps (void)
 
static int st_write_init (void)
 
static int st_write_fini (void)
 

Variables

struct m0_container st_write_container
 
struct m0_addb_ctx m0_addb_ctx
 
struct st_suite st_suite_m0_write
 

Macro Definition Documentation

◆ COUNT

#define COUNT (   ivec,
  i 
)    ((ivec)->iv_vec.v_count[(i)])

Definition at line 494 of file write.c.

◆ INDEX

#define INDEX (   ivec,
  i 
)    ((ivec)->iv_index[(i)])

Definition at line 493 of file write.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 28 of file write.c.

◆ write_objs

#define write_objs (   nr_objs,
  size,
  unit_size,
  verify 
)

Definition at line 303 of file write.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_OPS 

Definition at line 41 of file write.c.

◆ anonymous enum

anonymous enum
Enumerator
SMALL_OBJ_SIZE 
MEDIUM_OBJ_SIZE 
LARGE_OBJ_SIZE 

Definition at line 44 of file write.c.

Function Documentation

◆ bufvec_cmp()

static int bufvec_cmp ( struct m0_bufvec  b1,
struct m0_bufvec  b2 
)
static

Definition at line 83 of file write.c.

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

◆ create_obj()

static int create_obj ( struct m0_uint128 oid,
int  unit_size 
)
static

Definition at line 50 of file write.c.

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

◆ st_write_fini()

static int st_write_fini ( void  )
static

Definition at line 710 of file write.c.

◆ st_write_init()

static int st_write_init ( void  )
static

Definition at line 684 of file write.c.

Here is the call graph for this function:

◆ write_large_objs()

static void write_large_objs ( void  )
static

Definition at line 349 of file write.c.

◆ write_medium_objs()

static void write_medium_objs ( void  )
static

Definition at line 344 of file write.c.

◆ write_obj()

static int write_obj ( struct m0_uint128  oid,
int  start,
int  stride,
int  unit_size,
int  nr_ops,
bool  verify 
)
static

Definition at line 203 of file write.c.

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

◆ write_pargrps()

static void write_pargrps ( void  )
static

write a number of parity groups of data to an object then read.

Definition at line 655 of file write.c.

Here is the call graph for this function:

◆ write_pargrps_in_parallel_ops()

static void write_pargrps_in_parallel_ops ( void  )
static

Definition at line 359 of file write.c.

Here is the call graph for this function:

◆ write_pargrps_rmw()

static void write_pargrps_rmw ( void  )
static

Definition at line 386 of file write.c.

Here is the call graph for this function:

◆ write_small_objs()

static void write_small_objs ( void  )
static

Definition at line 339 of file write.c.

◆ write_unorder_pargrp()

static void write_unorder_pargrp ( void  )
static

write unordered parity group of data to an object then read and verify if the order was corrected.

Definition at line 626 of file write.c.

Here is the call graph for this function:

◆ write_unordered_obj()

static int write_unordered_obj ( struct m0_uint128  oid,
int  start,
int  stride,
int  unit_size,
int  nr_ops,
int  nr_ent,
bool  verify 
)
static

Definition at line 500 of file write.c.

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

◆ write_verify()

static int write_verify ( struct m0_bufvec data_w,
struct m0_uint128  oid,
int  start,
int  stride,
int  unit_size,
int  nr_ops 
)
static

Definition at line 122 of file write.c.

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

◆ write_verify_unorder()

static int write_verify_unorder ( struct m0_bufvec data_w,
struct m0_uint128  oid,
int  start,
int  stride,
int  unit_size,
int  nr_ops,
int  nr_ent 
)
static

Definition at line 412 of file write.c.

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

◆ write_with_layout_id()

static void write_with_layout_id ( void  )
static

Definition at line 354 of file write.c.

Variable Documentation

◆ m0_addb_ctx

struct m0_addb_ctx m0_addb_ctx

◆ st_suite_m0_write

struct st_suite st_suite_m0_write
Initial value:
= {
.ss_name = "m0_write_st",
.ss_init = st_write_init,
.ss_fini = st_write_fini,
.ss_tests = {
{ "write_unorder_pargrp", &write_unorder_pargrp},
{ "write_pargrps", &write_pargrps},
{ "write_pargrps_rmw", &write_pargrps_rmw},
{ "write_pargrps_in_parallel_ops", &write_pargrps_in_parallel_ops},
{ "write_small_objs", &write_small_objs},
{ "write_medium_objs", &write_medium_objs},
{ "write_large_objs", &write_large_objs},
{ "write_with_layout_id", &write_with_layout_id},
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static int st_write_fini(void)
Definition: write.c:710
static void write_small_objs(void)
Definition: write.c:339
static void write_unorder_pargrp(void)
Definition: write.c:626
static void write_pargrps_rmw(void)
Definition: write.c:386
static void write_large_objs(void)
Definition: write.c:349
static int st_write_init(void)
Definition: write.c:684
static void write_pargrps(void)
Definition: write.c:655
static void write_medium_objs(void)
Definition: write.c:344
static void write_pargrps_in_parallel_ops(void)
Definition: write.c:359
static void write_with_layout_id(void)
Definition: write.c:354

Definition at line 716 of file write.c.

◆ st_write_container

struct m0_container st_write_container

Definition at line 38 of file write.c.