IOR
|
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <libgen.h>
#include <mpi.h>
#include <gurt/common.h>
#include <gurt/hash.h>
#include <daos.h>
#include <daos_fs.h>
#include "aiori.h"
#include "utilities.h"
#include "iordef.h"
Go to the source code of this file.
Data Structures | |
struct | aiori_dir_hdl |
struct | DFS_options_t |
Macros | |
#define | _BSD_SOURCE |
#define | DCHECK(rc, format, ...) |
#define | INFO(level, format, ...) |
#define | GERR(format, ...) |
Enumerations | |
enum | handleType { POOL_HANDLE, CONT_HANDLE, DFS_HANDLE } |
Functions | |
static option_help * | DFS_options (aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values) |
static void | DFS_Init (aiori_mod_opt_t *) |
static void | DFS_Finalize (aiori_mod_opt_t *) |
static aiori_fd_t * | DFS_Create (char *, int, aiori_mod_opt_t *) |
static aiori_fd_t * | DFS_Open (char *, int, aiori_mod_opt_t *) |
static IOR_offset_t | DFS_Xfer (int, aiori_fd_t *, IOR_size_t *, IOR_offset_t, IOR_offset_t, aiori_mod_opt_t *) |
static void | DFS_Close (aiori_fd_t *, aiori_mod_opt_t *) |
static void | DFS_Delete (char *, aiori_mod_opt_t *) |
static char * | DFS_GetVersion () |
static void | DFS_Fsync (aiori_fd_t *, aiori_mod_opt_t *) |
static void | DFS_Sync (aiori_mod_opt_t *) |
static IOR_offset_t | DFS_GetFileSize (aiori_mod_opt_t *, char *) |
static int | DFS_Statfs (const char *, ior_aiori_statfs_t *, aiori_mod_opt_t *) |
static int | DFS_Stat (const char *, struct stat *, aiori_mod_opt_t *) |
static int | DFS_Mkdir (const char *, mode_t, aiori_mod_opt_t *) |
static int | DFS_Rmdir (const char *, aiori_mod_opt_t *) |
static int | DFS_Access (const char *, int, aiori_mod_opt_t *) |
static option_help * | DFS_options () |
static void | DFS_init_xfer_options (aiori_xfer_hint_t *) |
static int | DFS_check_params (aiori_mod_opt_t *) |
static struct aiori_dir_hdl * | hdl_obj (d_list_t *rlink) |
static bool | key_cmp (struct d_hash_table *htable, d_list_t *rlink, const void *key, unsigned int ksize) |
static void | rec_free (struct d_hash_table *htable, d_list_t *rlink) |
static void | HandleDistribute (enum handleType type) |
static int | parse_filename (const char *path, char **_obj_name, char **_cont_name) |
static void | share_file_handle (dfs_obj_t **file, MPI_Comm comm) |
static dfs_obj_t * | lookup_insert_dir (const char *name, mode_t *mode) |
Variables | |
dfs_t * | dfs |
static daos_handle_t | poh |
static daos_handle_t | coh |
static daos_oclass_id_t | objectClass |
static daos_oclass_id_t | dir_oclass |
static struct d_hash_table * | dir_hash |
static bool | dfs_init |
ior_aiori_t | dfs_aiori |
static aiori_xfer_hint_t * | hints = NULL |
static d_hash_table_ops_t | hdl_hash_ops |
#define _BSD_SOURCE |
Definition at line 13 of file aiori-DFS.c.
#define DCHECK | ( | rc, | |
format, | |||
... | |||
) |
Definition at line 160 of file aiori-DFS.c.
Referenced by DFS_Create(), DFS_Delete(), DFS_Finalize(), DFS_Init(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), DFS_Stat(), HandleDistribute(), lookup_insert_dir(), and share_file_handle().
#define GERR | ( | format, | |
... | |||
) |
Definition at line 179 of file aiori-DFS.c.
Referenced by DFS_Create(), DFS_Delete(), DFS_Init(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), DFS_Stat(), and lookup_insert_dir().
#define INFO | ( | level, | |
format, | |||
... | |||
) |
Definition at line 173 of file aiori-DFS.c.
Referenced by DFS_Finalize(), and DFS_Init().
enum handleType |
Enumerator | |
---|---|
POOL_HANDLE | |
CONT_HANDLE | |
DFS_HANDLE |
Definition at line 53 of file aiori-DFS.c.
|
static |
just close if it's a file
Definition at line 936 of file aiori-DFS.c.
References lookup_insert_dir(), and NULL.
Referenced by DFS_options().
|
static |
Definition at line 192 of file aiori-DFS.c.
References DFS_options_t::cont, ERR, NULL, o, DFS_options_t::pool, and DFS_options_t::svcl.
Referenced by DFS_options().
|
static |
Definition at line 791 of file aiori-DFS.c.
Referenced by DFS_options().
|
static |
Definition at line 626 of file aiori-DFS.c.
References DFS_options_t::chunk_size, DCHECK, dfs, aiori_xfer_hint_t::filePerProc, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, o, objectClass, parse_filename(), rank, rc, share_file_handle(), and testComm.
Referenced by DFS_options().
|
static |
Definition at line 800 of file aiori-DFS.c.
References DCHECK, dfs, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, parse_filename(), and rc.
Referenced by DFS_options().
|
static |
reset tunables
Definition at line 553 of file aiori-DFS.c.
References DFS_options_t::chunk_size, coh, DFS_options_t::cont, DCHECK, DFS_options_t::destroy, dfs, dfs_init, dir_hash, dir_oclass, DFS_options_t::dir_oclass, DFS_options_t::group, INFO, MPI_CHECK, NULL, o, objectClass, DFS_options_t::oclass, poh, DFS_options_t::pool, DFS_options_t::prefix, rank, rc, DFS_options_t::svcl, testComm, and VERBOSE_1.
Referenced by DFS_options().
|
static |
Definition at line 769 of file aiori-DFS.c.
References dfs.
Referenced by DFS_options().
|
static |
Definition at line 837 of file aiori-DFS.c.
References dfs, aiori_xfer_hint_t::filePerProc, NULL, rank, rc, testComm, and TRUE.
Referenced by DFS_options().
|
static |
Definition at line 825 of file aiori-DFS.c.
Referenced by DFS_options().
|
static |
in case we are already initialized, return
shouldn't be fatal since it can be called with POSIX backend selection
Connect to DAOS pool
Definition at line 456 of file aiori-DFS.c.
References coh, DFS_options_t::cont, CONT_HANDLE, DCHECK, dfs, DFS_HANDLE, dfs_init, dir_hash, dir_oclass, DFS_options_t::dir_oclass, ERR, GERR, DFS_options_t::group, HandleDistribute(), hdl_hash_ops, INFO, NULL, o, objectClass, DFS_options_t::oclass, poh, DFS_options_t::pool, POOL_HANDLE, DFS_options_t::prefix, rank, rc, DFS_options_t::svcl, and VERBOSE_1.
Referenced by DFS_options().
|
static |
Definition at line 187 of file aiori-DFS.c.
Referenced by DFS_options().
|
static |
Definition at line 879 of file aiori-DFS.c.
References DCHECK, dfs, dir_oclass, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, parse_filename(), and rc.
Referenced by DFS_options().
|
static |
Definition at line 669 of file aiori-DFS.c.
References DFS_options_t::chunk_size, DCHECK, dfs, aiori_xfer_hint_t::filePerProc, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, o, objectClass, parse_filename(), rank, rc, share_file_handle(), and testComm.
Referenced by DFS_options().
|
static |
Definition at line 74 of file aiori-DFS.c.
References DFS_options_t::chunk_size, DFS_options_t::cont, DFS_options_t::destroy, DFS_Access(), DFS_check_params(), DFS_Close(), DFS_Create(), DFS_Delete(), DFS_Finalize(), DFS_Fsync(), DFS_GetFileSize(), DFS_GetVersion(), DFS_Init(), DFS_init_xfer_options(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), DFS_Stat(), DFS_Statfs(), DFS_Sync(), DFS_Xfer(), DFS_options_t::dir_oclass, DFS_options_t::group, LAST_OPTION, NULL, o, DFS_options_t::oclass, OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, DFS_options_t::pool, DFS_options_t::prefix, and DFS_options_t::svcl.
|
static |
|
static |
Definition at line 907 of file aiori-DFS.c.
References DCHECK, dfs, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, parse_filename(), and rc.
Referenced by DFS_options().
|
static |
Definition at line 953 of file aiori-DFS.c.
References DCHECK, dfs, GERR, lookup_insert_dir(), aiori_dir_hdl::name, NULL, parse_filename(), and rc.
Referenced by DFS_options().
|
static |
Definition at line 873 of file aiori-DFS.c.
Referenced by DFS_options().
|
static |
Definition at line 780 of file aiori-DFS.c.
References dfs.
Referenced by DFS_options().
|
static |
set memory location
Definition at line 712 of file aiori-DFS.c.
References dfs, ERR, MAX_RETRY, NULL, rc, aiori_xfer_hint_t::singleXferAttempt, TRUE, and WRITE.
Referenced by DFS_options().
|
static |
Definition at line 237 of file aiori-DFS.c.
References coh, CONT_HANDLE, DCHECK, dfs, DFS_HANDLE, ERR, MPI_CHECK, NULL, poh, POOL_HANDLE, rank, rc, and testComm.
Referenced by DFS_Init().
|
static |
Definition at line 206 of file aiori-DFS.c.
References aiori_dir_hdl::entry.
Referenced by key_cmp(), lookup_insert_dir(), and rec_free().
|
static |
Definition at line 212 of file aiori-DFS.c.
References hdl_obj(), and aiori_dir_hdl::name.
|
static |
Definition at line 423 of file aiori-DFS.c.
References DCHECK, dfs, dir_hash, aiori_dir_hdl::entry, GERR, hdl_obj(), aiori_dir_hdl::name, NULL, aiori_dir_hdl::oh, PATH_MAX, and rc.
Referenced by DFS_Access(), DFS_Create(), DFS_Delete(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), and DFS_Stat().
|
static |
Definition at line 293 of file aiori-DFS.c.
Referenced by DFS_Create(), DFS_Delete(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), and DFS_Stat().
|
static |
Definition at line 221 of file aiori-DFS.c.
References aiori_dir_hdl::entry, hdl_obj(), and aiori_dir_hdl::oh.
|
static |
Definition at line 384 of file aiori-DFS.c.
References DCHECK, dfs, ERR, MPI_CHECK, NULL, rank, rc, and testComm.
Referenced by DFS_Create(), and DFS_Open().
|
static |
Definition at line 41 of file aiori-DFS.c.
Referenced by DFS_Finalize(), DFS_Init(), and HandleDistribute().
dfs_t* dfs |
Definition at line 40 of file aiori-DFS.c.
Referenced by DFS_Create(), DFS_Delete(), DFS_Finalize(), DFS_Fsync(), DFS_GetFileSize(), DFS_Init(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), DFS_Stat(), DFS_Sync(), DFS_Xfer(), HandleDistribute(), lookup_insert_dir(), and share_file_handle().
ior_aiori_t dfs_aiori |
Definition at line 133 of file aiori-DFS.c.
|
static |
Definition at line 45 of file aiori-DFS.c.
Referenced by DFS_Finalize(), and DFS_Init().
|
static |
Definition at line 44 of file aiori-DFS.c.
Referenced by DFS_Finalize(), DFS_Init(), and lookup_insert_dir().
|
static |
Definition at line 43 of file aiori-DFS.c.
Referenced by DFS_Finalize(), DFS_Init(), and DFS_Mkdir().
|
static |
Definition at line 230 of file aiori-DFS.c.
Referenced by DFS_Init().
|
static |
Definition at line 185 of file aiori-DFS.c.
|
static |
Definition at line 42 of file aiori-DFS.c.
Referenced by DFS_Create(), DFS_Finalize(), DFS_Init(), and DFS_Open().
|
static |
Definition at line 41 of file aiori-DFS.c.
Referenced by DFS_Finalize(), DFS_Init(), and HandleDistribute().