Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
daos.h File Reference
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <uuid/uuid.h>
Include dependency graph for daos.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  d_iov_t
 iovec for memory buffer More...
 
struct  d_rank_list_t
 
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_PC_EX   (1U << 2)
 
#define DAOS_PC_RO   (1U << 0)
 
#define DAOS_PC_RW   (1U << 1)
 
#define DAOS_TX_NONE   DAOS_HDL_INVAL
 
#define DER_ERR_GURT_BASE   1000
 
#define DER_INVAL   (DER_ERR_GURT_BASE + 3)
 
#define OID_FMT_CLASS_BITS
 
#define OID_FMT_CLASS_SHIFT   (OID_FMT_FEAT_SHIFT - OID_FMT_CLASS_BITS)
 
#define OID_FMT_FEAT_BITS   16
 
#define OID_FMT_FEAT_SHIFT   (OID_FMT_VER_SHIFT - OID_FMT_FEAT_BITS)
 
#define OID_FMT_INTR_BITS   32
 
#define OID_FMT_VER   1
 
#define OID_FMT_VER_BITS   4
 
#define OID_FMT_VER_SHIFT   (64 - OID_FMT_VER_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_id_t
 
typedef uint16_t daos_ofeat_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_OF_DKEY_UINT64 = (1 << 0) , DAOS_OF_AKEY_UINT64 = (1 << 2) , DAOS_OF_ARRAY_BYTE = (1 << 7) }
 
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_iod_type_t { DAOS_IOD_SINGLE = 1 }
 Type of the value accessed in an IOD. More...
 

Functions

const char * d_errstr (int rc)
 
static void d_iov_set (d_iov_t *iov, void *buf, size_t size)
 
int daos_cont_close (daos_handle_t coh, daos_event_t *ev)
 
int daos_cont_create (daos_handle_t poh, const uuid_t uuid, daos_prop_t *cont_prop, daos_event_t *ev)
 
int daos_cont_open (daos_handle_t poh, const uuid_t uuid, unsigned int flags, daos_handle_t *coh, daos_cont_info_t *info, daos_event_t *ev)
 
int daos_eq_create (daos_handle_t *eqh)
 
int daos_eq_destroy (daos_handle_t eqh, int flags)
 
int daos_eq_poll (daos_handle_t eqh, int wait_running, int64_t timeout, unsigned int nevents, daos_event_t **events)
 
int daos_event_fini (daos_event_t *ev)
 
int daos_event_init (daos_event_t *ev, daos_handle_t eqh, daos_event_t *parent)
 
int daos_fini (void)
 
int daos_init (void)
 
int daos_obj_close (daos_handle_t oh, daos_event_t *ev)
 
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)
 
static int daos_obj_generate_id (daos_obj_id_t *oid, daos_ofeat_t ofeats, daos_oclass_id_t cid, uint32_t args)
 
int daos_obj_open (daos_handle_t coh, daos_obj_id_t oid, unsigned int mode, daos_handle_t *oh, daos_event_t *ev)
 
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)
 
int daos_oclass_id2name (daos_oclass_id_t oc_id, char *name)
 
int daos_oclass_name2id (const char *name)
 
int daos_pool_connect (const uuid_t uuid, const char *grp, const d_rank_list_t *svc, unsigned int flags, daos_handle_t *poh, daos_pool_info_t *info, daos_event_t *ev)
 
int daos_pool_disconnect (daos_handle_t poh, daos_event_t *ev)
 
d_rank_list_tdaos_rank_list_parse (const char *str, const char *sep)
 

Detailed Description

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.

Macro Definition Documentation

◆ DAOS_COO_RO

#define DAOS_COO_RO   (1U << 0)

Definition at line 252 of file daos.h.

◆ DAOS_COO_RW

#define DAOS_COO_RW   (1U << 1)

Definition at line 253 of file daos.h.

◆ DAOS_EQ_NOWAIT

#define DAOS_EQ_NOWAIT   0

Always return immediately.

Definition at line 88 of file daos.h.

