8000 DFS driver update to share DFS mount on init by mchaarawi · Pull Request #221 · hpc/ior · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DFS driver update to share DFS mount on init #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ AC_ARG_WITH([cart],

AS_IF([test "x$with_cart" != xno], [
CART="yes"
LDFLAGS="$LDFLAGS -L$with_cart/lib64 -Wl,--enable-new-dtags -Wl,-rpath=$with_cart/lib64"
LDFLAGS="$LDFLAGS -L$with_cart/lib -Wl,--enable-new-dtags -Wl,-rpath=$with_cart/lib"
CPPFLAGS="$CPPFLAGS -I$with_cart/include/"
AC_CHECK_HEADERS(gurt/common.h,, [unset CART])
Expand Down
35 changes: 21 additions & 14 deletions src/aiori-DFS.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct aiori_dir_hdl {
enum handleType {
POOL_HANDLE,
CONT_HANDLE,
ARRAY_HANDLE
DFS_HANDLE
};

/************************** O P T I O N S *****************************/
Expand Down Expand Up @@ -194,7 +194,7 @@ static d_hash_table_ops_t hdl_hash_ops = {

/* Distribute process 0's pool or container handle to others. */
static void
HandleDistribute(daos_handle_t *handle, enum handleType type)
HandleDistribute(enum handleType type)
{
d_iov_t global;
int rc;
Expand All @@ -203,13 +203,15 @@ HandleDistribute(daos_handle_t *handle, enum handleType type)
global.iov_buf_len = 0;
global.iov_len = 0;

assert(type == POOL_HANDLE || type == CONT_HANDLE);
assert(type == POOL_HANDLE || type == CONT_HANDLE || type == DFS_HANDLE);
if (rank == 0) {
/* Get the global handle size. */
if (type == POOL_HANDLE)
rc = daos_pool_local2global(*handle, &global);
rc = daos_pool_local2global(poh, &global);
else if (type == CONT_HANDLE)
rc = daos_cont_local2global(coh, &global);
else
rc = daos_cont_local2global(*handle, &global);
rc = dfs_local2global(dfs, &global);
DCHECK(rc, "Failed to get global handle size");
}

Expand All @@ -224,9 +226,11 @@ HandleDistribute(daos_handle_t *handle, enum handleType type)

if (rank == 0) {
if (type == POOL_HANDLE)
rc = daos_pool_local2global(*handle, &global);
rc = daos_pool_local2global(poh, &global);
else if (type == CONT_HANDLE)
rc = daos_cont_local2global(coh, &global);
else
rc = daos_cont_local2global(*handle, &global);
rc = dfs_local2global(dfs, &global);
DCHECK(rc, "Failed to create global handle");
}

Expand All @@ -236,9 +240,11 @@ HandleDistribute(daos_handle_t *handle, enum handleType type)

if (rank != 0) {
if (type == POOL_HANDLE)
rc = daos_pool_global2local(global, handle);
rc = daos_pool_global2local(global, &poh);
else if (type == CONT_HANDLE)
rc = daos_cont_global2local(poh, global, &coh);
else
rc = daos_cont_global2local(poh, global, handle);
rc = dfs_global2local(poh, coh, 0, global, &dfs);
DCHECK(rc, "Failed to get local handle");
}

Expand Down Expand Up @@ -435,13 +441,14 @@ DFS_Init() {
} else if (rc) {
DCHECK(rc, "Failed to create container");
}
}

HandleDistribute(&poh, POOL_HANDLE);
HandleDistribute(&coh, CONT_HANDLE);
rc = dfs_mount(poh, coh, O_RDWR, &dfs);
DCHECK(rc, "Failed to mount DFS namespace");
}

rc = dfs_mount(poh, coh, O_RDWR, &dfs);
DCHECK(rc, "Failed to mount DFS namespace");
HandleDistribute(POOL_HANDLE);
HandleDistribute(CONT_HANDLE);
HandleDistribute(DFS_HANDLE);

if (o.prefix) {
rc = dfs_set_prefix(dfs, o.prefix);
Expand Down
0