IOR
Data Structures | Macros | Functions | Variables
aiori-RADOS.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <rados/librados.h>
#include "ior.h"
#include "iordef.h"
#include "aiori.h"
#include "utilities.h"
Include dependency graph for aiori-RADOS.c:

Go to the source code of this file.

Data Structures

struct  rados_options
 

Macros

#define RADOS_ERR(__err_str, __ret)
 

Functions

static void * RADOS_Create (char *, IOR_param_t *)
 
static void * RADOS_Open (char *, IOR_param_t *)
 
static IOR_offset_t RADOS_Xfer (int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
 
static void RADOS_Close (void *, IOR_param_t *)
 
static void RADOS_Delete (char *, IOR_param_t *)
 
static void RADOS_Fsync (void *, IOR_param_t *)
 
static IOR_offset_t RADOS_GetFileSize (IOR_param_t *, MPI_Comm, char *)
 
static int RADOS_StatFS (const char *, ior_aiori_statfs_t *, IOR_param_t *)
 
static int RADOS_MkDir (const char *, mode_t, IOR_param_t *)
 
static int RADOS_RmDir (const char *, IOR_param_t *)
 
static int RADOS_Access (const char *, int, IOR_param_t *)
 
static int RADOS_Stat (const char *, struct stat *, IOR_param_t *)
 
static option_helpRADOS_options ()
 
static void RADOS_Cluster_Init (IOR_param_t *param)
 
static void RADOS_Cluster_Finalize (IOR_param_t *param)
 
static void * RADOS_Create_Or_Open (char *testFileName, IOR_param_t *param, int create_flag)
 

Variables

static struct rados_options o
 
static option_help options []
 
ior_aiori_t rados_aiori
 

Macro Definition Documentation

◆ RADOS_ERR

#define RADOS_ERR (   __err_str,
  __ret 
)
Value:
do { \
errno = -__ret; \
ERR(__err_str); \
} while(0)

Definition at line 86 of file aiori-RADOS.c.

Referenced by RADOS_Cluster_Init(), RADOS_Create_Or_Open(), RADOS_Delete(), RADOS_GetFileSize(), and RADOS_Xfer().

Function Documentation

◆ RADOS_Access()

static int RADOS_Access ( const char *  oid,
int  mode,
IOR_param_t param 
)
static

Definition at line 333 of file aiori-RADOS.c.

References NULL, RADOS_Cluster_Finalize(), RADOS_Cluster_Init(), and IOR_param_t::rados_ioctx.

Here is the call graph for this function:

◆ RADOS_Close()

static void RADOS_Close ( void *  fd,
IOR_param_t param 
)
static

Definition at line 228 of file aiori-RADOS.c.

References RADOS_Cluster_Finalize().

Here is the call graph for this function:

◆ RADOS_Cluster_Finalize()

static void RADOS_Cluster_Finalize ( IOR_param_t param)
static

Definition at line 123 of file aiori-RADOS.c.

References IOR_param_t::rados_cluster, and IOR_param_t::rados_ioctx.

Referenced by RADOS_Access(), RADOS_Close(), RADOS_Delete(), and RADOS_GetFileSize().

Here is the caller graph for this function:

◆ RADOS_Cluster_Init()

static void RADOS_Cluster_Init ( IOR_param_t param)
static

◆ RADOS_Create()

static void * RADOS_Create ( char *  testFileName,
IOR_param_t param 
)
static

Definition at line 173 of file aiori-RADOS.c.

References RADOS_Create_Or_Open(), and TRUE.

Here is the call graph for this function:

◆ RADOS_Create_Or_Open()

static void* RADOS_Create_Or_Open ( char *  testFileName,
IOR_param_t param,
int  create_flag 
)
static

Definition at line 132 of file aiori-RADOS.c.

References ERR, IOR_EXCL, NULL, IOR_param_t::openFlags, RADOS_Cluster_Init(), RADOS_ERR, IOR_param_t::rados_ioctx, TRUE, IOR_param_t::useO_DIRECT, and WARN.

Referenced by RADOS_Create(), and RADOS_Open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RADOS_Delete()

static void RADOS_Delete ( char *  testFileName,
IOR_param_t param 
)
static

Definition at line 239 of file aiori-RADOS.c.

References NULL, RADOS_Cluster_Finalize(), RADOS_Cluster_Init(), RADOS_ERR, and IOR_param_t::rados_ioctx.

Here is the call graph for this function:

◆ RADOS_Fsync()

static void RADOS_Fsync ( void *  fd,
IOR_param_t param 
)
static

Definition at line 223 of file aiori-RADOS.c.

◆ RADOS_GetFileSize()

static IOR_offset_t RADOS_GetFileSize ( IOR_param_t test,
MPI_Comm  testComm,
char *  testFileName 
)
static

Definition at line 262 of file aiori-RADOS.c.

References IOR_param_t::filePerProc, MPI_CHECK, NULL, RADOS_Cluster_Finalize(), RADOS_Cluster_Init(), RADOS_ERR, IOR_param_t::rados_ioctx, rank, TRUE, and WARN.

