write-op.c 3.4 KB
Newer Older
Matthieu Dorier's avatar
Matthieu Dorier committed
1 2 3 4 5 6 7 8 9
/*
 * (C) 2017 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */

#include <stdlib.h>
#include "mobject-store-config.h"
#include "libmobject-store.h"
10
#include "log.h"
Matthieu Dorier's avatar
Matthieu Dorier committed
11 12 13 14 15 16 17
#include "write-op.h"
#include "completion.h"

mobject_store_write_op_t mobject_store_create_write_op(void)
{
	mobject_store_write_op_t write_op = 
		(mobject_store_write_op_t)calloc(1, sizeof(struct mobject_store_write_op));
18 19 20
	MOBJECT_ASSERT(write_op != MOBJECT_WRITE_OP_NULL, "Could not allocate write_op");
	write_op->num_actions = 0;
	write_op->actions = (wr_action_base_t)0;
Matthieu Dorier's avatar
Matthieu Dorier committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34
	return write_op;
}

void mobject_store_release_write_op(mobject_store_write_op_t write_op)
{
	if(write_op == MOBJECT_WRITE_OP_NULL) return;
	// TODO free internal fields
	free(write_op);
}

void mobject_store_write_op_create(mobject_store_write_op_t write_op,
                                   int exclusive,
                                   const char* category)
{
35
	wr_action_create_t action = (wr_action_create_t)calloc(1, sizeof(*action));
Matthieu Dorier's avatar
Matthieu Dorier committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
}

void mobject_store_write_op_write(mobject_store_write_op_t write_op,
                                  const char *buffer,
                                  size_t len,
                                  uint64_t offset)
{

}

void mobject_store_write_op_write_full(mobject_store_write_op_t write_op,
                                       const char *buffer,
                                       size_t len)
{

}

void mobject_store_write_op_writesame(mobject_store_write_op_t write_op,
                                      const char *buffer,
                                      size_t data_len,
                                      size_t write_len,
                                      uint64_t offset)
{

}

void mobject_store_write_op_append(mobject_store_write_op_t write_op,
                                   const char *buffer,
                                   size_t len)
{

}

void mobject_store_write_op_remove(mobject_store_write_op_t write_op)
{

}

void mobject_store_write_op_truncate(mobject_store_write_op_t write_op,
                                     uint64_t offset)
{

}

void mobject_store_write_op_zero(mobject_store_write_op_t write_op,
                                 uint64_t offset,
                                 uint64_t len)
{

}

void mobject_store_write_op_omap_set(mobject_store_write_op_t write_op,
                                     char const* const* keys,
                                     char const* const* vals,
                                     const size_t *lens,
                                     size_t num)
{

}

void mobject_store_write_op_omap_rm_keys(mobject_store_write_op_t write_op,
                                         char const* const* keys,
                                         size_t keys_len)
{

}

int mobject_store_write_op_operate(mobject_store_write_op_t write_op,
                                   mobject_store_ioctx_t io,
                                   const char *oid,
                                   time_t *mtime,
                                   int flags)
{

}

int mobject_store_aio_write_op_operate(mobject_store_write_op_t write_op,
                                       mobject_store_ioctx_t io,
                                       mobject_store_completion_t completion,
                                       const char *oid,
                                       time_t *mtime,
                                       int flags)
{

}