◆ DAOS_EQ_WAIT

#define DAOS_EQ_WAIT   -1

Wait for completion event forever.

Definition at line 86 of file daos.h.

◆ DAOS_HDL_INVAL

#define DAOS_HDL_INVAL   ((daos_handle_t){0})

Definition at line 67 of file daos.h.

◆ DAOS_PC_EX

#define DAOS_PC_EX   (1U << 2)

Definition at line 72 of file daos.h.

◆ DAOS_PC_RO

#define DAOS_PC_RO   (1U << 0)

Definition at line 70 of file daos.h.

◆ DAOS_PC_RW

#define DAOS_PC_RW   (1U << 1)

Definition at line 71 of file daos.h.

◆ DAOS_TX_NONE

#define DAOS_TX_NONE   DAOS_HDL_INVAL

Definition at line 68 of file daos.h.

◆ DER_ERR_GURT_BASE

#define DER_ERR_GURT_BASE   1000

Definition at line 286 of file daos.h.

◆ DER_INVAL

#define DER_INVAL   (DER_ERR_GURT_BASE + 3)

Definition at line 287 of file daos.h.

◆ OID_FMT_CLASS_BITS

#define OID_FMT_CLASS_BITS
Value:
#define OID_FMT_FEAT_BITS
Definition daos.h:152
#define OID_FMT_INTR_BITS
Definition daos.h:150
#define OID_FMT_VER_BITS
Definition daos.h:151

Definition at line 153 of file daos.h.

◆ OID_FMT_CLASS_SHIFT

#define OID_FMT_CLASS_SHIFT   (OID_FMT_FEAT_SHIFT - OID_FMT_CLASS_BITS)

Definition at line 158 of file daos.h.

◆ OID_FMT_FEAT_BITS

#define OID_FMT_FEAT_BITS   16

Definition at line 152 of file daos.h.

◆ OID_FMT_FEAT_SHIFT

#define OID_FMT_FEAT_SHIFT   (OID_FMT_VER_SHIFT - OID_FMT_FEAT_BITS)

Definition at line 157 of file daos.h.

◆ OID_FMT_INTR_BITS

#define OID_FMT_INTR_BITS   32

Definition at line 150 of file daos.h.

◆ OID_FMT_VER

#define OID_FMT_VER   1

Definition at line 148 of file daos.h.

◆ OID_FMT_VER_BITS

#define OID_FMT_VER_BITS   4

Definition at line 151 of file daos.h.

◆ OID_FMT_VER_SHIFT

#define OID_FMT_VER_SHIFT   (64 - OID_FMT_VER_BITS)

Definition at line 156 of file daos.h.

Typedef Documentation

◆ daos_event_t

typedef struct daos_event daos_event_t

Event and event queue.

◆ daos_key_t

Definition at line 74 of file daos.h.

◆ daos_oclass_id_t

typedef uint16_t daos_oclass_id_t

Definition at line 133 of file daos.h.

◆ daos_ofeat_t

typedef uint16_t daos_ofeat_t

Definition at line 134 of file daos.h.

◆ daos_size_t

typedef uint64_t daos_size_t

Definition at line 60 of file daos.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Predefined object classes.

Enumerator
OC_UNKNOWN 
OC_RP_XSF 

Replicated object class which is extremely scalable for fetch.

OC_S1 

Object classes with explicit layout.

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 

Class ID equal or higher than this is reserved.

Definition at line 106 of file daos.h.

◆ anonymous enum

anonymous enum
Enumerator
DAOS_OF_DKEY_UINT64 
DAOS_OF_AKEY_UINT64 
DAOS_OF_ARRAY_BYTE 

Definition at line 160 of file daos.h.

◆ anonymous enum

anonymous enum
Enumerator
DAOS_COND_DKEY_FETCH 
DAOS_COND_AKEY_FETCH 

Definition at line 166 of file daos.h.

◆ anonymous enum

anonymous enum

Object open modes.

Enumerator
DAOS_OO_RO 
DAOS_OO_RW 

