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 96 char * name = backend->
name;
98 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
116 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
118 if((*tmp)->get_options !=
NULL){
130 char delimiter =
' ';
136 if ((type ==
MDTEST) && !(*tmp)->enable_mdtest)
141 if (delimiter ==
' ')
143 APIs += sprintf(APIs,
"%s", (*tmp)->name);
147 APIs += sprintf(APIs,
"%c%s", delimiter, (*tmp)->name);
149 if ((*tmp)->name_legacy !=
NULL)
150 APIs_legacy += sprintf(APIs_legacy,
"%c%s",
151 delimiter, (*tmp)->name_legacy);
169 char * fileName = strdup(path);
171 int directoryFound =
FALSE;
174 i = strlen(fileName);
176 if (fileName[i] ==
'/') {
178 directoryFound =
TRUE;
183 if (directoryFound ==
FALSE) {
184 strcpy(fileName,
".");
188 #if defined(HAVE_STATVFS) 189 struct statvfs statfs_buf;
191 ret = statvfs (fileName, &statfs_buf);
193 struct statfs statfs_buf;
195 ret = statfs (fileName, &statfs_buf);
198 perror(
"POSIX couldn't call statvfs");
202 stat_buf->
f_bsize = statfs_buf.f_bsize;
203 stat_buf->
f_blocks = statfs_buf.f_blocks;
204 stat_buf->
f_bfree = statfs_buf.f_bfree;
205 stat_buf->
f_files = statfs_buf.f_files;
206 stat_buf->
f_ffree = statfs_buf.f_ffree;
214 return mkdir (path, mode);
224 return access (path, mode);
229 return stat (path, buf);
239 char warn_str[256] = {0};
243 (strcasecmp(api, (*tmp)->name) != 0) &&
244 (name_leg ==
NULL || strcasecmp(api, name_leg) != 0))
247 if (name_leg !=
NULL && strcasecmp(api, name_leg) == 0)
249 snprintf(warn_str, 256,
"%s backend is deprecated use %s" 250 " instead", api, (*tmp)->name);
254 if (
NULL == (*tmp)->statfs) {
256 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 257 " %s statfs call", api);
260 if (
NULL == (*tmp)->mkdir) {
262 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 263 " %s mkdir call", api);
266 if (
NULL == (*tmp)->rmdir) {
268 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 269 " %s rmdir call", api);
272 if (
NULL == (*tmp)->access) {
274 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 275 " %s access call", api);
278 if (
NULL == (*tmp)->stat) {
280 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 281 " %s stat call", api);
299 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