From 93d3664fc9108684d364b70b6eca8f78284f3726 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 19 Jul 2013 16:47:14 -0500 Subject: [svn-r23922] Add a new utility routine to traverse an entire path and open the last component: - update usage of the traversal routines through all server code Update Link implementations to the changes made: - Handle Soft links in traversal - store soft link value in metadata Comment out parts that require IOD to be present. --- src/CMakeLists.txt | 1 + src/H5VLiod_attr.c | 132 ++++------ src/H5VLiod_dset.c | 46 +--- src/H5VLiod_dtype.c | 46 ++-- src/H5VLiod_group.c | 49 +--- src/H5VLiod_link.c | 206 ++++++++++----- src/H5VLiod_map.c | 42 +-- src/H5VLiod_obj.c | 205 ++++---------- src/H5VLiod_server.c | 733 --------------------------------------------------- src/H5VLiod_server.h | 4 + src/Makefile.am | 2 +- src/Makefile.in | 18 +- 12 files changed, 303 insertions(+), 1181 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b8137a..9daa7e1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -641,6 +641,7 @@ IF (HDF5_ENABLE_EFF) ${HDF5_SRC_DIR}/H5VLiod.c ${HDF5_SRC_DIR}/H5VLiod_client.c ${HDF5_SRC_DIR}/H5VLiod_server.c + ${HDF5_SRC_DIR}/H5VLiod_util.c ${HDF5_SRC_DIR}/H5VLiod_file.c ${HDF5_SRC_DIR}/H5VLiod_group.c ${HDF5_SRC_DIR}/H5VLiod_dset.c diff --git a/src/H5VLiod_attr.c b/src/H5VLiod_attr.c index 4b9d74c..dc17968 100644 --- a/src/H5VLiod_attr.c +++ b/src/H5VLiod_attr.c @@ -51,11 +51,10 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ iod_obj_id_t attr_id = input->attr_id; /* The ID of the attribute that needs to be created */ - iod_handle_t attr_oh, attr_kv_oh, cur_oh, mdkv_oh; /* object handles */ - iod_obj_id_t cur_id, mdkv_id; + iod_handle_t attr_oh, attr_kv_oh, obj_oh, mdkv_oh; /* object handles */ + iod_obj_id_t obj_id, mdkv_id; const char *loc_name = input->path; /* path to start hierarchy traversal */ const char *attr_name = input->attr_name; /* attribute's name */ - char *last_comp = NULL; /* the last component's name where attribute is created */ iod_array_struct_t array; /* IOD array structure for attribute's creation */ iod_size_t *max_dims; /* MAX dims for IOD */ scratch_pad_t sp; @@ -69,12 +68,9 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start attribute Create %s on object path %s\n", attr_name, loc_name); #endif - /* the traversal will retrieve the location where the attribute needs - to be created. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Open the object where the attribute needs to be created. */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* Set the IOD array creation parameters */ array.cell_size = H5Tget_size(input->type_id); @@ -145,7 +141,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); /* get scratch pad of the parent */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the attribute KV in scratch pad */ @@ -164,17 +160,17 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, /* close parent group if it is not the location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + if(loc_handle.cookie != obj_oh.cookie) { + iod_obj_close(obj_oh, NULL, NULL); } #if H5_DO_NATIVE - cur_oh.cookie = H5Acreate2(cur_oh.cookie, attr_name, input->type_id, + obj_oh.cookie = H5Acreate2(obj_oh.cookie, attr_name, input->type_id, input->space_id, H5P_DEFAULT, H5P_DEFAULT); - HDassert(cur_oh.cookie); + HDassert(obj_oh.cookie); #endif - output.iod_oh = cur_oh; + output.iod_oh = obj_oh; #if H5VL_IOD_DEBUG fprintf(stderr, "Done with attr create, sending response to client\n"); @@ -194,7 +190,6 @@ done: if(array.current_dims) free(array.current_dims); input = (attr_create_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_attr_create_cb() */ @@ -225,12 +220,11 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* container handle */ iod_handle_t loc_handle = input->loc_oh; /* location handle to start traversal */ iod_obj_id_t loc_id = input->loc_id; /* location ID */ - iod_handle_t attr_kv_oh, cur_oh, mdkv_oh; - iod_obj_id_t cur_id; + iod_handle_t attr_kv_oh, attr_oh, obj_oh, mdkv_oh; + iod_obj_id_t obj_id; iod_obj_id_t attr_id; const char *loc_name = input->path; /* current path to start traversal */ const char *attr_name = input->attr_name; /* attribute's name to open */ - char *last_comp = NULL; /* name of last object in path */ scratch_pad_t sp; iod_size_t kv_size = sizeof(H5VL_iod_link_t); H5VL_iod_link_t iod_link; @@ -242,15 +236,12 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start attribute Open %s\n", attr_name); #endif - /* the traversal will retrieve the location where the attribute needs - to be opened. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Open the object where the attribute needs to be opened. */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); - /* get scratch pad of the parent */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + /* get scratch pad of the object */ + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* MSC - Dont do this check until we have a real IOD */ @@ -273,18 +264,18 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, /* close parent group if it is not the location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + if(loc_handle.cookie != obj_oh.cookie) { + iod_obj_close(obj_oh, NULL, NULL); } - + /* close the attribute KV holder */ iod_obj_close(attr_kv_oh, NULL, NULL); /* open the attribute */ - if (iod_obj_open_write(coh, attr_id, NULL /*hints*/, &cur_oh, NULL) < 0) + if (iod_obj_open_write(coh, attr_id, NULL /*hints*/, &attr_oh, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); /* get scratch pad of the attribute */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(attr_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad of the attribute */ @@ -312,13 +303,13 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, #if H5_DO_NATIVE printf("attr name %s location %d %s\n", attr_name, loc_handle.cookie, loc_name); if(strcmp(loc_name, ".") == 0) - cur_oh.cookie = H5Aopen(loc_handle.cookie, attr_name, H5P_DEFAULT); + attr_oh.cookie = H5Aopen(loc_handle.cookie, attr_name, H5P_DEFAULT); else - cur_oh.cookie = H5Aopen_by_name(loc_handle.cookie, loc_name, + attr_oh.cookie = H5Aopen_by_name(loc_handle.cookie, loc_name, attr_name, H5P_DEFAULT, H5P_DEFAULT); - HDassert(cur_oh.cookie); - output.space_id = H5Aget_space(cur_oh.cookie); - output.type_id = H5Aget_type(cur_oh.cookie); + HDassert(attr_oh.cookie); + output.space_id = H5Aget_space(attr_oh.cookie); + output.type_id = H5Aget_type(attr_oh.cookie); output.acpl_id = H5P_ATTRIBUTE_CREATE_DEFAULT; #else /* fake a dataspace, type, and dcpl */ @@ -330,7 +321,7 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, } output.iod_id = attr_id; - output.iod_oh = cur_oh; + output.iod_oh = attr_oh; #if H5VL_IOD_DEBUG fprintf(stderr, "Done with attr open, sending response to client\n"); @@ -350,7 +341,6 @@ done: input = (attr_open_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_attr_open_cb() */ @@ -677,12 +667,11 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* container handle */ iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ - iod_handle_t cur_oh; /* current object handle accessed */ + iod_handle_t obj_oh; /* current object handle accessed */ iod_handle_t attr_kv_oh; /* KV handle holding attributes for object */ - iod_obj_id_t cur_id, attr_id; + iod_obj_id_t obj_id, attr_id; const char *loc_name = input->path; /* path to start hierarchy traversal */ const char *attr_name = input->attr_name; /* attribute's name */ - char *last_comp = NULL; /* the last component's name where attribute is created */ scratch_pad_t sp; iod_size_t kv_size = sizeof(H5VL_iod_link_t); H5VL_iod_link_t iod_link; @@ -695,21 +684,18 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start attribute Exists %s\n", attr_name); #endif - /* the traversal will retrieve the location where the attribute needs - to be checked. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Open the object where the attribute needs to be checked. */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the parent */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* close parent group if it is not the location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + if(loc_handle.cookie != obj_oh.cookie) { + iod_obj_close(obj_oh, NULL, NULL); } /* MSC - Dont do this check until we have a real IOD */ @@ -753,7 +739,6 @@ done: input = (attr_op_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_attr_exists_cb() */ @@ -783,13 +768,12 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* container handle */ iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ - iod_handle_t cur_oh; /* current object handle accessed */ + iod_handle_t obj_oh; /* current object handle accessed */ iod_handle_t attr_kv_oh; /* KV handle holding attributes for object */ - iod_obj_id_t cur_id, attr_id; + iod_obj_id_t obj_id, attr_id; const char *loc_name = input->path; /* path to start hierarchy traversal */ const char *old_name = input->old_attr_name; const char *new_name = input->new_attr_name; - char *last_comp = NULL; /* the last component's name where attribute is created */ iod_kv_params_t kvs; /* KV lists for objects - used to unlink attribute object */ iod_kv_t kv; /* KV entry */ iod_size_t kv_size = sizeof(H5VL_iod_link_t); @@ -803,21 +787,18 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start attribute Rename %s to %s\n", old_name, new_name); #endif - /* the traversal will retrieve the location where the attribute - needs to be renamed. The traversal will fail if an intermediate - group does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Open the object where the attribute needs to be checked. */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the parent */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* close parent group if it is not the location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + if(loc_handle.cookie != obj_oh.cookie) { + iod_obj_close(obj_oh, NULL, NULL); } /* MSC - Dont do this check until we have a real IOD */ @@ -867,7 +848,6 @@ done: input = (attr_rename_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_attr_rename_cb() */ @@ -897,12 +877,11 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* container handle */ iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ - iod_handle_t cur_oh; /* current object handle accessed */ + iod_handle_t obj_oh; /* current object handle accessed */ iod_handle_t attr_kv_oh; /* KV handle holding attributes for object */ - iod_obj_id_t cur_id, attr_id; + iod_obj_id_t obj_id, attr_id; const char *loc_name = input->path; /* path to start hierarchy traversal */ const char *attr_name = input->attr_name; /* attribute's name */ - char *last_comp = NULL; /* the last component's name where attribute is created */ iod_kv_params_t kvs; iod_kv_t kv; iod_size_t kv_size = sizeof(H5VL_iod_link_t); @@ -916,21 +895,18 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start attribute Remove %s\n", attr_name); #endif - /* the traversal will retrieve the location where the attribute - needs to be removed. The traversal will fail if an intermediate - group does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Open the object where the attribute needs to be checked. */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the parent */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* close parent group if it is not the location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + if(loc_handle.cookie != obj_oh.cookie) { + iod_obj_close(obj_oh, NULL, NULL); } /* MSC - Dont do this check until we have a real IOD */ @@ -956,7 +932,6 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, kvs.kv = &kv; if(iod_kv_unlink_keys(attr_kv_oh,IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair"); - if(iod_obj_unlink(coh, attr_id, IOD_TID_UNKNOWN, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object"); @@ -973,7 +948,6 @@ done: input = (attr_op_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_attr_remove_cb() */ diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c index de516e1..d7a16a6 100644 --- a/src/H5VLiod_dset.c +++ b/src/H5VLiod_dset.c @@ -244,12 +244,8 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ iod_obj_id_t dset_id; /* ID of the dataset to open */ + iod_handle_t dset_oh, mdkv_oh; const char *name = input->name; /* name of dset including path to open */ - char *last_comp; /* the name of the dataset obtained from the last component in the path */ - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id; - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; scratch_pad_t sp; herr_t ret_value = SUCCEED; @@ -259,31 +255,12 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start dataset Open %s\n", name); #endif - /* the traversal will retrieve the location where the dataset needs - to be opened. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, - &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve Array ID from parent KV store"); - - dset_id = iod_link.iod_id; - - /* close parent group and its scratch pad if it is not the - location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the dataset */ - if (iod_obj_open_write(coh, dset_id, NULL /*hints*/, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open dataset"); + /* Traverse Path and open dset */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &dset_id, &dset_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the dataset */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(dset_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -319,10 +296,10 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, #if H5_DO_NATIVE printf("dataset name %s location %d\n", name, loc_handle.cookie); - cur_oh.cookie = H5Dopen(loc_handle.cookie, name, input->dapl_id); - HDassert(cur_oh.cookie); - output.space_id = H5Dget_space(cur_oh.cookie); - output.type_id = H5Dget_type(cur_oh.cookie); + dset_oh.cookie = H5Dopen(loc_handle.cookie, name, input->dapl_id); + HDassert(dset_oh.cookie); + output.space_id = H5Dget_space(dset_oh.cookie); + output.type_id = H5Dget_type(dset_oh.cookie); output.dcpl_id = H5P_DATASET_CREATE_DEFAULT; #else /* fake a dataspace, type, and dcpl */ @@ -330,7 +307,7 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, output.space_id = H5Screate_simple(1, dims, NULL); output.type_id = H5Tcopy(H5T_NATIVE_INT); output.dcpl_id = H5P_DATASET_CREATE_DEFAULT; - cur_oh.cookie = 1; + dset_oh.cookie = 1; #endif #if 0 @@ -360,7 +337,7 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, dset_id = 1; output.iod_id = dset_id; - output.iod_oh.cookie = cur_oh.cookie; + output.iod_oh.cookie = dset_oh.cookie; #if H5VL_IOD_DEBUG fprintf(stderr, "Done with dset open, sending response to client\n"); @@ -380,7 +357,6 @@ done: input = (dset_open_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_dset_open_cb() */ diff --git a/src/H5VLiod_dtype.c b/src/H5VLiod_dtype.c index e3fd78d..a8c029c 100644 --- a/src/H5VLiod_dtype.c +++ b/src/H5VLiod_dtype.c @@ -252,42 +252,26 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t loc_handle = input->loc_oh; /* location handle to start lookup */ iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ iod_obj_id_t dtype_id; /* ID of datatype to open */ - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id, mdkv_id; + iod_handle_t dtype_oh, mdkv_oh; const char *name = input->name; /* name of dtype including path to open */ - char *last_comp; /* the name of the datatype obtained from the last component in the path */ size_t buf_size; /* size of serialized datatype */ void *buf = NULL; iod_mem_desc_t mem_desc; /* memory descriptor used for reading */ iod_blob_iodesc_t file_desc; /* file descriptor used to write */ - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; scratch_pad_t sp; + iod_size_t kv_size; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT fprintf(stderr, "Start datatype Open %s\n", name); - /* the traversal will retrieve the location where the datatype needs - to be opened. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, - &kv_size , NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve BLOB ID from parent KV store"); - - dtype_id = iod_link.iod_id; - - /* open the datatype */ - if (iod_obj_open_write(coh, dtype_id, NULL /*hints*/, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open datatype"); + /* Traverse Path and open dtype */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &dtype_id, &dtype_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the datatype */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(dtype_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -299,13 +283,16 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, NULL, NULL, &output.tcpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve tcpl"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, H5VL_IOD_KEY_OBJ_LINK_COUNT, + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, NULL, NULL, &output.link_count) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); + kv_size = sizeof(iod_size_t); + /* retrieve blob size metadata from scratch pad */ if(iod_kv_get_value(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size, - sizeof(iod_size_t), NULL, NULL) < 0) + &kv_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "datatype size lookup failed"); if(NULL == (buf = malloc(buf_size))) @@ -328,7 +315,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, file_desc.frag->len = (iod_size_t)buf_size; /* read the serialized type value from the BLOB object */ - if(iod_blob_read(cur_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) + if(iod_blob_read(dtype_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object"); /* decode the datatype */ @@ -340,9 +327,9 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, #if H5_DO_NATIVE printf("datatype name %s location %d\n", name, loc_handle.cookie); - cur_oh.cookie = H5Topen(loc_handle.cookie, name, input->tapl_id); - HDassert(cur_oh.cookie); - output.type_id = cur_oh.cookie; + dtype_oh.cookie = H5Topen(loc_handle.cookie, name, input->tapl_id); + HDassert(dtype_oh.cookie); + output.type_id = dtype_oh.cookie; output.tcpl_id = H5P_DATATYPE_CREATE_DEFAULT; #else /* fake a type, and tcpl */ @@ -351,7 +338,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, #endif output.iod_id = dtype_id; - output.iod_oh = cur_oh; + output.iod_oh = dtype_oh; #if H5VL_IOD_DEBUG fprintf(stderr, "Done with dtype open, sending response to client\n"); @@ -370,7 +357,6 @@ done: H5Tclose(output.type_id); #endif - last_comp = (char *)H5MM_xfree(last_comp); input = (dtype_open_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); diff --git a/src/H5VLiod_group.c b/src/H5VLiod_group.c index 614879a..57fd3cf 100644 --- a/src/H5VLiod_group.c +++ b/src/H5VLiod_group.c @@ -209,11 +209,7 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t loc_id = input->loc_id; /* The ID of the current location object */ const char *name = input->name; /* group name including path to open */ iod_obj_id_t grp_id; /* The ID of the group that needs to be opened */ - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id; - char *last_comp; /* the name of the group obtained from traversal function */ - iod_size_t kv_size; - H5VL_iod_link_t iod_link; + iod_handle_t grp_oh, mdkv_oh; /* The group handle and its metadata KV handle */ scratch_pad_t sp; herr_t ret_value = SUCCEED; @@ -223,33 +219,12 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start group open %s\n", name); #endif - /* the traversal will retrieve the location where the group needs - to be created. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - kv_size = sizeof(H5VL_iod_link_t); - - /* lookup group in the current location */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Intermdiate group does not exist"); - - grp_id = iod_link.iod_id; - - /* close parent group and its scratch pad if it is not the - location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the group */ - if (iod_obj_open_write(coh, grp_id, NULL, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); + /* Traverse Path and open group */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &grp_id, &grp_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of group */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(grp_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -258,11 +233,12 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, /* MSC - retrieve metadata, need IOD */ #if 0 - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL, - NULL, NULL, &output.gcpl_id) < 0) + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, + H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.gcpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve gcpl"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, H5VL_IOD_KEY_OBJ_LINK_COUNT, + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, NULL, NULL, &output.link_count) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); #endif @@ -272,12 +248,12 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close meta data KV handle"); #if H5_DO_NATIVE - cur_oh.cookie = H5Gopen(loc_handle.cookie, name, input->gapl_id); - HDassert(cur_oh.cookie); + grp_oh.cookie = H5Gopen(loc_handle.cookie, name, input->gapl_id); + HDassert(grp_oh.cookie); #endif output.iod_id = grp_id; - output.iod_oh = cur_oh; + output.iod_oh = grp_oh; output.gcpl_id = H5P_GROUP_CREATE_DEFAULT; #if H5VL_IOD_DEBUG @@ -294,7 +270,6 @@ done: HG_Handler_start_output(op_data->hg_handle, &output); } - last_comp = (char *)H5MM_xfree(last_comp); input = (group_open_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); diff --git a/src/H5VLiod_link.c b/src/H5VLiod_link.c index f7e1a5f..c16e319 100644 --- a/src/H5VLiod_link.c +++ b/src/H5VLiod_link.c @@ -50,8 +50,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* the container handle */ iod_handle_t src_oh; /* The handle for creation src object */ iod_obj_id_t src_id; /* The ID of the creation src object */ - iod_handle_t cur_oh, target_oh; - iod_obj_id_t cur_id; + iod_handle_t target_oh; iod_obj_id_t target_id; /* The ID of the target object where link is created*/ char *src_last_comp = NULL, *dst_last_comp = NULL; iod_size_t kv_size = sizeof(H5VL_iod_link_t); @@ -76,79 +75,64 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, #endif if(H5VL_LINK_CREATE_HARD == create_type) { - /* Retrieve the parent of the object where the new link points - to. The traversal must not fail. */ - if(H5VL_iod_server_traverse(coh, input->target_loc_id, input->target_loc_oh, - input->target_name, FALSE, - &dst_last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't traverse path"); + scratch_pad_t sp; + iod_handle_t mdkv_oh; + uint64_t link_count = 0; - /* lookup target object in the current location - the lookup - must succeed since this is a hard link. */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, dst_last_comp, &iod_link, &kv_size, - NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Intermdiate group does not exist"); - - target_id = iod_link.iod_id; + /* Traverse Path and open the target object */ + if(H5VL_iod_server_open_path(coh, input->target_loc_id, input->target_loc_oh, + input->target_name, &target_id, &target_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* add link in parent group to current object */ if(H5VL_iod_insert_new_link(src_oh, IOD_TID_UNKNOWN, src_last_comp, H5L_TYPE_HARD, target_id, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); - /* MSC - NEED IOD */ -#if 0 - /* Update link count on target object */ - { - scratch_pad_t sp; - iod_handle_t mdkv_oh; - uint64_t link_count = 0; - - /* open the group */ - if (iod_obj_open_write(coh, target_id, NULL, &target_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open target object"); - - /* get scratch pad */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); + /* get scratch pad */ + if(iod_obj_get_scratch(target_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); - /* open the metadata scratch pad */ - if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); + /* open the metadata scratch pad */ + if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, - H5VL_IOD_KEY_OBJ_LINK_COUNT, - NULL, NULL, &link_count) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, + NULL, NULL, &link_count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); - link_count ++; + link_count ++; - /* insert link count metadata */ - if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count, - NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); + /* insert link count metadata */ + if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count, + NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); - /* close the metadata scratch pad */ - if(iod_obj_close(mdkv_oh, NULL, NULL)) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); + /* close the metadata scratch pad */ + if(iod_obj_close(mdkv_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); - /* close the target location */ + /* close the target location */ + if(input->target_loc_oh.cookie != target_oh.cookie) { if(iod_obj_close(target_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); } -#endif } else if(H5VL_LINK_CREATE_SOFT == create_type) { + iod_handle_t parent_oh; /* The handle for creation src object */ + iod_obj_id_t parent_id; /* The ID of the creation src object */ + /* Retrieve the parent of the object where the new link points to. The traversal must not fail. */ if(H5VL_iod_server_traverse(coh, input->target_loc_id, input->target_loc_oh, input->target_name, FALSE, - &dst_last_comp, &cur_id, &cur_oh) < 0) + &dst_last_comp, &parent_id, &parent_oh) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't traverse path"); /* lookup target object in the current location. The lookup might fail since this is a soft link */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, dst_last_comp, + if(iod_kv_get_value(parent_oh, IOD_TID_UNKNOWN, dst_last_comp, &iod_link, &kv_size, NULL, NULL) < 0) { /* the lookup failed so just insert the target_id as undefined in the src object */ @@ -195,18 +179,22 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, if(iod_obj_close(mdkv_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); } + + /* close parent group if it is not the location we started the + traversal into */ + if(input->target_loc_oh.cookie != parent_oh.cookie) { + iod_obj_close(parent_oh, NULL, NULL); + } } else HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Invalid Link type"); - /* close parent group if it is not the location we started the - traversal into */ - if(input->loc_oh.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); + /* close the source location */ + if(input->loc_oh.cookie != src_oh.cookie) { + if(iod_obj_close(src_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); } - iod_obj_close(src_oh, NULL, NULL); - #if H5_DO_NATIVE if(H5VL_LINK_CREATE_HARD == create_type) { if(H5Lcreate_hard(input->target_loc_oh.cookie, input->target_name, @@ -224,7 +212,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, done: #if H5VL_IOD_DEBUG - fprintf(stderr, "Done with link create, sending response to client\n"); + fprintf(stderr, "Done with link create, sending response %d to client\n", ret_value); #endif HG_Handler_start_output(op_data->hg_handle, &ret_value); @@ -265,7 +253,7 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t src_id; /* The ID of the src object */ iod_handle_t dst_oh; /* The handle for the dst object where link is created*/ iod_obj_id_t dst_id; /* The ID of the dst object where link is created*/ - char *last_comp = NULL; + char *src_last_comp = NULL, *dst_last_comp = NULL; iod_kv_t kv; iod_size_t kv_size = sizeof(H5VL_iod_link_t); H5VL_iod_link_t iod_link; @@ -281,22 +269,22 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, to be moved/copied from. The traversal will fail if an intermediate group does not exist. */ if(H5VL_iod_server_traverse(coh, input->src_loc_id, input->src_loc_oh, input->src_loc_name, - FALSE, &last_comp, &src_id, &src_oh) < 0) + FALSE, &src_last_comp, &src_id, &src_oh) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); /* the traversal will retrieve the location where the link needs to be moved/copied to. The traversal will fail if an intermediate group does not exist. */ if(H5VL_iod_server_traverse(coh, input->dst_loc_id, input->dst_loc_oh, input->dst_loc_name, - FALSE, NULL, &dst_id, &dst_oh) < 0) + FALSE, &dst_last_comp, &dst_id, &dst_oh) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); /* lookup object ID in the current src location */ - if(iod_kv_get_value(src_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) + if(iod_kv_get_value(src_oh, IOD_TID_UNKNOWN, src_last_comp, &iod_link, &kv_size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Object does not exist in source path"); /* Insert object in the destination path */ - if(H5VL_iod_insert_new_link(dst_oh, IOD_TID_UNKNOWN, last_comp, + if(H5VL_iod_insert_new_link(dst_oh, IOD_TID_UNKNOWN, dst_last_comp, iod_link.link_type, iod_link.iod_id, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); @@ -305,15 +293,51 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, if(!copy_flag) { iod_kv_params_t kvs; - kv.key = last_comp; + kv.key = src_last_comp; kvs.kv = &kv; /* remove link from source object */ if(iod_kv_unlink_keys(src_oh, IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair"); } + /* adjust link count on target object */ else { - ;/* adjust link count on tager obejct */ + iod_handle_t target_oh; + iod_handle_t mdkv_oh; + scratch_pad_t sp; + uint64_t link_count = 0; + + /* open the current group */ + if (iod_obj_open_write(coh, iod_link.iod_id, NULL, &target_oh, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); + + /* get scratch pad */ + if(iod_obj_get_scratch(target_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); + + /* open the metadata scratch pad */ + if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); + + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, + NULL, NULL, &link_count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); + + link_count ++; + + /* insert link count metadata */ + if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count, + NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); + + /* close the metadata scratch pad */ + if(iod_obj_close(mdkv_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); + + /* close the target location */ + if(iod_obj_close(target_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); } /* close source group if it is not the location we started the @@ -350,7 +374,8 @@ done: HG_Handler_start_output(op_data->hg_handle, &ret_value); - last_comp = (char *)H5MM_xfree(last_comp); + src_last_comp = (char *)H5MM_xfree(src_last_comp); + dst_last_comp = (char *)H5MM_xfree(dst_last_comp); input = (link_move_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); @@ -411,7 +436,6 @@ H5VL_iod_server_link_exists_cb(AXE_engine_t UNUSED axe_engine, ret = FALSE; } /* end if */ else { - cur_id = iod_link.iod_id; ret = TRUE; } @@ -425,7 +449,7 @@ done: /* close parent group if it is not the location we started the traversal into */ - if(loc_oh.cookie != IOD_OH_UNDEFINED && input->loc_oh.cookie != loc_oh.cookie) { + if(input->loc_oh.cookie != cur_oh.cookie) { iod_obj_close(loc_oh, NULL, NULL); } @@ -502,8 +526,56 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine, if(iod_kv_unlink_keys(cur_oh, IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair"); - /* MSC - check the metadata information for the object and remove + /* MSC - NEED IOD */ +#if 0 + /* check the metadata information for the object and remove it from the container if this is the last link to it */ + if(iod_link.link_type == H5VL_LINK_CREATE_HARD) { + iod_handle_t obj_oh; + iod_handle_t mdkv_oh; + scratch_pad_t sp; + uint64_t link_count = 0; + + /* open the current group */ + if (iod_obj_open_write(coh, obj_id, NULL, &obj_oh, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); + + /* get scratch pad */ + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); + + /* open the metadata scratch pad */ + if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); + + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, + NULL, NULL, &link_count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); + + link_count --; + + /* if this is not the only link to the object, update the link count */ + if(0 != link_count) { + /* insert link count metadata */ + if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count, + NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); + } + /* close the metadata scratch pad */ + if(iod_obj_close(mdkv_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); + /* close the object */ + if(iod_obj_close(obj_oh, NULL, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); + + /* If this was the only link to the object, remove the object */ + if(0 == link_count) { + if(iod_obj_unlink(coh, obj_id, IOD_TID_UNKNOWN, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object"); + } + } +#endif /* close location object */ if(input->loc_oh.cookie != cur_oh.cookie) { diff --git a/src/H5VLiod_map.c b/src/H5VLiod_map.c index cba6ab5..27d239d 100644 --- a/src/H5VLiod_map.c +++ b/src/H5VLiod_map.c @@ -196,11 +196,7 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t loc_id = input->loc_id; const char *name = input->name; iod_obj_id_t map_id; /* The ID of the map that needs to be opened */ - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id, mdkv_id; - char *last_comp; /* the name of the map obtained from traversal function */ - iod_size_t kv_size; - H5VL_iod_link_t iod_link; + iod_handle_t map_oh, mdkv_oh; scratch_pad_t sp; herr_t ret_value = SUCCEED; @@ -210,34 +206,12 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start map open %s\n", name); #endif - /* the traversal will retrieve the location where the group needs - to be created. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - kv_size = sizeof(H5VL_iod_link_t); - - /* lookup map in the current location */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, - &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Intermdiate group does not exist"); - - map_id = iod_link.iod_id; - - /* close parent group and its scratch pad if it is not the - location we started the traversal into */ - if(loc_handle.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the map */ - if (iod_obj_open_write(coh, map_id, NULL, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current map"); + /* Traverse Path and open map */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &map_id, &map_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of map */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(map_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -246,7 +220,8 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, /* MSC - retrieve metadata - need IOD*/ #if 0 - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, H5VL_IOD_KEY_OBJ_LINK_COUNT, + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, + H5VL_IOD_KEY_OBJ_LINK_COUNT, NULL, NULL, &output.link_count) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); #endif @@ -256,7 +231,7 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close meta data KV handle"); output.iod_id = map_id; - output.iod_oh = cur_oh; + output.iod_oh = map_oh; /* MSC - fake datatypes for now*/ output.keytype_id = H5Tcopy(H5T_NATIVE_INT); @@ -278,7 +253,6 @@ done: H5Tclose(output.keytype_id); H5Tclose(output.valtype_id); - last_comp = (char *)H5MM_xfree(last_comp); input = (map_open_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); diff --git a/src/H5VLiod_obj.c b/src/H5VLiod_obj.c index c59a5ad..0801413 100644 --- a/src/H5VLiod_obj.c +++ b/src/H5VLiod_obj.c @@ -50,12 +50,8 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; /* the container handle */ iod_handle_t obj_oh; /* The handle for object */ iod_obj_id_t obj_id; /* The ID of the object */ - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id; - char *last_comp = NULL; + iod_handle_t mdkv_oh; scratch_pad_t sp; - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -64,31 +60,13 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start Object Open\n"); #endif - /* the traversal will retrieve the location where the object needs - to be opened to be created from. The traversal will fail if an - intermediate group does not exist. */ - if(H5VL_iod_server_traverse(coh, input->loc_id, input->loc_oh, input->loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - /* lookup object in the current location */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Intermdiate group does not exist"); - - obj_id = iod_link.iod_id; - - /* close parent group if it is not the location we started the - traversal into */ - if(input->loc_oh.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the object */ - if (iod_obj_open_write(coh, obj_id, NULL, &obj_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); + /* Traverse Path and open object */ + if(H5VL_iod_server_open_path(coh, input->loc_id, input->loc_oh, input->loc_name, + &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the object */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -152,7 +130,7 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, file_desc.frag->len = (iod_size_t)buf_size; /* read the serialized type value from the BLOB object */ - if(iod_blob_read(cur_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) + if(iod_blob_read(obj_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object"); /* decode the datatype */ @@ -234,7 +212,6 @@ done: HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "not a valid object (dataset, group, or datatype)") } - last_comp = (char *)H5MM_xfree(last_comp); input = (object_op_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); @@ -264,14 +241,13 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, op_data_t *op_data = (op_data_t *)_op_data; object_copy_in_t *input = (object_copy_in_t *)op_data->input; iod_handle_t coh = input->coh; /* the container handle */ - iod_handle_t src_oh; /* The handle for src parent */ - iod_obj_id_t src_id; /* The ID of the src parent */ iod_handle_t dst_oh; /* The handle for the dst object where link is created*/ iod_obj_id_t dst_id; /* The ID of the dst object where link is created*/ iod_obj_id_t obj_id; /* The ID of the object to be moved/copied */ + iod_handle_t obj_oh; /* The handle for the object to be moved/copied */ iod_obj_id_t new_id; /* The ID of the new object */ iod_handle_t mdkv_oh;/* The handle of the metadata KV for source object */ - char *last_comp = NULL, *new_name; + char *new_name = NULL; iod_kv_t kv; iod_size_t kv_size = sizeof(H5VL_iod_link_t); H5VL_iod_link_t iod_link; @@ -283,12 +259,10 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, fprintf(stderr, "Start object copy\n"); #endif - /* the traversal will retrieve the location where the object - exists. The traversal will fail if an intermediate group does - not exist. */ - if(H5VL_iod_server_traverse(coh, input->src_loc_id, input->src_loc_oh, input->src_loc_name, - FALSE, &last_comp, &src_id, &src_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); + /* Traverse Path and open object */ + if(H5VL_iod_server_open_path(coh, input->src_loc_id, input->src_loc_oh, input->src_loc_name, + &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* the traversal will retrieve the location where the objects needs to be copied to. The traversal will fail if an @@ -297,20 +271,11 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, FALSE, &new_name, &dst_id, &dst_oh) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - /* lookup object ID in the current src location */ - if(iod_kv_get_value(src_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Object does not exist in source path"); - - obj_id = iod_link.iod_id; /* MSC - NEED IOD & a lot more work*/ #if 0 - /* open the object */ - if (iod_obj_open_write(coh, obj_id, NULL, &obj_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); - /* get scratch pad of the object */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -368,7 +333,7 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, file_desc.frag->len = (iod_size_t)buf_size; /* read the serialized type value from the BLOB object */ - if(iod_blob_read(cur_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) + if(iod_blob_read(obj_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object"); /* decode the datatype */ @@ -388,7 +353,8 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, if(iod_obj_close(mdkv_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); /* close the object handle */ - if(iod_obj_close(obj_oh, NULL, NULL)) + if(input->src_loc_oh.cookie != obj_oh.cookie && + iod_obj_close(obj_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); /* Insert object in the destination path */ @@ -397,12 +363,6 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value"); #endif - /* close source group if it is not the location we started the - traversal into */ - if(input->src_loc_oh.cookie != src_oh.cookie) { - iod_obj_close(src_oh, NULL, NULL); - } - /* close dst group if it is not the location we started the traversal into */ if(input->dst_loc_oh.cookie != dst_oh.cookie) { @@ -423,7 +383,6 @@ done: HG_Handler_start_output(op_data->hg_handle, &ret_value); - last_comp = (char *)H5MM_xfree(last_comp); if(new_name) free(new_name); input = (object_copy_in_t *)H5MM_xfree(input); @@ -457,60 +416,37 @@ H5VL_iod_server_object_exists_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; iod_handle_t loc_oh = input->loc_oh; iod_obj_id_t loc_id = input->loc_id; - iod_handle_t cur_oh; - iod_obj_id_t cur_id; + iod_handle_t obj_oh; + iod_obj_id_t obj_id; const char *loc_name = input->loc_name; - char *last_comp = NULL; htri_t ret = -1; - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT - /* the traversal will retrieve the location where the object needs - to be checked */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, FALSE, - &last_comp, &cur_id, &cur_oh) < 0) { + /* Traverse Path and open object */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0) { ret = FALSE; HGOTO_DONE(SUCCEED); } - - /* check the last component */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, - &iod_link, &kv_size, NULL, NULL) < 0) { - ret = FALSE; - } /* end if */ else { - iod_handle_t obj_oh; + /* close the object */ + if(loc_oh.cookie != obj_oh.cookie && + iod_obj_close(obj_oh, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); - cur_id = iod_link.iod_id; - /* try to open the object */ - if (iod_obj_open_write(coh, cur_id, NULL, &obj_oh, NULL) < 0) { - ret = FALSE; - HGOTO_DONE(SUCCEED); - } - else { - /* close the object */ - iod_obj_close(obj_oh, NULL, NULL); - ret = TRUE; - } + /* set return to TRUE */ + ret = TRUE; } +done: + #if H5_DO_NATIVE ret = H5Oexists_by_name(loc_oh.cookie, loc_name, H5P_DEFAULT); #else ret = FALSE; #endif -done: - - /* close parent group if it is not the location we started the - traversal into */ - if(loc_oh.cookie != IOD_OH_UNDEFINED && input->loc_oh.cookie != loc_oh.cookie) { - iod_obj_close(loc_oh, NULL, NULL); - } - #if H5VL_IOD_DEBUG fprintf(stderr, "Done with Object exists, sending response to client\n"); #endif @@ -519,7 +455,6 @@ done: input = (object_op_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); - last_comp = (char *)H5MM_xfree(last_comp); FUNC_LEAVE_NOAPI_VOID } /* end H5VL_iod_server_object_exists_cb() */ @@ -549,43 +484,21 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh = input->coh; iod_handle_t loc_oh = input->loc_oh; iod_obj_id_t loc_id = input->loc_id; - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id, obj_id; + iod_handle_t obj_oh, mdkv_oh; + iod_obj_id_t obj_id; const char *loc_name = input->path; const char *comment = input->comment; - char *last_comp = NULL; scratch_pad_t sp; - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT - /* the traversal will retrieve the location where the link needs - to be removed. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, - FALSE, &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - /* lookup object ID in the current location */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Object does not exist in source path"); - - obj_id = iod_link.iod_id; - - /* close parent group and its scratch pad if it is not the - location we started the traversal into */ - if(loc_oh.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the object */ - if (iod_obj_open_write(coh, obj_id, NULL /*hints*/, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open object"); + /* Traverse Path and open object */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the object */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -610,7 +523,9 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, /* close metadata KV and object */ if(iod_obj_close(mdkv_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); - if(iod_obj_close(cur_oh, NULL, NULL)) + + if(loc_oh.cookie != obj_oh.cookie && + iod_obj_close(obj_oh, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); #if H5_DO_NATIVE @@ -625,7 +540,6 @@ done: HG_Handler_start_output(op_data->hg_handle, &ret_value); - last_comp = (char *)H5MM_xfree(last_comp); input = (object_set_comment_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); @@ -660,45 +574,21 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t loc_oh = input->loc_oh; iod_obj_id_t loc_id = input->loc_id; size_t length = input->length; - iod_handle_t cur_oh, mdkv_oh; - iod_obj_id_t cur_id, obj_id; + iod_handle_t obj_oh, mdkv_oh; + iod_obj_id_t obj_id; const char *loc_name = input->path; - char *last_comp = NULL; - iod_kv_params_t kvs; - iod_kv_t kv; - iod_size_t kv_size = sizeof(H5VL_iod_link_t); - H5VL_iod_link_t iod_link; scratch_pad_t sp; ssize_t size = 0; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT - /* the traversal will retrieve the location where the link needs - to be removed. The traversal will fail if an intermediate group - does not exist. */ - if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, - FALSE, &last_comp, &cur_id, &cur_oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path"); - - /* lookup object ID in the current location */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp, &iod_link, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Object does not exist in source path"); - - obj_id = iod_link.iod_id; - - /* close parent group and its scratch pad if it is not the - location we started the traversal into */ - if(loc_oh.cookie != cur_oh.cookie) { - iod_obj_close(cur_oh, NULL, NULL); - } - - /* open the object */ - if (iod_obj_open_write(coh, obj_id, NULL /*hints*/, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open object"); + /* Traverse Path and open object */ + if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object"); /* get scratch pad of the object */ - if(iod_obj_get_scratch(cur_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) + if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the metadata scratch pad */ @@ -731,7 +621,9 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, /* close metadata KV and object */ if(iod_obj_close(mdkv_oh, NULL, NULL)) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); - if(iod_obj_close(cur_oh, NULL, NULL)) + + if(loc_oh.cookie != obj_oh.cookie && + iod_obj_close(obj_oh, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object"); @@ -767,7 +659,6 @@ done: free(comment.value); free(comment.value_size); - last_comp = (char *)H5MM_xfree(last_comp); input = (object_get_comment_in_t *)H5MM_xfree(input); op_data = (op_data_t *)H5MM_xfree(op_data); diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c index fff93c7..69d745a 100644 --- a/src/H5VLiod_server.c +++ b/src/H5VLiod_server.c @@ -13,11 +13,6 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#define H5G_PACKAGE /*suppress error about including H5Gpkg */ - -#include "H5Gpkg.h" /* Groups */ -#include "H5Sprivate.h" /* Dataspaces */ -#include "H5WBprivate.h" /* Wrapped Buffers */ #include "H5VLiod_server.h" #ifdef H5_HAVE_EFF @@ -36,13 +31,6 @@ static int num_peers = 0; static int terminate_requests = 0; static hbool_t shutdown = FALSE; -#if 0 -static herr_t H5VL_iod_typeinfo_init(hid_t dset_type_id, const H5D_dxpl_cache_t *dxpl_cache, - hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write, - H5D_type_info_t *type_info); -static herr_t H5VL_iod_typeinfo_term(const H5D_type_info_t *type_info); -#endif - herr_t H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) { @@ -2703,725 +2691,4 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_map_close() */ -herr_t -H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc_handle, - const char *path, hbool_t create_interm_grps, - /* out */char **last_comp, /* out */iod_obj_id_t *iod_id, - /* out */iod_handle_t *iod_oh) -{ - char comp_buf[1024]; /* Temporary buffer for path components */ - char *comp; /* Pointer to buffer for path components */ - H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */ - size_t nchars; /* component name length */ - iod_handle_t cur_oh, prev_oh; - iod_obj_id_t cur_id; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - assert(FALSE == create_interm_grps); - - cur_oh = loc_handle; - - if(cur_oh.cookie == IOD_OH_UNDEFINED) { - /* open the current group */ - if (iod_obj_open_write(coh, loc_id, NULL /*hints*/, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); - } - - /* Wrap the local buffer for serialized header info */ - if(NULL == (wb = H5WB_wrap(comp_buf, sizeof(comp_buf)))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer") - /* Get a pointer to a buffer that's large enough */ - if(NULL == (comp = (char *)H5WB_actual(wb, (HDstrlen(path) + 1)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer") - - /* Traverse the path */ - while((path = H5G__component(path, &nchars)) && *path) { - const char *s; /* Temporary string pointer */ - iod_size_t kv_size; - H5VL_iod_link_t value; - - /* Copy the component path into a null-terminated buffer. */ - HDmemcpy(comp, path, nchars); - comp[nchars] = '\0'; - - /* - * The special path `.' is a no-op. - */ - if('.' == comp[0] && !comp[1]) { - path += nchars; - continue; - } /* end if */ - - /* Check if this is the last component of the path */ - if(!((s = H5G__component(path + nchars, NULL)) && *s)) { - if(last_comp) { - *last_comp = HDstrdup(comp); - } - break; - } - - kv_size = sizeof(H5VL_iod_link_t); - - prev_oh = cur_oh; - - /* lookup next object in the current group */ - if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, comp, &value, &kv_size, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Intermdiate group does not exist"); - - cur_id = value.iod_id; - - /* Close previous handle unless it is the original one */ - if(loc_handle.cookie != prev_oh.cookie && - iod_obj_close(prev_oh, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close current object handle"); - - /* open the current group */ - if (iod_obj_open_write(coh, cur_id, NULL, &cur_oh, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group"); - - /* Advance to next component in string */ - path += nchars; - } /* end while */ - - /* Release temporary component buffer */ - if(wb && H5WB_unwrap(wb) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't release wrapped buffer"); - - *iod_id = cur_id; - *iod_oh = cur_oh; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} - -herr_t -H5VL_iod_get_file_desc(hid_t space_id, hssize_t *count, iod_hyperslab_t *hslabs) -{ - hssize_t num_descriptors = 0, n; - int ndims = 0, i; - herr_t ret_value = SUCCEED; - - FUNC_ENTER_NOAPI_NOINIT - - /* get the rank of this dataspace */ - if((ndims = H5Sget_simple_extent_ndims(space_id)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get dataspace dimesnsion"); - - switch(H5Sget_select_type(space_id)) { - case H5S_SEL_NONE: - /* nothing selected */ - num_descriptors = 0; - HGOTO_DONE(SUCCEED); - case H5S_SEL_ALL: - /* The entire dataspace is selected, 1 large iod hyperslab is needed */ - num_descriptors = 1; - - if(NULL != hslabs) { - hsize_t dims[H5S_MAX_RANK]; - - /* get the dimensions sizes of the dataspace */ - if(H5Sget_simple_extent_dims(space_id, dims, NULL) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get dataspace dimesnsion sizes"); - /* populate the hyperslab */ - for(i=0 ; imem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") - if(NULL == (type_info->dset_type = (const H5T_t *)H5I_object_verify(dset_type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") - - if(do_write) { - src_type = type_info->mem_type; - dst_type = type_info->dset_type; - type_info->src_type_id = mem_type_id; - type_info->dst_type_id = dset_type_id; - } /* end if */ - else { - src_type = type_info->dset_type; - dst_type = type_info->mem_type; - type_info->src_type_id = dset_type_id; - type_info->dst_type_id = mem_type_id; - } /* end else */ - - /* - * Locate the type conversion function and data space conversion - * functions, and set up the element numbering information. If a data - * type conversion is necessary then register datatype atoms. Data type - * conversion is necessary if the user has set the `need_bkg' to a high - * enough value in xfer_parms since turning off datatype conversion also - * turns off background preservation. - */ - if(NULL == (type_info->tpath = H5T_path_find(src_type, dst_type, NULL, NULL, dxpl_id, FALSE))) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype") - - /* Precompute some useful information */ - type_info->src_type_size = H5T_get_size(src_type); - type_info->dst_type_size = H5T_get_size(dst_type); - type_info->max_type_size = MAX(type_info->src_type_size, type_info->dst_type_size); - type_info->is_conv_noop = H5T_path_noop(type_info->tpath); - type_info->is_xform_noop = H5Z_xform_noop(dxpl_cache->data_xform_prop); - if(type_info->is_xform_noop && type_info->is_conv_noop) { - type_info->cmpd_subset = NULL; - type_info->need_bkg = H5T_BKG_NO; - } /* end if */ - else { - size_t target_size; /* Desired buffer size */ - - /* Check if the datatypes are compound subsets of one another */ - type_info->cmpd_subset = H5T_path_compound_subset(type_info->tpath); - - /* Check if we need a background buffer */ - if(do_write && H5T_detect_class(type_info->dset_type, H5T_VLEN, FALSE)) - type_info->need_bkg = H5T_BKG_YES; - else { - H5T_bkg_t path_bkg; /* Type conversion's background info */ - - if((path_bkg = H5T_path_bkg(type_info->tpath))) { - /* Retrieve the bkgr buffer property */ - type_info->need_bkg = dxpl_cache->bkgr_buf_type; - type_info->need_bkg = MAX(path_bkg, type_info->need_bkg); - } /* end if */ - else - type_info->need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/ - } /* end else */ - - - /* Set up datatype conversion/background buffers */ - - /* Get buffer size from DXPL */ - target_size = dxpl_cache->max_temp_buf; - - /* If the buffer is too small to hold even one element, try to make it bigger */ - if(target_size < type_info->max_type_size) { - hbool_t default_buffer_info; /* Whether the buffer information are the defaults */ - - /* Detect if we have all default settings for buffers */ - default_buffer_info = (hbool_t)((H5D_TEMP_BUF_SIZE == dxpl_cache->max_temp_buf) - && (NULL == dxpl_cache->tconv_buf) && (NULL == dxpl_cache->bkgr_buf)); - - /* Check if we are using the default buffer info */ - if(default_buffer_info) - /* OK to get bigger for library default settings */ - target_size = type_info->max_type_size; - else - /* Don't get bigger than the application has requested */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "temporary buffer max size is too small") - } /* end if */ - - /* Compute the number of elements that will fit into buffer */ - type_info->request_nelmts = target_size / type_info->max_type_size; - - /* Sanity check elements in temporary buffer */ - if(type_info->request_nelmts == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "temporary buffer max size is too small") - - /* - * Get a temporary buffer for type conversion unless the app has already - * supplied one through the xfer properties. Instead of allocating a - * buffer which is the exact size, we allocate the target size. The - * malloc() is usually less resource-intensive if we allocate/free the - * same size over and over. - */ - if(NULL == (type_info->tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) { - /* Allocate temporary buffer */ - if(NULL == (type_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion") - type_info->tconv_buf_allocated = TRUE; - } /* end if */ - if(type_info->need_bkg && NULL == (type_info->bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) { - size_t bkg_size; /* Desired background buffer size */ - - /* Compute the background buffer size */ - /* (don't try to use buffers smaller than the default size) */ - bkg_size = type_info->request_nelmts * type_info->dst_type_size; - if(bkg_size < dxpl_cache->max_temp_buf) - bkg_size = dxpl_cache->max_temp_buf; - - /* Allocate background buffer */ - /* (Need calloc()-like call since memory needs to be initialized) */ - if(NULL == (type_info->bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") - type_info->bkg_buf_allocated = TRUE; - } /* end if */ - } /* end else */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL_iod_typeinfo_init() */ - - -/*------------------------------------------------------------------------- - * Function: H5VL_iod_typeinfo_term - * - * Purpose: Common logic for terminating a type info object - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Thursday, March 6, 2008 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5VL_iod_typeinfo_term(const H5D_type_info_t *type_info) -{ - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Check for releasing datatype conversion & background buffers */ - if(type_info->tconv_buf_allocated) { - HDassert(type_info->tconv_buf); - (void)H5FL_BLK_FREE(type_conv, type_info->tconv_buf); - } /* end if */ - if(type_info->bkg_buf_allocated) { - HDassert(type_info->bkg_buf); - (void)H5FL_BLK_FREE(type_conv, type_info->bkg_buf); - } /* end if */ - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5VL_iod_typeinfo_term() */ -#endif - #endif /* H5_HAVE_EFF */ diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h index 56cefb3..4a8946b 100644 --- a/src/H5VLiod_server.h +++ b/src/H5VLiod_server.h @@ -289,6 +289,10 @@ H5_DLL void H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine H5_DLL herr_t H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc_handle, const char *path, hbool_t create_interm_grps, char **last_comp, iod_obj_id_t *iod_id, iod_handle_t *iod_oh); +H5_DLL herr_t H5VL_iod_server_open_path(iod_handle_t coh, iod_obj_id_t loc_id, + iod_handle_t loc_handle, const char *path, + /*out*/iod_obj_id_t *iod_id, + /*out*/iod_handle_t *iod_oh); H5_DLL herr_t H5VL_iod_get_file_desc(hid_t space_id, hssize_t *count, iod_hyperslab_t *hslabs); H5_DLL herr_t H5VL_iod_insert_plist(iod_handle_t oh, iod_trans_id_t tid, hid_t plist_id, iod_hint_list_t *hints, iod_checksum_t *cs, iod_event_t *event); diff --git a/src/Makefile.am b/src/Makefile.am index 6000e20..ec157da 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,7 +60,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c\ H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c \ H5VLiod_attr.c H5VLiod_link.c H5VLiod_obj.c H5VLiod_map.c \ H5FD.c H5FDcore.c \ diff --git a/src/Makefile.in b/src/Makefile.in index 0dbcff9..c231ab5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -136,13 +136,14 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \ H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5VL.lo \ H5VLint.lo H5VLnative.lo H5VLiod.lo H5VLiod_client.lo \ - H5VLiod_server.lo H5VLiod_encdec.lo H5VLiod_file.lo \ - H5VLiod_group.lo H5VLiod_dset.lo H5VLiod_dtype.lo \ - H5VLiod_attr.lo H5VLiod_link.lo H5VLiod_obj.lo H5VLiod_map.lo \ - H5FD.lo H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo \ - H5FDlog.lo H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo \ - H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FF.lo H5EQ.lo H5M.lo \ - H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ + H5VLiod_server.lo H5VLiod_encdec.lo H5VLiod_util.lo \ + H5VLiod_file.lo H5VLiod_group.lo H5VLiod_dset.lo \ + H5VLiod_dtype.lo H5VLiod_attr.lo H5VLiod_link.lo \ + H5VLiod_obj.lo H5VLiod_map.lo H5FD.lo H5FDcore.lo \ + H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ + H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo H5FDsec2.lo \ + H5FDspace.lo H5FDstdio.lo H5FF.lo H5EQ.lo H5M.lo H5FL.lo \ + H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ @@ -569,7 +570,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c\ H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c \ H5VLiod_attr.c H5VLiod_link.c H5VLiod_obj.c H5VLiod_map.c \ H5FD.c H5FDcore.c \ @@ -1038,6 +1039,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_obj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLnative.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Z.Plo@am__quote@ -- cgit v0.12