Motr  M0
osync.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 osync.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Enumerations

enum  { PARGRP_UNIT_SIZE = 4096, PARGRP_DATA_UNIT_NUM = 2, PARGRP_DATA_SIZE = PARGRP_DATA_UNIT_NUM * PARGRP_UNIT_SIZE, MAX_OPS = 16 }
 
enum  { SMALL_OBJ_SIZE = 1 * PARGRP_DATA_UNIT_NUM, MEDIUM_OBJ_SIZE = 100 * PARGRP_DATA_UNIT_NUM, LARGE_OBJ_SIZE = 2000 * PARGRP_DATA_UNIT_NUM }
 

Functions

static int create_obj (struct m0_uint128 *oid)
 
static int write_obj (struct m0_obj *obj, int start, int stride, int nr_ops)
 
static void osync_after_each_write (void)
 
static void osync_after_writes (void)
 
static void osync_by_sync_op (void)
 
static void osync_on_op (void)
 
static int st_osync_init (void)
 
static int st_osync_fini (void)
 

Variables

struct m0_container st_osync_container
 
static uint64_t layout_id
 
struct st_suite st_suite_osync
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 28 of file osync.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PARGRP_UNIT_SIZE 
PARGRP_DATA_UNIT_NUM 
PARGRP_DATA_SIZE 
MAX_OPS 

Definition at line 41 of file osync.c.

◆ anonymous enum

anonymous enum
Enumerator
SMALL_OBJ_SIZE 
MEDIUM_OBJ_SIZE 
LARGE_OBJ_SIZE 

Definition at line 49 of file osync.c.

Function Documentation

◆ create_obj()

static int create_obj ( struct m0_uint128 oid)
static

Definition at line 55 of file osync.c.

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

◆ osync_after_each_write()

static void osync_after_each_write ( void  )
static

sync data for each write operation.

Definition at line 173 of file osync.c.

Here is the call graph for this function:

◆ osync_after_writes()

static void osync_after_writes ( void  )
static

Only sync data after all write ops are done.

Definition at line 217 of file osync.c.

Here is the call graph for this function:

◆ osync_by_sync_op()

static void osync_by_sync_op ( void  )
static

Definition at line 258 of file osync.c.

Here is the call graph for this function:

◆ osync_on_op()

static void osync_on_op ( void  )
static

Tests SYNC_ON_OP for objects.

Definition at line 316 of file osync.c.

Here is the call graph for this function:

◆ st_osync_fini()

static int st_osync_fini ( void  )
static

Definition at line 461 of file osync.c.

◆ st_osync_init()

static int st_osync_init ( void  )
static

Definition at line 440 of file osync.c.

Here is the call graph for this function:

◆ write_obj()

static int write_obj ( struct m0_obj obj,
int  start,
int  stride,
int  nr_ops 
)
static

Definition at line 91 of file osync.c.

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

Variable Documentation

◆ layout_id

uint64_t layout_id
static

Definition at line 39 of file osync.c.

◆ st_osync_container

struct m0_container st_osync_container

Definition at line 38 of file osync.c.

◆ st_suite_osync

struct st_suite st_suite_osync
Initial value:
= {
.ss_name = "osync_st",
.ss_init = st_osync_init,
.ss_fini = st_osync_fini,
.ss_tests = {
{ "osync_after_each_write", &osync_after_each_write},
{ "osync_after_writes", &osync_after_writes},
{ "osync_by_sync_op", &osync_by_sync_op},
{ "osync_on_op", &osync_on_op},
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void osync_on_op(void)
Definition: osync.c:316
static void osync_by_sync_op(void)
Definition: osync.c:258
static void osync_after_writes(void)
Definition: osync.c:217
static int st_osync_init(void)
Definition: osync.c:440
static void osync_after_each_write(void)
Definition: osync.c:173
static int st_osync_fini(void)
Definition: osync.c:461

Definition at line 466 of file osync.c.