17 #if defined(HAVE_SYS_STATVFS_H) 18 #include <sys/statvfs.h> 21 #if defined(HAVE_SYS_STATFS_H) 22 #include <sys/statfs.h> 31 #ifdef USE_POSIX_AIORI 44 #ifdef USE_MPIIO_AIORI 47 #ifdef USE_NCMPI_AIORI 58 #ifdef USE_RADOS_AIORI 72 for (
int i=1; *tmp !=
NULL; ++tmp, i++) {
74 if((*tmp)->get_options !=
NULL){
87 APIs += sprintf(APIs,
"%s", (*tmp)->name);
89 for (; *tmp !=
NULL; ++tmp) {
90 APIs += sprintf(APIs,
"|%s", (*tmp)->name);
107 #if defined(HAVE_STATVFS) 108 struct statvfs statfs_buf;
110 ret = statvfs (path, &statfs_buf);
112 struct statfs statfs_buf;
114 ret = statfs (path, &statfs_buf);
120 stat_buf->
f_bsize = statfs_buf.f_bsize;
121 stat_buf->
f_blocks = statfs_buf.f_blocks;
122 stat_buf->
f_bfree = statfs_buf.f_bfree;
123 stat_buf->
f_files = statfs_buf.f_files;
124 stat_buf->
f_ffree = statfs_buf.f_ffree;
131 return mkdir (path, mode);
141 return access (path, mode);
146 return stat (path, buf);
162 ERR(
"No IO backends compiled into aiori. " 163 "Run 'configure --with-<backend>', and recompile.");
167 if((*tmp)->initialize){
168 (*tmp)->initialize();
178 if((*tmp)->finalize){
186 char warn_str[256] = {0};
188 if (
NULL == api || strcasecmp(api, (*tmp)->name) == 0) {
189 if (
NULL == (*tmp)->statfs) {
191 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 192 " %s statfs call", api);
195 if (
NULL == (*tmp)->mkdir) {
197 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 198 " %s mkdir call", api);
201 if (
NULL == (*tmp)->rmdir) {
203 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 204 " %s rmdir call", api);
207 if (
NULL == (*tmp)->access) {
209 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 210 " %s access call", api);
213 if (
NULL == (*tmp)->stat) {
215 snprintf(warn_str, 256,
"assuming POSIX-based backend for" 216 " %s stat call", api);
234 return available_aiori[0]->
name;
static int is_initialized
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
int option_parse(int argc, char **argv, options_all *opt_all)
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
ior_aiori_t * available_aiori[]
void aiori_supported_apis(char *APIs)
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)
char * aiori_get_version()
const char * aiori_default(void)
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
int(* statfs)(const char *, ior_aiori_statfs_t *, IOR_param_t *param)
int aiori_posix_access(const char *path, int mode, IOR_param_t *param)
void airoi_parse_options(int argc, char **argv, option_help *global_options)
ior_aiori_t s3_plus_aiori