22 #if defined(HAVE_STRINGS_H) 28 #if defined(HAVE_SYS_STATVFS_H) 29 #include <sys/statvfs.h> 32 #if defined(HAVE_SYS_STATFS_H) 33 #include <sys/statfs.h> 42 #ifdef USE_POSIX_AIORI 58 #ifdef USE_MPIIO_AIORI 61 #ifdef USE_NCMPI_AIORI 72 #ifdef USE_RADOS_AIORI 75 #ifdef USE_CEPHFS_AIORI 78 #ifdef USE_GFARM_AIORI 87 char * name = backend->
name;
89 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
106 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
108 if((*tmp)->get_options !=
NULL){
120 char delimiter =
' ';
124 if ((type ==
MDTEST) && !(*tmp)->enable_mdtest)
130 if (delimiter ==
' ')
132 APIs += sprintf(APIs,
"%s", (*tmp)->name);
136 APIs += sprintf(APIs,
"%c%s", delimiter, (*tmp)->name);
138 if ((*tmp)->name_legacy !=
NULL)
139 APIs_legacy += sprintf(APIs_legacy,
"%c%s",
140 delimiter, (*tmp)->name_legacy);
157 #if defined(HAVE_STATVFS) 158 struct statvfs statfs_buf;
160 ret = statvfs (path, &statfs_buf);
162 struct statfs statfs_buf;
164 ret = statfs (path, &statfs_buf);
170 stat_buf->
f_bsize = statfs_buf.f_bsize;
171 stat_buf->
f_blocks = statfs_buf.f_blocks;
172 stat_buf->
f_bfree = statfs_buf.f_bfree;
173 stat_buf->
f_files = statfs_buf.f_files;
174 stat_buf->
f_ffree = statfs_buf.f_ffree;
181 return mkdir (path, mode);
191 return access (path, mode);
196 return stat (path, buf);
225 ERR(
"No IO backends compiled into aiori. " 226 "Run 'configure --with-<backend>', and recompile.");
244 assert(params !=
NULL);
247 assert(test_backend !=
NULL);
292 char warn_str[256] = {0};
296 (strcasecmp(api, (*tmp)->name) != 0) &&
297 (name_leg ==
NULL || strcasecmp(api, name_leg) != 0))
300 if (name_leg !=
NULL && strcasecmp(api, name_leg) == 0)
302 snprintf(warn_str, 256,
"%s backend is deprecated use %s" 303 " instead", api, (*tmp)->name);
307 if (
NULL == (*tmp)->statfs) {
309 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 310 " %s statfs call", api);
313 if (
NULL == (*tmp)->mkdir) {
315 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 316 " %s mkdir call", api);
319 if (
NULL == (*tmp)->rmdir) {
321 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 322 " %s rmdir call", api);
325 if (
NULL == (*tmp)->access) {
327 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 328 " %s access call", api);
331 if (
NULL == (*tmp)->stat) {
333 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 334 " %s stat call", api);
352 return available_aiori[0]->
name;
static void init_or_fini_internal(const ior_aiori_t *test_backend, const bool init)
void * airoi_update_module_options(const ior_aiori_t *backend, options_all_t *opt)
option_help *(* get_options)(void **init_backend_options, void *init_values)
static bool is_initialized
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
ior_aiori_t * available_aiori[]
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
const ior_aiori_t * aiori_select(const char *api)
void aiori_initialize(IOR_test_t *tests)
char * aiori_get_version()
void aiori_finalize(IOR_test_t *tests)
options_all_t * airoi_create_all_module_options(option_help *global_options)
void aiori_supported_apis(char *APIs, char *APIs_legacy, enum bench_type type)
static const ior_aiori_t * backend
static void init_or_fini(IOR_test_t *tests, const bool init)
static options_all_t * global_options
const char * aiori_default(void)
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
const struct ior_aiori * backend
int aiori_posix_access(const char *path, int mode, IOR_param_t *param)
ior_aiori_t s3_plus_aiori