#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <uuid/uuid.h>
#include <ctype.h>
Classes | |
struct | d_iov_t |
iovec for memory buffer More... | |
struct | d_sg_list_t |
Scatter/gather list for memory buffers. More... | |
struct | daos_cont_info_t |
Container information. More... | |
struct | daos_event |
Event and event queue. More... | |
struct | daos_handle_t |
Generic handle for various DAOS components like container, object, etc. More... | |
struct | daos_iod_t |
struct | daos_iom_t |
struct | daos_obj_id_t |
struct | daos_pool_info_t |
Storage pool. More... | |
struct | daos_prop_t |
daos properties, for pool or container More... | |
struct | daos_recx_t |
Macros | |
#define | DAOS_COO_RO (1U << 0) |
#define | DAOS_COO_RW (1U << 1) |
#define | DAOS_EQ_NOWAIT 0 |
Always return immediately. | |
#define | DAOS_EQ_WAIT -1 |
Wait for completion event forever. | |
#define | DAOS_HDL_INVAL ((daos_handle_t){0}) |
#define | DAOS_OBJ_NIL ((daos_obj_id_t){0}) |
#define | DAOS_PC_EX (1U << 2) |
#define | DAOS_PC_RO (1U << 0) |
#define | DAOS_PC_RW (1U << 1) |
#define | DAOS_PROP_LABEL_MAX_LEN (127) |
#define | DAOS_PROP_MAX_LABEL_BUF_LEN (DAOS_PROP_LABEL_MAX_LEN + 1) |
#define | DAOS_TX_NONE DAOS_HDL_INVAL |
#define | DAOS_UUID_STR_SIZE (37) |
#define | DER_ERR_GURT_BASE 1000 |
#define | DER_EXIST (DER_ERR_GURT_BASE + 4) |
#define | DER_INVAL (DER_ERR_GURT_BASE + 3) |
#define | OID_FMT_CLASS_BITS 8 |
#define | OID_FMT_CLASS_SHIFT (OID_FMT_TYPE_SHIFT - OID_FMT_CLASS_BITS) |
#define | OID_FMT_INTR_BITS 32 |
#define | OID_FMT_META_BITS 16 |
#define | OID_FMT_META_SHIFT (OID_FMT_CLASS_SHIFT - OID_FMT_META_BITS) |
#define | OID_FMT_TYPE_BITS 8 |
#define | OID_FMT_TYPE_SHIFT (64 - OID_FMT_TYPE_BITS) |
Typedefs | |
typedef struct daos_event | daos_event_t |
Event and event queue. | |
typedef d_iov_t | daos_key_t |
typedef uint16_t | daos_oclass_hints_t |
typedef uint16_t | daos_oclass_id_t |
typedef uint64_t | daos_size_t |
Enumerations | |
enum | { OC_UNKNOWN = 0 , OC_RP_XSF = 80 , OC_S1 = 200 , OC_S2 , OC_S4 , OC_S8 , OC_S16 , OC_S32 , OC_S64 , OC_S128 , OC_S256 , OC_S512 , OC_S1K , OC_S2K , OC_S4K , OC_S8K , OC_SX , OC_RESERVED = (1U << 10) } |
Predefined object classes. More... | |
enum | { DAOS_COND_DKEY_FETCH = (1 << 3) , DAOS_COND_AKEY_FETCH = (1 << 6) } |
enum | { DAOS_OO_RO = (1 << 1) , DAOS_OO_RW = (1 << 2) } |
Object open modes. More... | |
enum | { DAOS_REC_ANY = 0 } |
enum | { DAOS_OCH_RDD_DEF = (1 << 0) , DAOS_OCH_SHD_DEF = (1 << 4) } |
Flags for oclass hints. More... | |
enum | daos_eq_query_t { DAOS_EQR_COMPLETED = (1) , DAOS_EQR_WAITING = (1 << 1) , DAOS_EQR_ALL = (DAOS_EQR_COMPLETED | DAOS_EQR_WAITING) } |
enum | daos_iod_type_t { DAOS_IOD_SINGLE = 1 } |
Type of the value accessed in an IOD. More... | |
enum | daos_otype_t { DAOS_OT_MULTI_HASHED = 0 , DAOS_OT_DKEY_UINT64 = 2 , DAOS_OT_AKEY_UINT64 = 3 , DAOS_OT_MULTI_UINT64 = 4 , DAOS_OT_ARRAY = 11 , DAOS_OT_ARRAY_BYTE = 13 , DAOS_OT_MAX = 13 } |
DAOS object type. More... | |
This file is a reduced version of daos_xxx.h
headers that provides (simplified) declarations for use in libdaos_mock.
Definition in file daos.h.
#define DAOS_HDL_INVAL ((daos_handle_t){0}) |
#define DAOS_OBJ_NIL ((daos_obj_id_t){0}) |
#define DAOS_PROP_MAX_LABEL_BUF_LEN (DAOS_PROP_LABEL_MAX_LEN + 1) |
#define DAOS_TX_NONE DAOS_HDL_INVAL |
#define DER_EXIST (DER_ERR_GURT_BASE + 4) |
#define DER_INVAL (DER_ERR_GURT_BASE + 3) |
#define OID_FMT_CLASS_SHIFT (OID_FMT_TYPE_SHIFT - OID_FMT_CLASS_BITS) |
#define OID_FMT_META_SHIFT (OID_FMT_CLASS_SHIFT - OID_FMT_META_BITS) |
#define OID_FMT_TYPE_SHIFT (64 - OID_FMT_TYPE_BITS) |
typedef struct daos_event daos_event_t |
Event and event queue.
typedef d_iov_t daos_key_t |
typedef uint16_t daos_oclass_hints_t |
typedef uint16_t daos_oclass_id_t |
typedef uint64_t daos_size_t |
anonymous enum |
Predefined object classes.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum daos_eq_query_t |
enum daos_iod_type_t |
enum daos_otype_t |
const char * d_errstr | ( | int | rc | ) |
Definition at line 251 of file libdaos_mock.cxx.
|
inlinestatic |
int daos_cont_close | ( | daos_handle_t | coh, |
daos_event_t * | ev | ||
) |
Definition at line 311 of file libdaos_mock.cxx.
int daos_cont_create_with_label | ( | daos_handle_t | poh, |
const char * | label, | ||
daos_prop_t * | cont_prop, | ||
uuid_t * | uuid, | ||
daos_event_t * | ev | ||
) |
Definition at line 280 of file libdaos_mock.cxx.
int daos_cont_open | ( | daos_handle_t | poh, |
const char * | uuid, | ||
unsigned int | flags, | ||
daos_handle_t * | coh, | ||
daos_cont_info_t * | info, | ||
daos_event_t * | ev | ||
) |
Definition at line 294 of file libdaos_mock.cxx.
int daos_eq_create | ( | daos_handle_t * | eqh | ) |
Definition at line 319 of file libdaos_mock.cxx.
int daos_eq_destroy | ( | daos_handle_t | eqh, |
int | flags | ||
) |
Definition at line 324 of file libdaos_mock.cxx.
int daos_eq_poll | ( | daos_handle_t | eqh, |
int | wait_running, | ||
int64_t | timeout, | ||
unsigned int | nevents, | ||
daos_event_t ** | events | ||
) |
Definition at line 329 of file libdaos_mock.cxx.
int daos_event_fini | ( | daos_event_t * | ev | ) |
Definition at line 352 of file libdaos_mock.cxx.
int daos_event_init | ( | daos_event_t * | ev, |
daos_handle_t | eqh, | ||
daos_event_t * | parent | ||
) |
Definition at line 347 of file libdaos_mock.cxx.
int daos_event_parent_barrier | ( | daos_event_t * | ev | ) |
Definition at line 342 of file libdaos_mock.cxx.
int daos_event_test | ( | daos_event_t * | ev, |
int64_t | timeout, | ||
bool * | flag | ||
) |
Definition at line 335 of file libdaos_mock.cxx.
int daos_fini | ( | void | ) |
Definition at line 246 of file libdaos_mock.cxx.
int daos_init | ( | void | ) |
Definition at line 240 of file libdaos_mock.cxx.
|
inlinestatic |
int daos_obj_close | ( | daos_handle_t | oh, |
daos_event_t * | ev | ||
) |
Definition at line 369 of file libdaos_mock.cxx.
int daos_obj_fetch | ( | daos_handle_t | oh, |
daos_handle_t | th, | ||
uint64_t | flags, | ||
daos_key_t * | dkey, | ||
unsigned int | nr, | ||
daos_iod_t * | iods, | ||
d_sg_list_t * | sgls, | ||
daos_iom_t * | ioms, | ||
daos_event_t * | ev | ||
) |
Definition at line 398 of file libdaos_mock.cxx.
int daos_obj_generate_oid | ( | daos_handle_t | coh, |
daos_obj_id_t * | oid, | ||
enum daos_otype_t | type, | ||
daos_oclass_id_t | cid, | ||
daos_oclass_hints_t | hints, | ||
uint32_t | args | ||
) |
Definition at line 375 of file libdaos_mock.cxx.
int daos_obj_open | ( | daos_handle_t | coh, |
daos_obj_id_t | oid, | ||
unsigned int | mode, | ||
daos_handle_t * | oh, | ||
daos_event_t * | ev | ||
) |
Definition at line 359 of file libdaos_mock.cxx.
int daos_obj_update | ( | daos_handle_t | oh, |
daos_handle_t | th, | ||
uint64_t | flags, | ||
daos_key_t * | dkey, | ||
unsigned int | nr, | ||
daos_iod_t * | iods, | ||
d_sg_list_t * | sgls, | ||
daos_event_t * | ev | ||
) |
Definition at line 407 of file libdaos_mock.cxx.
int daos_oclass_id2name | ( | daos_oclass_id_t | oc_id, |
char * | name | ||
) |
Definition at line 265 of file libdaos_mock.cxx.
int daos_oclass_name2id | ( | const char * | name | ) |
Definition at line 256 of file libdaos_mock.cxx.
|
inlinestatic |
int daos_pool_connect | ( | const char * | pool, |
const char * | grp, | ||
unsigned int | flags, | ||
daos_handle_t * | poh, | ||
daos_pool_info_t * | info, | ||
daos_event_t * | ev | ||
) |
Definition at line 418 of file libdaos_mock.cxx.
int daos_pool_disconnect | ( | daos_handle_t | poh, |
daos_event_t * | ev | ||
) |
Definition at line 426 of file libdaos_mock.cxx.