28 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT 63 memset(&
obj, 0,
sizeof(
obj));
92 int start,
int stride,
int nr_ops)
114 for (
i = 0;
i < nr_ops;
i++) {
129 for (
i = 0;
i < nr_ops;
i++) {
132 &ext_w[
i], &data_w[
i],
NULL, 0, 0, &ops_w[
i]);
133 if (ops_w[
i] ==
NULL)
136 if (
i == 0)
goto CLEANUP;
141 for (
i = 0;
i < nr_ops;
i++) {
153 for (
i = 0;
i < nr_ops;
i++) {
154 if (ext_w !=
NULL && ext_w[
i].iv_vec.v_nr != 0)
180 struct m0_obj *obj_to_sync;
199 for (
i = 0;
i < 2;
i++) {
224 struct m0_obj *obj_to_sync;
243 for (
i = 0;
i < 2;
i++) {
266 struct m0_obj *obj_to_sync;
285 for (
i = 0;
i < 2;
i++) {
324 struct m0_obj *objs_to_sync;
325 struct m0_op **ops_w;
334 bytes_to_write = 4096;
343 if (objs_to_sync ==
NULL || ops_w ==
NULL || ext_w ==
NULL ||
347 for (
i = 0;
i < nr_objs;
i++) {
362 for (
i = 0;
i < nr_objs;
i++) {
376 &ext_w[
i], &data_w[
i],
NULL, 0, 0, &ops_w[
i]);
377 if (ops_w[
i] ==
NULL)
393 if (sync_rcs ==
NULL)
398 for (
i = 0;
i < nr_objs_written;
i++) {
414 for (
i = 0;
i < nr_objs_written;
i++) {
422 for (
i = 0;
i < nr_objs;
i++) {
423 if (ext_w !=
NULL && ext_w[
i].iv_vec.v_nr != 0)
425 if (data_w !=
NULL && data_w[
i].ov_buf !=
NULL)
427 if (attr_w !=
NULL && attr_w[
i].ov_buf !=
NULL)
479 #undef M0_TRACE_SUBSYSTEM
int st_entity_create(struct m0_fid *pool, struct m0_entity *entity, struct m0_op **op)
struct m0_container st_osync_container
#define M0_ALLOC_ARR(arr, nr)
void st_op_free(struct m0_op *op)
M0_INTERNAL int m0_indexvec_alloc(struct m0_indexvec *ivec, uint32_t len)
const m0_time_t M0_TIME_NEVER
void st_obj_fini(struct m0_obj *obj)
int m0_entity_sync(struct m0_entity *ent)
static void osync_on_op(void)
#define MEM_ALLOC_PTR(arr)
uint64_t m0_client_layout_id(const struct m0_client *instance)
M0_INTERNAL void m0_indexvec_free(struct m0_indexvec *ivec)
int m0_sync_op_add(struct m0_op *sop, struct m0_op *op)
const struct m0_uint128 M0_UBER_REALM
static void osync_by_sync_op(void)
#define ST_ASSERT_FATAL(a)
static void osync_after_writes(void)
static int st_osync_init(void)
M0_INTERNAL int m0_bufvec_alloc(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size)
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
static int write_obj(struct m0_obj *obj, int start, int stride, int nr_ops)
void st_container_init(struct m0_container *con, struct m0_realm *parent, const struct m0_uint128 *id, struct m0_client *instance)
struct m0_entity re_entity
int oid_get(struct m0_uint128 *oid)
int m0_sync_entity_add(struct m0_op *sop, struct m0_entity *ent)
int m0_sync_op_init(struct m0_op **sop)
void console_printf(const char *fmt,...)
static void mem_free(const struct m0_be_btree *btree, struct m0_be_tx *tx, void *ptr)
void st_obj_init(struct m0_obj *obj, struct m0_realm *parent, const struct m0_uint128 *id, uint64_t layout_id)
struct st_suite st_suite_osync
void st_obj_op(struct m0_obj *obj, enum m0_obj_opcode opcode, struct m0_indexvec *ext, struct m0_bufvec *data, struct m0_bufvec *attr, uint64_t mask, uint32_t flags, struct m0_op **op)
#define MEM_ALLOC_ARR(arr, nr)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
struct m0_client * st_get_instance()
#define M0_CLIENT_THREAD_ENTER
struct m0_entity ob_entity
static void osync_after_each_write(void)
static int start(struct m0_fom *fom)
void st_op_launch(struct m0_op **op, uint32_t nr)
static int st_osync_fini(void)
static uint64_t layout_id
void st_entity_open(struct m0_entity *entity)
int32_t st_op_wait(struct m0_op *op, uint64_t bits, m0_time_t to)
void st_op_fini(struct m0_op *op)
static int create_obj(struct m0_uint128 *oid)