IOR
Functions | Variables
aiori.c File Reference
#include <assert.h>
#include <stdbool.h>
#include "aiori.h"
Include dependency graph for aiori.c:

Go to the source code of this file.

Functions

void * airoi_update_module_options (const ior_aiori_t *backend, options_all_t *opt)
 
options_all_tairoi_create_all_module_options (option_help *global_options)
 
void aiori_supported_apis (char *APIs, char *APIs_legacy, enum bench_type type)
 
int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
 
int aiori_posix_mkdir (const char *path, mode_t mode, IOR_param_t *param)
 
int aiori_posix_rmdir (const char *path, IOR_param_t *param)
 
int aiori_posix_access (const char *path, int mode, IOR_param_t *param)
 
int aiori_posix_stat (const char *path, struct stat *buf, IOR_param_t *param)
 
char * aiori_get_version ()
 
static void init_or_fini_internal (const ior_aiori_t *test_backend, const bool init)
 
static void init_or_fini (IOR_test_t *tests, const bool init)
 
void aiori_initialize (IOR_test_t *tests)
 
void aiori_finalize (IOR_test_t *tests)
 
const ior_aiori_taiori_select (const char *api)
 
int aiori_count (void)
 
const char * aiori_default (void)
 

Variables

ior_aiori_tavailable_aiori []
 
static bool is_initialized = false
 

Function Documentation

◆ aiori_count()

int aiori_count ( void  )

Definition at line 345 of file aiori.c.

References available_aiori.

Referenced by aiori_default(), airoi_create_all_module_options(), and init_or_fini().

Here is the caller graph for this function:

◆ aiori_default()

const char* aiori_default ( void  )

Definition at line 350 of file aiori.c.

References aiori_count(), ior_aiori::name, and NULL.

Referenced by init_IOR_Param_t().

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

◆ aiori_finalize()

void aiori_finalize ( IOR_test_t tests)

Finalize IO backends.

Parameters
[in]testsPointers to the first test

This function finalizes all backends which were used. If tests is NULL all available backends are finialized.

Definition at line 281 of file aiori.c.

References init_or_fini(), and is_initialized.

Referenced by ior_main(), and ior_run().

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

◆ aiori_get_version()

char* aiori_get_version ( void  )

Definition at line 200 of file aiori.c.

◆ aiori_initialize()

void aiori_initialize ( IOR_test_t tests)

Initialize IO backends.

Parameters
[in]testsPointers to the first test

This function initializes all backends which will be used. If tests is NULL all available backends are initialized.

Definition at line 263 of file aiori.c.

References init_or_fini(), and is_initialized.

Referenced by ior_main(), and ior_run().

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

◆ aiori_posix_access()

int aiori_posix_access ( const char *  path,
int  mode,
IOR_param_t param 
)

Definition at line 190 of file aiori.c.

Referenced by aiori_select().

Here is the caller graph for this function:

◆ aiori_posix_mkdir()

int aiori_posix_mkdir ( const char *  path,
mode_t  mode,
IOR_param_t param 
)

Definition at line 180 of file aiori.c.

Referenced by aiori_select().

Here is the caller graph for this function:

◆ aiori_posix_rmdir()

int aiori_posix_rmdir ( const char *  path,
IOR_param_t param 
)

Definition at line 185 of file aiori.c.

Referenced by aiori_select().

Here is the caller graph for this function:

◆ aiori_posix_stat()

int aiori_posix_stat ( const char *  path,
struct stat *  buf,
IOR_param_t param 
)

Definition at line 195 of file aiori.c.

Referenced by aiori_select().

Here is the caller graph for this function:

◆ aiori_posix_statfs()

int aiori_posix_statfs ( const char *  path,
ior_aiori_statfs_t stat_buf,
IOR_param_t param 
)

Default statfs implementation.

Parameters
[in]pathPath to run statfs on
[out]statfs_bufAIORI statfs buffer

This function provides a AIORI statfs for POSIX-compliant filesystems. It uses statvfs is available and falls back on statfs.

Definition at line 155 of file aiori.c.

References ior_aiori_statfs::f_bfree, ior_aiori_statfs::f_blocks, ior_aiori_statfs::f_bsize, ior_aiori_statfs::f_ffree, and ior_aiori_statfs::f_files.

Referenced by aiori_select().

Here is the caller graph for this function:

◆ aiori_select()

const ior_aiori_t* aiori_select ( const char *  api)

Definition at line 291 of file aiori.c.

References aiori_posix_access(), aiori_posix_mkdir(), aiori_posix_rmdir(), aiori_posix_stat(), aiori_posix_statfs(), ior_aiori::name_legacy, NULL, and WARN.

Referenced by DecodeDirective(), and updateParsedOptions().

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

◆ aiori_supported_apis()

void aiori_supported_apis ( char *  APIs,
char *  APIs_legacy,
enum bench_type  type 
)

Definition at line 118 of file aiori.c.

References available_aiori, MDTEST, and NULL.

Referenced by createGlobalOptions(), and mdtest_run().

Here is the caller graph for this function:

◆ airoi_create_all_module_options()

options_all_t* airoi_create_all_module_options ( option_help global_options)

Definition at line 99 of file aiori.c.

References aiori_count(), available_aiori, option_module::defaults, global_options, options_all_t::module_count, options_all_t::modules, NULL, option_module::options, and option_module::prefix.

Referenced by mdtest_run(), and ParseCommandLine().

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

◆ airoi_update_module_options()

void* airoi_update_module_options ( const ior_aiori_t backend,
options_all_t opt 
)

Definition at line 85 of file aiori.c.

References available_aiori, option_module::defaults, ior_aiori::get_options, options_all_t::modules, ior_aiori::name, NULL, option_module::options, and option_module::prefix.

Referenced by ReadConfigScript(), and updateParsedOptions().

Here is the caller graph for this function:

◆ init_or_fini()

static void init_or_fini ( IOR_test_t tests,
const bool  init 
)
static

Definition at line 222 of file aiori.c.

References aiori_count(), IOR_param_t::backend, ERR, init_or_fini_internal(), and NULL.

Referenced by aiori_finalize(), and aiori_initialize().

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

◆ init_or_fini_internal()

static void init_or_fini_internal ( const ior_aiori_t test_backend,
const bool  init 
)
static

Definition at line 207 of file aiori.c.

References ior_aiori::finalize, and ior_aiori::initialize.

Referenced by init_or_fini().

Here is the caller graph for this function:

Variable Documentation

◆ available_aiori

ior_aiori_t* available_aiori[]

◆ is_initialized

bool is_initialized = false
static

Definition at line 205 of file aiori.c.

Referenced by aiori_finalize(), and aiori_initialize().