Here is the call graph for this function:

◆ RADOS_MkDir()

static int RADOS_MkDir ( const char *  oid,
mode_t  mode,
IOR_param_t param 
)
static

Definition at line 321 of file aiori-RADOS.c.

References WARN.

◆ RADOS_Open()

static void * RADOS_Open ( char *  testFileName,
IOR_param_t param 
)
static

Definition at line 178 of file aiori-RADOS.c.

References FALSE, IOR_CREAT, IOR_param_t::openFlags, RADOS_Create_Or_Open(), and TRUE.

Here is the call graph for this function:

◆ RADOS_options()

static option_help * RADOS_options ( )
static

Definition at line 92 of file aiori-RADOS.c.

References options.

◆ RADOS_RmDir()

static int RADOS_RmDir ( const char *  oid,
IOR_param_t param 
)
static

Definition at line 327 of file aiori-RADOS.c.

References WARN.

◆ RADOS_Stat()

static int RADOS_Stat ( const char *  oid,
struct stat *  buf,
IOR_param_t param 
)
static

Definition at line 357 of file aiori-RADOS.c.

References WARN.

◆ RADOS_StatFS()

static int RADOS_StatFS ( const char *  oid,
ior_aiori_statfs_t stat_buf,
IOR_param_t param 
)
static

Definition at line 314 of file aiori-RADOS.c.

References WARN.

◆ RADOS_Xfer()

static IOR_offset_t RADOS_Xfer ( int  access,
void *  fd,
IOR_size_t buffer,
IOR_offset_t  length,
IOR_param_t param 
)
static

Definition at line 186 of file aiori-RADOS.c.

References NULL, IOR_param_t::offset, RADOS_ERR, IOR_param_t::rados_ioctx, and WRITE.

Variable Documentation

◆ o

struct rados_options o
static
Initial value:
= {
.user = NULL,
.conf = NULL,
.pool = NULL,
}
#define NULL
Definition: iordef.h:79

Definition at line 37 of file aiori-RADOS.c.

◆ options

option_help options[]
static
Initial value:
= {
{0, "rados.user", "Username for the RADOS cluster", OPTION_REQUIRED_ARGUMENT, 's', & o.user},
{0, "rados.conf", "Config file for the RADOS cluster", OPTION_REQUIRED_ARGUMENT, 's', & o.conf},
{0, "rados.pool", "RADOS pool to use for I/O", OPTION_REQUIRED_ARGUMENT, 's', & o.pool},
}
#define LAST_OPTION
Definition: option.h:36
static struct rados_options o
Definition: aiori-RADOS.c:37

Definition at line 43 of file aiori-RADOS.c.

Referenced by RADOS_options().

◆ rados_aiori

ior_aiori_t rados_aiori
Initial value:
= {
.name = "RADOS",
.create = RADOS_Create,
.open = RADOS_Open,
.xfer = RADOS_Xfer,
.close = RADOS_Close,
.delete = RADOS_Delete,
.get_version = aiori_get_version,
.fsync = RADOS_Fsync,
.get_file_size = RADOS_GetFileSize,
.statfs = RADOS_StatFS,
.mkdir = RADOS_MkDir,
.rmdir = RADOS_RmDir,
.access = RADOS_Access,
.stat = RADOS_Stat,
.get_options = RADOS_options,
}
static IOR_offset_t RADOS_GetFileSize(IOR_param_t *, MPI_Comm, char *)
Definition: aiori-RADOS.c:262
static int RADOS_RmDir(const char *, IOR_param_t *)
Definition: aiori-RADOS.c:327
static void RADOS_Close(void *, IOR_param_t *)
Definition: aiori-RADOS.c:228
static void * RADOS_Create(char *, IOR_param_t *)
Definition: aiori-RADOS.c:173
static void RADOS_Fsync(void *, IOR_param_t *)
Definition: aiori-RADOS.c:223
static void * RADOS_Open(char *, IOR_param_t *)
Definition: aiori-RADOS.c:178
static void RADOS_Delete(char *, IOR_param_t *)
Definition: aiori-RADOS.c:239
char * aiori_get_version()
Definition: aiori.c:149
static int RADOS_Access(const char *, int, IOR_param_t *)
Definition: aiori-RADOS.c:333
static int RADOS_Stat(const char *, struct stat *, IOR_param_t *)
Definition: aiori-RADOS.c:357
static int RADOS_StatFS(const char *, ior_aiori_statfs_t *, IOR_param_t *)
Definition: aiori-RADOS.c:314
static IOR_offset_t RADOS_Xfer(int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
Definition: aiori-RADOS.c:186
static option_help * RADOS_options()
Definition: aiori-RADOS.c:92
static int RADOS_MkDir(const char *, mode_t, IOR_param_t *)
Definition: aiori-RADOS.c:321

Definition at line 68 of file aiori-RADOS.c.