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 59 #ifdef USE_MPIIO_AIORI 62 #ifdef USE_NCMPI_AIORI 73 #ifdef USE_RADOS_AIORI 76 #ifdef USE_CEPHFS_AIORI 79 #ifdef USE_GFARM_AIORI 88 char * name = backend->
name;
90 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
107 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
109 if((*tmp)->get_options !=
NULL){
121 char delimiter =
' ';
125 if ((type ==
MDTEST) && !(*tmp)->enable_mdtest)
131 if (delimiter ==
' ')
133 APIs += sprintf(APIs,
"%s", (*tmp)->name);
137 APIs += sprintf(APIs,
"%c%s", delimiter, (*tmp)->name);
139 if ((*tmp)->name_legacy !=
NULL)
140 APIs_legacy += sprintf(APIs_legacy,
"%c%s",
141 delimiter, (*tmp)->name_legacy);
158 #if defined(HAVE_STATVFS) 159 struct statvfs statfs_buf;
161 ret = statvfs (path, &statfs_buf);
163 struct statfs statfs_buf;
165 ret = statfs (path, &statfs_buf);
171 stat_buf->
f_bsize = statfs_buf.f_bsize;
172 stat_buf->
f_blocks = statfs_buf.f_blocks;
173 stat_buf->
f_bfree = statfs_buf.f_bfree;
174 stat_buf->
f_files = statfs_buf.f_files;
175 stat_buf->
f_ffree = statfs_buf.f_ffree;
182 return mkdir (path, mode);
192 return access (path, mode);
197 return stat (path, buf);
226 ERR(
"No IO backends compiled into aiori. " 227 "Run 'configure --with-<backend>', and recompile.");
245 assert(params !=
NULL);
248 assert(test_backend !=
NULL);
293 char warn_str[256] = {0};
297 (strcasecmp(api, (*tmp)->name) != 0) &&
298 (name_leg ==
NULL || strcasecmp(api, name_leg) != 0))
301 if (name_leg !=
NULL && strcasecmp(api, name_leg) == 0)
303 snprintf(warn_str, 256,
"%s backend is deprecated use %s" 304 " instead", api, (*tmp)->name);
308 if (
NULL == (*tmp)->statfs) {
310 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 311 " %s statfs call", api);
314 if (
NULL == (*tmp)->mkdir) {
316 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 317 " %s mkdir call", api);
320 if (
NULL == (*tmp)->rmdir) {
322 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 323 " %s rmdir call", api);
326 if (
NULL == (*tmp)->access) {
328 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 329 " %s access call", api);
332 if (
NULL == (*tmp)->stat) {
334 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 335 " %s stat call", api);
353 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