Motr
M0
|
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <assert.h>
#include <stdarg.h>
#include <unistd.h>
#include "lib/finject.h"
#include "lib/trace.h"
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/idx.h"
#include "motr/m0crate/logger.h"
#include "motr/m0crate/workload.h"
#include "motr/m0crate/crate_client.h"
#include "motr/m0crate/crate_client_utils.h"
Go to the source code of this file.
Data Structures | |
struct | m0_op_context |
Typedefs | |
typedef int(* | cr_operation_t) (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
Functions | |
void | integrity (struct m0_uint128 object_id, unsigned char **md5toverify, int block_count, int idx_op) |
void | list_index_return (struct workload *w) |
static size_t | cr_rand___range_l (size_t end) |
void | cr_time_acc (m0_time_t *t1, m0_time_t t2) |
void | cr_op_stable (struct m0_op *op) |
void | cr_op_failed (struct m0_op *op) |
static void | cti_cleanup_op (struct m0_task_io *cti, int i) |
int | cr_free_op_idx (struct m0_task_io *cti, uint32_t nr_ops) |
static void | cr_cti_cleanup (struct m0_task_io *cti, int nr_ops) |
int | cr_io_vector_prep (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, int obj_idx, int op_index) |
static struct m0_fid * | check_fid (struct m0_fid *id) |
int | cr_namei_create (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
int | cr_namei_open (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
int | cr_namei_delete (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
int | cr_io_write (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
int | cr_io_read (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
int | cr_execute_ops (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_obj *obj, struct m0_op_ops *cbs, enum m0_operations op_code, int obj_idx) |
void | cr_cti_report (struct m0_task_io *cti, enum m0_operations op_code) |
int | cr_op_namei (struct m0_workload_io *cwi, struct m0_task_io *cti, enum m0_operations op_code) |
int | cr_op_io (struct m0_workload_io *cwi, struct m0_task_io *cti, enum m0_operations op_code) |
int | cr_task_share_execute (struct m0_task_io *cti) |
int | cr_task_execute (struct m0_task_io *cti) |
static int | cr_adopt_motr_thread (struct m0_task_io *cti) |
static int | cr_release_motr_thread (struct m0_task_io *cti) |
int | cr_buffer_read (char *buffer, const char *filename, uint64_t size) |
static uint64_t | nz_rand (void) |
void | cr_get_oids (struct m0_uint128 *ids, uint32_t nr_objs) |
void | cr_task_bufs_free (struct m0_task_io *cti, int idx) |
void | cr_task_io_cleanup (struct m0_task_io **cti_p) |
int | cr_task_prep_bufs (struct m0_workload_io *cwi, struct m0_task_io *cti) |
int | cr_task_prep_one (struct m0_workload_io *cwi, struct m0_task_io **cti_out) |
int | cr_tasks_prepare (struct workload *w, struct workload_task *tasks) |
int | cr_tasks_release (struct workload *w, struct workload_task *tasks) |
bool | cr_time_not_expired (struct workload *w) |
static uint64_t | bw (uint64_t bytes, m0_time_t time) |
void | run (struct workload *w, struct workload_task *tasks) |
void | m0_op_run (struct workload *w, struct workload_task *task, const struct workload_op *op) |
Variables | |
cr_operation_t | opcode_operation_map [] |
typedef int(* cr_operation_t) (struct m0_workload_io *cwi, struct m0_task_io *cti, struct m0_op_context *op_ctx, struct m0_obj *obj, int free_slot, int obj_idx, int op_index) |
Definition at line 121 of file crate_io.c.
|
static |
Returns bandwidth in bytes / sec.
Definition at line 1004 of file crate_io.c.
Definition at line 339 of file crate_io.c.
|
static |
Definition at line 739 of file crate_io.c.
int cr_buffer_read | ( | char * | buffer, |
const char * | filename, | ||
uint64_t | size | ||
) |
Definition at line 765 of file crate_io.c.
|
static |
Definition at line 235 of file crate_io.c.
void cr_cti_report | ( | struct m0_task_io * | cti, |
enum m0_operations | op_code | ||
) |
Definition at line 483 of file crate_io.c.
int cr_execute_ops | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_obj * | obj, | ||
struct m0_op_ops * | cbs, | ||
enum m0_operations | op_code, | ||
int | obj_idx | ||
) |
Definition at line 445 of file crate_io.c.
int cr_free_op_idx | ( | struct m0_task_io * | cti, |
uint32_t | nr_ops | ||
) |
Definition at line 217 of file crate_io.c.
void cr_get_oids | ( | struct m0_uint128 * | ids, |
uint32_t | nr_objs | ||
) |
Definition at line 796 of file crate_io.c.
int cr_io_read | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
struct m0_obj * | obj, | ||
int | free_slot, | ||
int | obj_idx, | ||
int | op_index | ||
) |
Create object index and buffer vectors.
Definition at line 414 of file crate_io.c.
int cr_io_vector_prep | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
int | obj_idx, | ||
int | op_index | ||
) |
TODO: set attr to NULL to disable cksum, enable after addding cksum in ST
Definition at line 244 of file crate_io.c.
int cr_io_write | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
struct m0_obj * | obj, | ||
int | free_slot, | ||
int | obj_idx, | ||
int | op_index | ||
) |
Create object index and buffer vectors.
Definition at line 391 of file crate_io.c.
int cr_namei_create | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
struct m0_obj * | obj, | ||
int | free_slot, | ||
int | obj_idx, | ||
int | op_index | ||
) |
int cr_namei_delete | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
struct m0_obj * | obj, | ||
int | free_slot, | ||
int | obj_idx, | ||
int | op_index | ||
) |
int cr_namei_open | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
struct m0_op_context * | op_ctx, | ||
struct m0_obj * | obj, | ||
int | free_slot, | ||
int | obj_idx, | ||
int | op_index | ||
) |
Open a created object, Refer EOS-285
Definition at line 363 of file crate_io.c.
void cr_op_failed | ( | struct m0_op * | op | ) |
Definition at line 173 of file crate_io.c.
int cr_op_io | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
enum m0_operations | op_code | ||
) |
Definition at line 584 of file crate_io.c.
int cr_op_namei | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti, | ||
enum m0_operations | op_code | ||
) |
Close object only for create opcode
Definition at line 496 of file crate_io.c.
void cr_op_stable | ( | struct m0_op * | op | ) |
Definition at line 151 of file crate_io.c.
|
static |
Get pseudo-random uint64 in positive range [0;end) client index workload has a similar function. That function should be in utility and this should be deleted.
Definition at line 134 of file crate_io.c.
|
static |
Definition at line 756 of file crate_io.c.
void cr_task_bufs_free | ( | struct m0_task_io * | cti, |
int | idx | ||
) |
Definition at line 809 of file crate_io.c.
int cr_task_execute | ( | struct m0_task_io * | cti | ) |
IO workflow : Create an object - creates an object and close it. For io operation - open object, perform io and delete it.
Definition at line 672 of file crate_io.c.
void cr_task_io_cleanup | ( | struct m0_task_io ** | cti_p | ) |
Definition at line 817 of file crate_io.c.
int cr_task_prep_bufs | ( | struct m0_workload_io * | cwi, |
struct m0_task_io * | cti | ||
) |
Definition at line 838 of file crate_io.c.
int cr_task_prep_one | ( | struct m0_workload_io * | cwi, |
struct m0_task_io ** | cti_out | ||
) |
Definition at line 869 of file crate_io.c.
int cr_task_share_execute | ( | struct m0_task_io * | cti | ) |
Creates a global object shared by all the tasks in the workload. Object operation supported is READ/WRITE.
Only parallel writes are supported.
Definition at line 639 of file crate_io.c.
int cr_tasks_prepare | ( | struct workload * | w, |
struct workload_task * | tasks | ||
) |
Definition at line 938 of file crate_io.c.
int cr_tasks_release | ( | struct workload * | w, |
struct workload_task * | tasks | ||
) |
Definition at line 972 of file crate_io.c.
Definition at line 146 of file crate_io.c.
bool cr_time_not_expired | ( | struct workload * | w | ) |
Definition at line 989 of file crate_io.c.
|
static |
Definition at line 190 of file crate_io.c.
void integrity | ( | struct m0_uint128 | object_id, |
unsigned char ** | md5toverify, | ||
int | block_count, | ||
int | idx_op | ||
) |
void list_index_return | ( | struct workload * | w | ) |
|
static |
Definition at line 785 of file crate_io.c.
cr_operation_t opcode_operation_map[] |
Definition at line 437 of file crate_io.c.