Definition at line 172 of file daos.h.

◆ anonymous enum

anonymous enum
Enumerator
DAOS_REC_ANY 

Any record size, it is used by fetch.

Definition at line 199 of file daos.h.

◆ daos_iod_type_t

Type of the value accessed in an IOD.

Enumerator
DAOS_IOD_SINGLE 

Definition at line 183 of file daos.h.

Function Documentation

◆ d_errstr()

const char * d_errstr ( int  rc)

Definition at line 241 of file libdaos_mock.cxx.

◆ d_iov_set()

static void d_iov_set ( d_iov_t iov,
void buf,
size_t  size 
)
inlinestatic

Definition at line 54 of file daos.h.

◆ daos_cont_close()

int daos_cont_close ( daos_handle_t  coh,
daos_event_t ev 
)

Definition at line 305 of file libdaos_mock.cxx.

◆ daos_cont_create()

int daos_cont_create ( daos_handle_t  poh,
const uuid_t  uuid,
daos_prop_t cont_prop,
daos_event_t ev 
)

Definition at line 270 of file libdaos_mock.cxx.

◆ daos_cont_open()

int daos_cont_open ( daos_handle_t  poh,
const uuid_t  uuid,
unsigned int  flags,
daos_handle_t coh,
daos_cont_info_t info,
daos_event_t ev 
)

Definition at line 285 of file libdaos_mock.cxx.

◆ daos_eq_create()

int daos_eq_create ( daos_handle_t eqh)

Definition at line 316 of file libdaos_mock.cxx.

◆ daos_eq_destroy()

int daos_eq_destroy ( daos_handle_t  eqh,
int  flags 
)

Definition at line 322 of file libdaos_mock.cxx.

◆ daos_eq_poll()

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.

◆ daos_event_fini()

int daos_event_fini ( daos_event_t ev)

Definition at line 347 of file libdaos_mock.cxx.

◆ daos_event_init()

int daos_event_init ( daos_event_t ev,
daos_handle_t  eqh,
daos_event_t parent 
)

Definition at line 339 of file libdaos_mock.cxx.

◆ daos_fini()

int daos_fini ( void  )

Definition at line 224 of file libdaos_mock.cxx.

◆ daos_init()

int daos_init ( void  )

Definition at line 218 of file libdaos_mock.cxx.

◆ daos_obj_close()

int daos_obj_close ( daos_handle_t  oh,
daos_event_t ev 
)

Definition at line 370 of file libdaos_mock.cxx.

◆ daos_obj_fetch()

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 377 of file libdaos_mock.cxx.

◆ daos_obj_generate_id()

static int daos_obj_generate_id ( daos_obj_id_t oid,
daos_ofeat_t  ofeats,
daos_oclass_id_t  cid,
uint32_t  args 
)
inlinestatic

Definition at line 204 of file daos.h.

◆ daos_obj_open()

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 357 of file libdaos_mock.cxx.

◆ daos_obj_update()

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 392 of file libdaos_mock.cxx.

◆ daos_oclass_id2name()

int daos_oclass_id2name ( daos_oclass_id_t  oc_id,
char *  name 
)

Definition at line 253 of file libdaos_mock.cxx.

◆ daos_oclass_name2id()

int daos_oclass_name2id ( const char *  name)

Definition at line 246 of file libdaos_mock.cxx.

◆ daos_pool_connect()

int daos_pool_connect ( const uuid_t  uuid,
const char *  grp,
const d_rank_list_t svc,
unsigned int  flags,
daos_handle_t poh,
daos_pool_info_t info,
daos_event_t ev 
)

Definition at line 410 of file libdaos_mock.cxx.

◆ daos_pool_disconnect()

int daos_pool_disconnect ( daos_handle_t  poh,
daos_event_t ev 
)

Definition at line 426 of file libdaos_mock.cxx.

◆ daos_rank_list_parse()

d_rank_list_t * daos_rank_list_parse ( const char *  str,
const char *  sep 
)

Definition at line 229 of file libdaos_mock.cxx.