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 64 #ifdef USE_MPIIO_AIORI 67 #ifdef USE_NCMPI_AIORI 73 #ifdef USE_S3_LIBS3_AIORI 76 #ifdef USE_S3_4C_AIORI 81 #ifdef USE_RADOS_AIORI 84 #ifdef USE_CEPHFS_AIORI 87 #ifdef USE_GFARM_AIORI 99 char * name = backend->
name;
101 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
119 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
121 if((*tmp)->get_options !=
NULL){
133 char delimiter =
' ';
139 if ((type ==
MDTEST) && !(*tmp)->enable_mdtest)
144 if (delimiter ==
' ')
146 APIs += sprintf(APIs,
"%s", (*tmp)->name);
150 APIs += sprintf(APIs,
"%c%s", delimiter, (*tmp)->name);
152 if ((*tmp)->name_legacy !=
NULL)
153 APIs_legacy += sprintf(APIs_legacy,
"%c%s",
154 delimiter, (*tmp)->name_legacy);
172 char * fileName = strdup(path);
174 int directoryFound =
FALSE;
177 i = strlen(fileName);
179 if (fileName[i] ==
'/') {
181 directoryFound =
TRUE;
186 if (directoryFound ==
FALSE) {
187 strcpy(fileName,
".");
191 #if defined(HAVE_STATVFS) 192 struct statvfs statfs_buf;
194 ret = statvfs (fileName, &statfs_buf);
196 struct statfs statfs_buf;
198 ret = statfs (fileName, &statfs_buf);
201 perror(
"POSIX couldn't call statvfs");
205 stat_buf->
f_bsize = statfs_buf.f_bsize;
206 stat_buf->
f_blocks = statfs_buf.f_blocks;
207 stat_buf->
f_bfree = statfs_buf.f_bfree;
208 stat_buf->
f_files = statfs_buf.f_files;
209 stat_buf->
f_ffree = statfs_buf.f_ffree;
217 return mkdir (path, mode);
227 return access (path, mode);
232 return stat (path, buf);
242 char warn_str[256] = {0};
246 (strcasecmp(api, (*tmp)->name) != 0) &&
247 (name_leg ==
NULL || strcasecmp(api, name_leg) != 0))
250 if (name_leg !=
NULL && strcasecmp(api, name_leg) == 0)
252 snprintf(warn_str, 256,
"%s backend is deprecated use %s" 253 " instead", api, (*tmp)->name);
257 if (
NULL == (*tmp)->statfs) {
259 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 260 " %s statfs call", api);
263 if (
NULL == (*tmp)->mkdir) {
265 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 266 " %s mkdir call", api);
269 if (
NULL == (*tmp)->rmdir) {
271 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 272 " %s rmdir call", api);
275 if (
NULL == (*tmp)->access) {
277 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 278 " %s access call", api);
281 if (
NULL == (*tmp)->stat) {
283 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 284 " %s stat call", api);
302 return available_aiori[0]->
name;
void * airoi_update_module_options(const ior_aiori_t *backend, options_all_t *opt)
aiori_mod_opt_t * defaults
ior_aiori_t * available_aiori[]
int aiori_posix_stat(const char *path, struct stat *buf, aiori_mod_opt_t *module_options)
const ior_aiori_t * aiori_select(const char *api)
char * aiori_get_version()
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
int aiori_posix_access(const char *path, int mode, aiori_mod_opt_t *module_options)
static options_all_t * global_options
int aiori_posix_rmdir(const char *path, aiori_mod_opt_t *module_options)
const char * aiori_default(void)
int aiori_posix_mkdir(const char *path, mode_t mode, aiori_mod_opt_t *module_options)
ior_aiori_t s3_plus_aiori
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t *module_options)
option_help *(* get_options)(aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
ior_aiori_t S3_libS3_aiori