summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-09-11 17:07:33 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-09-11 17:07:33 (GMT)
commit78b4bdd3f14536b0b9de8700f65481756ca6bfac (patch)
treedea2e80153f55e97e70d20a52b5270de67460dfd /src
parent5f6d336144b6af368373e80038488e860b28cb7b (diff)
downloadhdf5-78b4bdd3f14536b0b9de8700f65481756ca6bfac.zip
hdf5-78b4bdd3f14536b0b9de8700f65481756ca6bfac.tar.gz
hdf5-78b4bdd3f14536b0b9de8700f65481756ca6bfac.tar.bz2
[svn-r24123] update server ops to use transaction IDs.
Diffstat (limited to 'src')
-rw-r--r--src/H5VLiod.c22
-rw-r--r--src/H5VLiod_attr.c126
-rw-r--r--src/H5VLiod_common.h2
-rw-r--r--src/H5VLiod_dset.c115
-rw-r--r--src/H5VLiod_dtype.c34
-rw-r--r--src/H5VLiod_group.c26
-rw-r--r--src/H5VLiod_link.c65
-rw-r--r--src/H5VLiod_map.c36
-rw-r--r--src/H5VLiod_obj.c75
-rw-r--r--src/H5VLiod_server.h8
-rw-r--r--src/H5VLiod_util.c28
11 files changed, 318 insertions, 219 deletions
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index a1d8ac4..638eb02 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -3577,6 +3577,7 @@ H5VL_iod_attribute_read(void *_attr, hid_t type_id, void *buf, hid_t dxpl_id, vo
input.iod_id = attr->remote_attr.iod_id;
input.bulk_handle = *bulk_handle;
input.type_id = type_id;
+ input.space_id = attr->remote_attr.space_id;
input.rcxt_num = rc->c_version;
/* allocate structure to receive status of read operation (contains return value and checksum */
@@ -3589,6 +3590,11 @@ H5VL_iod_attribute_read(void *_attr, hid_t type_id, void *buf, hid_t dxpl_id, vo
info->status = status;
info->bulk_handle = bulk_handle;
+#if H5VL_IOD_DEBUG
+ printf("Attribute Read IOD ID %llu, axe id %llu\n",
+ input.iod_id, g_axe_id);
+#endif
+
if(H5VL__iod_create_and_forward(H5VL_ATTR_READ_ID, HG_ATTR_READ,
(H5VL_iod_object_t *)attr, 0,
num_parents, parent_reqs,
@@ -3681,6 +3687,7 @@ H5VL_iod_attribute_write(void *_attr, hid_t type_id, const void *buf, hid_t dxpl
input.iod_id = attr->remote_attr.iod_id;
input.bulk_handle = *bulk_handle;
input.type_id = type_id;
+ input.space_id = attr->remote_attr.space_id;
input.trans_num = tr->trans_num;
input.rcxt_num = tr->c_version;
@@ -3693,6 +3700,11 @@ H5VL_iod_attribute_write(void *_attr, hid_t type_id, const void *buf, hid_t dxpl
info->status = status;
info->bulk_handle = bulk_handle;
+#if H5VL_IOD_DEBUG
+ printf("Attribute Write IOD ID %llu, axe id %llu\n",
+ input.iod_id, g_axe_id);
+#endif
+
if(H5VL__iod_create_and_forward(H5VL_ATTR_WRITE_ID, HG_ATTR_WRITE,
(H5VL_iod_object_t *)attr, 0,
num_parents, parent_reqs,
@@ -3775,6 +3787,11 @@ H5VL_iod_attribute_remove(void *_obj, H5VL_loc_params_t loc_params, const char *
status = (int *)malloc(sizeof(int));
+#if H5VL_IOD_DEBUG
+ printf("Attribute Remove loc %s name %s, axe id %llu\n",
+ loc_name, attr_name, g_axe_id);
+#endif
+
if(H5VL__iod_create_and_forward(H5VL_ATTR_REMOVE_ID, HG_ATTR_REMOVE,
(H5VL_iod_object_t *)obj, 1,
num_parents, parent_reqs,
@@ -3948,6 +3965,11 @@ H5VL_iod_attribute_get(void *_obj, H5VL_attr_get_t get_type, hid_t dxpl_id,
input.path = loc_name;
input.rcxt_num = rc->c_version;
+#if H5VL_IOD_DEBUG
+ printf("Attribute Exists loc %s name %s, axe id %llu\n",
+ loc_name, attr_name, g_axe_id);
+#endif
+
if(H5VL__iod_create_and_forward(H5VL_ATTR_EXISTS_ID, HG_ATTR_EXISTS,
obj, 1, num_parents, parent_reqs,
(H5VL_iod_req_info_t *)rc, &input, ret, ret, req) < 0)
diff --git a/src/H5VLiod_attr.c b/src/H5VLiod_attr.c
index afa0b85..aba222a 100644
--- a/src/H5VLiod_attr.c
+++ b/src/H5VLiod_attr.c
@@ -71,7 +71,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* 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)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, rtid, &obj_id, &obj_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object");
/* Set the IOD array creation parameters */
@@ -88,7 +88,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
array.dims_seq = NULL;
/* create the attribute */
- ret = iod_obj_create(coh, IOD_TID_UNKNOWN, NULL/*hints*/, IOD_OBJ_ARRAY, NULL, &array,
+ ret = iod_obj_create(coh, wtid, NULL/*hints*/, IOD_OBJ_ARRAY, NULL, &array,
&attr_id, NULL /*event*/);
if(collective && (0 == ret || EEXISTS == ret)) {
/* Attribute has been created by another process, open it */
@@ -103,7 +103,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
the parent scratch pad, create attribute scratch pad */
if(0 == ret) {
/* create the metadata KV object for the attribute */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &mdkv_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
@@ -114,7 +114,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
sp.filler2_id = IOD_ID_UNDEFINED;
/* set scratch pad in attribute */
- if (iod_obj_set_scratch(attr_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if (iod_obj_set_scratch(attr_oh, wtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set scratch pad");
/* Open Metadata KV object for write */
@@ -122,19 +122,19 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create scratch pad");
/* insert object type metadata */
- if(H5VL_iod_insert_object_type(mdkv_oh, IOD_TID_UNKNOWN, H5I_ATTR,
+ if(H5VL_iod_insert_object_type(mdkv_oh, wtid, H5I_ATTR,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* MSC - need to check size of datatype if it fits in
entry otherwise create a BLOB*/
/* insert datatype metadata */
- if(H5VL_iod_insert_datatype(mdkv_oh, IOD_TID_UNKNOWN, input->type_id,
+ if(H5VL_iod_insert_datatype(mdkv_oh, wtid, input->type_id,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert dataspace metadata */
- if(H5VL_iod_insert_dataspace(mdkv_oh, IOD_TID_UNKNOWN, input->space_id,
+ if(H5VL_iod_insert_dataspace(mdkv_oh, wtid, input->space_id,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -143,7 +143,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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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 */
@@ -151,7 +151,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad");
/* insert new attribute in scratch pad of current object */
- if(H5VL_iod_insert_new_link(attr_kv_oh, IOD_TID_UNKNOWN, attr_name,
+ if(H5VL_iod_insert_new_link(attr_kv_oh, wtid, attr_name,
H5L_TYPE_HARD, &attr_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -239,11 +239,12 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* 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)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name,
+ rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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 */
@@ -258,7 +259,7 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad");
/* get attribute ID */
- if(H5VL_iod_get_metadata(attr_kv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(attr_kv_oh, rtid, H5VL_IOD_LINK,
attr_name, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve Attribute ID from parent KV store");
@@ -278,7 +279,7 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group");
/* get scratch pad of the attribute */
- if(iod_obj_get_scratch(attr_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(attr_oh, rtid, &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 */
@@ -286,11 +287,11 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad");
#if 0
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
NULL, NULL, &output.type_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &output.space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
#endif
@@ -375,17 +376,18 @@ H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine,
iod_obj_id_t iod_id = input->iod_id; /* attribute's ID */
hg_bulk_t bulk_handle = input->bulk_handle; /* bulk handle for data */
hid_t type_id = input->type_id; /* datatype ID of data */
+ hid_t space_id = input->space_id; /* dataspace of attribute */
iod_trans_id_t rtid = input->rcxt_num;
hg_bulk_block_t bulk_block_handle; /* HG block handle */
hg_bulk_request_t bulk_request; /* HG request */
- iod_mem_desc_t mem_desc; /* memory descriptor used for reading array */
+ iod_mem_desc_t *mem_desc = NULL; /* memory descriptor used for reading array */
iod_array_iodesc_t file_desc; /* file descriptor used to read array */
iod_hyperslab_t hslabs; /* IOD hyperslab generated from HDF5 filespace */
size_t size; /* size of outgoing bulk data */
void *buf; /* buffer to hold outgoing data */
- hid_t space_id; /* dataspace ID of attribute */
iod_handle_t mdkv_oh; /* metadata KV handle of attribute */
scratch_pad_t sp;
+ int ndims; /* dataset's rank/number of dimensions */
hssize_t num_descriptors = 0; /* number of IOD file descriptors needed to describe filespace selection */
na_addr_t dest = HG_Handler_get_addr(op_data->hg_handle); /* destination address to push data to */
hbool_t opened_locally = FALSE; /* flag to indicate whether we opened the attribute here or if it was already open */
@@ -405,28 +407,30 @@ H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine,
if(NULL == (buf = malloc(size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate read buffer");
- /* MSC - NEED IOD */
+ /* MSC - Not needed if dataspace is available */
#if 0
/* get scratch pad of the attribute */
- if(iod_obj_get_scratch(iod_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(iod_oh, rtid, &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 */
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_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
/* close the metadata scratch pad */
if(iod_obj_close(mdkv_oh, NULL, NULL))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
+#endif
- /* create memory descriptor for reading */
- mem_desc.nfrag = 1;
- mem_desc.frag->addr = buf;
- mem_desc.frag->len = (iod_size_t)size;
+ /* set the memory descriptor */
+ mem_desc = (iod_mem_desc_t *)malloc(sizeof(iod_mem_desc_t) + sizeof(iod_mem_frag_t));
+ mem_desc->nfrag = 1;
+ mem_desc->frag[0].addr = buf;
+ mem_desc->frag[0].len = (iod_size_t)size;
num_descriptors = 1;
@@ -440,15 +444,14 @@ H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine,
hslabs.count = (iod_size_t *)malloc(sizeof(iod_size_t) * ndims);
/* generate the descriptor */
- if(H5VL_iod_get_file_desc(space_id, &num_descriptors, hslabs) < 0)
+ if(H5VL_iod_get_file_desc(space_id, &num_descriptors, &hslabs) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to generate IOD file descriptor from dataspace selection");
/* set the file descriptor */
file_desc = hslabs;
-#endif
/* read from array object */
- if(iod_array_read(iod_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
+ if(iod_array_read(iod_oh, rtid, NULL, mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
{
@@ -486,8 +489,17 @@ done:
input = (attr_io_in_t *)H5MM_xfree(input);
op_data = (op_data_t *)H5MM_xfree(op_data);
+
free(buf);
+ /* free allocated descriptors */
+ free(hslabs.start);
+ free(hslabs.stride);
+ free(hslabs.block);
+ free(hslabs.count);
+ if(mem_desc)
+ free(mem_desc);
+
/* close the attribute if we opened it in this routine */
if(opened_locally) {
if(iod_obj_close(iod_oh, NULL, NULL))
@@ -524,16 +536,17 @@ H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine,
iod_obj_id_t iod_id = input->iod_id; /* attribute's ID */
hg_bulk_t bulk_handle = input->bulk_handle; /* bulk handle for data */
hid_t type_id = input->type_id; /* datatype ID of data */
+ hid_t space_id = input->space_id; /* dataspace of attribute */
iod_trans_id_t wtid = input->trans_num;
iod_trans_id_t rtid = input->rcxt_num;
hg_bulk_block_t bulk_block_handle; /* HG block handle */
hg_bulk_request_t bulk_request; /* HG request */
- iod_mem_desc_t mem_desc; /* memory descriptor used for writing array */
+ iod_mem_desc_t *mem_desc; /* memory descriptor used for writing array */
iod_array_iodesc_t file_desc; /* file descriptor used to write array */
iod_hyperslab_t hslabs; /* IOD hyperslab generated from HDF5 filespace */
size_t size; /* size of outgoing bulk data */
void *buf; /* buffer to hold outgoing data */
- hid_t space_id; /* dataspace ID of attribute */
+ int ndims; /* dataset's rank/number of dimensions */
scratch_pad_t sp;
iod_handle_t mdkv_oh; /* metadata KV handle of attribute */
hssize_t num_descriptors = 0; /* number of IOD file descriptors needed to describe filespace selection*/
@@ -579,27 +592,30 @@ H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine,
}
#endif
- /* MSC - NEED IOD */
+ /* MSC - Not needed if dataspace is available */
#if 0
/* get scratch pad of the attribute */
- if(iod_obj_get_scratch(iod_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(iod_oh, rtid, &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 */
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_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
/* close the metadata scratch pad */
if(iod_obj_close(mdkv_oh, NULL, NULL))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
+#endif
- mem_desc.nfrag = 1;
- mem_desc.frag->addr = buf;
- mem_desc.frag->len = (iod_size_t)size;
+ /* set the memory descriptor */
+ mem_desc = (iod_mem_desc_t *)malloc(sizeof(iod_mem_desc_t) + sizeof(iod_mem_frag_t));
+ mem_desc->nfrag = 1;
+ mem_desc->frag[0].addr = buf;
+ mem_desc->frag[0].len = (iod_size_t)size;
num_descriptors = 1;
@@ -613,15 +629,14 @@ H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine,
hslabs.count = (iod_size_t *)malloc(sizeof(iod_size_t) * ndims);
/* generate the descriptor */
- if(H5VL_iod_get_file_desc(space_id, &num_descriptors, hslabs) < 0)
+ if(H5VL_iod_get_file_desc(space_id, &num_descriptors, &hslabs) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to generate IOD file descriptor from dataspace selection");
/* set the file descriptor */
file_desc = hslabs;
-#endif
/* write from array object */
- if(iod_array_write(iod_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
+ if(iod_array_write(iod_oh, wtid, NULL, mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL, "can't write to array object");
#if H5_DO_NATIVE
@@ -638,8 +653,17 @@ done:
input = (attr_io_in_t *)H5MM_xfree(input);
op_data = (op_data_t *)H5MM_xfree(op_data);
+
free(buf);
+ /* free allocated descriptors */
+ free(hslabs.start);
+ free(hslabs.stride);
+ free(hslabs.block);
+ free(hslabs.count);
+ if(mem_desc)
+ free(mem_desc);
+
/* close the attribute if we opened it in this routine */
if(opened_locally) {
if(iod_obj_close(iod_oh, NULL, NULL))
@@ -691,11 +715,11 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* 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)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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
@@ -718,7 +742,7 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad");
/* get attribute ID */
- if(iod_kv_get_value(attr_kv_oh, IOD_TID_UNKNOWN, attr_name, NULL,
+ if(iod_kv_get_value(attr_kv_oh, rtid, attr_name, NULL,
&kv_size, NULL, NULL) < 0) {
ret = FALSE;
}
@@ -794,11 +818,11 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* 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)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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
@@ -819,7 +843,7 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad");
/* get attribute ID */
- if(H5VL_iod_get_metadata(attr_kv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(attr_kv_oh, rtid, H5VL_IOD_LINK,
old_name, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve Attribute ID from parent KV store");
@@ -829,11 +853,11 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine,
/* remove attribute with old name */
kv.key = old_name;
kvs.kv = &kv;
- if(iod_kv_unlink_keys(attr_kv_oh, IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0)
+ if(iod_kv_unlink_keys(attr_kv_oh, wtid, NULL, (iod_size_t)1, &kvs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair");
/* insert attribute with new name */
- if(H5VL_iod_insert_new_link(attr_kv_oh, IOD_TID_UNKNOWN, new_name,
+ if(H5VL_iod_insert_new_link(attr_kv_oh, wtid, new_name,
H5L_TYPE_HARD, &attr_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -904,11 +928,11 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* 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)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, loc_name, rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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
@@ -930,7 +954,7 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine,
/* get attribute ID */
/* get attribute ID */
- if(H5VL_iod_get_metadata(attr_kv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(attr_kv_oh, rtid, H5VL_IOD_LINK,
attr_name, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve Attribute ID from parent KV store");
@@ -940,9 +964,9 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine,
/* remove attribute */
kv.key = attr_name;
kvs.kv = &kv;
- if(iod_kv_unlink_keys(attr_kv_oh,IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0)
+ if(iod_kv_unlink_keys(attr_kv_oh,wtid, 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)
+ if(iod_obj_unlink(coh, attr_id, wtid, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object");
#if H5_DO_NATIVE
diff --git a/src/H5VLiod_common.h b/src/H5VLiod_common.h
index 628b358..acf7652 100644
--- a/src/H5VLiod_common.h
+++ b/src/H5VLiod_common.h
@@ -138,7 +138,7 @@ MERCURY_GEN_PROC(attr_rename_in_t, ((axe_t)(axe_info))
MERCURY_GEN_PROC(attr_io_in_t, ((axe_t)(axe_info))
((uint64_t)(rcxt_num)) ((uint64_t)(trans_num))
((iod_handle_t)(coh)) ((iod_handle_t)(iod_oh))
- ((iod_obj_id_t)(iod_id))
+ ((iod_obj_id_t)(iod_id)) ((hid_t)(space_id))
((hid_t)(type_id)) ((hg_bulk_t)(bulk_handle)))
MERCURY_GEN_PROC(attr_close_in_t, ((axe_t)(axe_info))
((iod_handle_t)(iod_oh)) ((iod_obj_id_t)(iod_id)))
diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c
index bf35869..1e9e101 100644
--- a/src/H5VLiod_dset.c
+++ b/src/H5VLiod_dset.c
@@ -42,12 +42,13 @@ typedef struct {
size_t mem_type_size;
size_t dset_type_size;
hsize_t nelmts;
+ iod_trans_id_t tid;
} H5VL_iod_server_vl_io_t;
static herr_t
H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id,
hid_t type_id, hbool_t write_op, void *buf,
- size_t buf_size);
+ size_t buf_size, iod_trans_id_t tid);
static herr_t
H5VL__iod_server_adjust_buffer(hid_t from_type_id, hid_t to_type_id, size_t nelmts,
@@ -57,7 +58,7 @@ H5VL__iod_server_adjust_buffer(hid_t from_type_id, hid_t to_type_id, size_t nelm
static herr_t
H5VL__iod_server_vl_data_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id,
hid_t mem_type_id, hid_t dset_type_id, hbool_t write_op,
- void *buf, size_t buf_size, hid_t dxpl_id);
+ void *buf, size_t buf_size, hid_t dxpl_id, iod_trans_id_t tid);
static herr_t
H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
@@ -109,7 +110,7 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the dataset 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,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
@@ -141,7 +142,7 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* create the dataset */
- ret = iod_obj_create(coh, IOD_TID_UNKNOWN, NULL/*hints*/, IOD_OBJ_ARRAY, NULL, &array,
+ ret = iod_obj_create(coh, wtid, NULL/*hints*/, IOD_OBJ_ARRAY, NULL, &array,
&dset_id, NULL /*event*/);
if(collective && (0 == ret || EEXISTS == ret)) {
/* Dataset has been created by another process, open it */
@@ -156,12 +157,12 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
the parent KV, create scratch pad */
if(0 == ret) {
/* create the attribute KV object for the dataset */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &attr_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
/* create the metadata KV object for the dataset */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &mdkv_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
@@ -172,7 +173,7 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
sp.filler2_id = IOD_ID_UNDEFINED;
/* set scratch pad in dataset */
- if (iod_obj_set_scratch(dset_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if (iod_obj_set_scratch(dset_oh, wtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set scratch pad");
/* Open Metadata KV object for write */
@@ -184,29 +185,29 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
dcpl_id = input->dcpl_id;
/* insert plist metadata */
- if(H5VL_iod_insert_plist(mdkv_oh, IOD_TID_UNKNOWN, dcpl_id,
+ if(H5VL_iod_insert_plist(mdkv_oh, wtid, dcpl_id,
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, (uint64_t)1,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, (uint64_t)1,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert object type metadata */
- if(H5VL_iod_insert_object_type(mdkv_oh, IOD_TID_UNKNOWN, H5I_DATASET,
+ if(H5VL_iod_insert_object_type(mdkv_oh, wtid, H5I_DATASET,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* MSC - need to check size of datatype if it fits in
entry otherwise create a BLOB*/
/* insert datatype metadata */
- if(H5VL_iod_insert_datatype(mdkv_oh, IOD_TID_UNKNOWN, input->type_id,
+ if(H5VL_iod_insert_datatype(mdkv_oh, wtid, input->type_id,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert dataspace metadata */
- if(H5VL_iod_insert_dataspace(mdkv_oh, IOD_TID_UNKNOWN, input->space_id,
+ if(H5VL_iod_insert_dataspace(mdkv_oh, wtid, input->space_id,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -215,7 +216,7 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
/* add link in parent group to current object */
- if(H5VL_iod_insert_new_link(cur_oh, IOD_TID_UNKNOWN, last_comp,
+ if(H5VL_iod_insert_new_link(cur_oh, wtid, last_comp,
H5L_TYPE_HARD, &dset_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
}
@@ -285,9 +286,9 @@ 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_trans_id_t rtid = input->rcxt_num;
+ const char *name = input->name; /* name of dset including path to open */
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 */
scratch_pad_t sp;
herr_t ret_value = SUCCEED;
@@ -298,11 +299,11 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* Traverse Path and open dset */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &dset_id, &dset_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, rtid, &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(dset_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(dset_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -311,19 +312,19 @@ H5VL_iod_server_dset_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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.dcpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
- 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, rtid, 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");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
NULL, NULL, &output.type_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &output.space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
#endif
@@ -479,7 +480,8 @@ H5VL_iod_server_dset_read_cb(AXE_engine_t UNUSED axe_engine,
if(!is_vl_data) {
/* If the data is not VL, we can read the data from the array the normal way */
- if(H5VL__iod_server_final_io(coh, iod_oh, space_id, src_id, FALSE, buf, buf_size) < 0) {
+ if(H5VL__iod_server_final_io(coh, iod_oh, space_id, src_id,
+ FALSE, buf, buf_size, rtid) < 0) {
fprintf(stderr, "can't read from array object\n");
ret_value = FAIL;
goto done;
@@ -524,7 +526,7 @@ H5VL_iod_server_dset_read_cb(AXE_engine_t UNUSED axe_engine,
else {
/* If the data is of variable length, special access is required */
if(H5VL__iod_server_vl_data_io(coh, iod_oh, space_id, dst_id, src_id,
- FALSE, buf, buf_size, dxpl_id) < 0)
+ FALSE, buf, buf_size, dxpl_id, rtid) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
#if H5_DO_NATIVE
@@ -756,7 +758,7 @@ H5VL_iod_server_dset_get_vl_size_cb(AXE_engine_t UNUSED axe_engine,
}
/* Read list IO */
- if(iod_array_read_list(coh, IOD_TID_UNKNOWN, (iod_size_t)num_descriptors,
+ if(iod_array_read_list(coh, rtid, (iod_size_t)num_descriptors,
io_array, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
@@ -947,7 +949,8 @@ H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine,
if(H5Tconvert(src_id, dst_id, nelmts, buf, NULL, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed")
- if(H5VL__iod_server_final_io(coh, iod_oh, space_id, dst_id, TRUE, buf, buf_size) < 0)
+ if(H5VL__iod_server_final_io(coh, iod_oh, space_id, dst_id,
+ TRUE, buf, buf_size, wtid) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
#if H5VL_IOD_DEBUG
@@ -964,7 +967,7 @@ H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine,
else {
/* If the data is of variable length, special access is required */
if(H5VL__iod_server_vl_data_io(coh, iod_oh, space_id, src_id, dst_id,
- TRUE, buf, buf_size, dxpl_id) < 0)
+ TRUE, buf, buf_size, dxpl_id, wtid) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
}
@@ -1058,9 +1061,49 @@ H5VL_iod_server_dset_set_extent_cb(AXE_engine_t UNUSED axe_engine,
}
/* extend along the first dimension only */
- if(iod_array_extend(iod_oh, IOD_TID_UNKNOWN, (iod_size_t)input->dims.size[0], NULL) < 0)
+ if(iod_array_extend(iod_oh, wtid, (iod_size_t)input->dims.size[0], NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't extend dataset");
+#if 0 /* MSC - NEED IOD */
+ /* modify the dataspace of the dataset */
+ {
+ int rank;
+ hid_t space_id;
+ scratch_pad_t sp;
+ iod_handle_t mdkv_oh;
+
+ /* get scratch pad of the dataset */
+ if(iod_obj_get_scratch(iod_oh, rtid, &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");
+
+ /* get the stored dataset dataspace */
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ NULL, NULL, &space_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
+
+ /* Check if we are shrinking or expanding any of the dimensions */
+ if((rank = H5Sget_simple_extent_ndims(space_id)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions");
+
+ /* Modify the size of the data space */
+ if(H5Sset_extent_simple(space_id, rank, dims.size, NULL) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space");
+
+ /* insert dataspace metadata */
+ if(H5VL_iod_insert_dataspace(mdkv_oh, wtid, space_id,
+ 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");
+ }
+#endif
+
#if H5_DO_NATIVE
ret_value = H5Dset_extent(iod_oh.cookie, input->dims.size);
#endif
@@ -1161,7 +1204,7 @@ done:
static herr_t
H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id,
hid_t type_id, hbool_t write_op, void *buf,
- size_t buf_size)
+ size_t buf_size, iod_trans_id_t tid)
{
int ndims, i; /* dataset's rank/number of dimensions */
hssize_t num_descriptors = 0, n; /* number of IOD file descriptors needed to describe filespace selection */
@@ -1265,13 +1308,13 @@ H5VL__iod_server_final_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id,
if(write_op) {
/* Write list IO */
- if(iod_array_write_list(coh, IOD_TID_UNKNOWN, (iod_size_t)num_descriptors,
+ if(iod_array_write_list(coh, tid, (iod_size_t)num_descriptors,
io_array, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
}
else {
/* Read list IO */
- if(iod_array_read_list(coh, IOD_TID_UNKNOWN, (iod_size_t)num_descriptors,
+ if(iod_array_read_list(coh, tid, (iod_size_t)num_descriptors,
io_array, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
}
@@ -1440,7 +1483,7 @@ done:
static herr_t
H5VL__iod_server_vl_data_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_id,
hid_t mem_type_id, hid_t dset_type_id, hbool_t write_op,
- void *buf, size_t buf_size, hid_t dxpl_id)
+ void *buf, size_t buf_size, hid_t dxpl_id, iod_trans_id_t tid)
{
char bogus; /* bogus value to pass to H5Diterate() */
H5VL_iod_server_vl_io_t udata;
@@ -1458,6 +1501,7 @@ H5VL__iod_server_vl_data_io(iod_handle_t coh, iod_handle_t iod_oh, hid_t space_i
udata.buf_ptr = (uint8_t *)buf;
udata.write_op = write_op;
udata.buf_size = buf_size;
+ udata.tid = tid;
class = H5Tget_class(mem_type_id);
@@ -1516,6 +1560,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
H5VL_iod_server_vl_io_t *udata = (H5VL_iod_server_vl_io_t *)_udata;
iod_handle_t coh = udata->coh; /* container handle */
size_t nelmts = udata->nelmts;
+ iod_trans_id_t tid = udata->tid;
iod_obj_id_t blob_id = 0;
iod_handle_t blob_oh;
iod_hyperslab_t hslab;
@@ -1551,7 +1596,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
file_desc = hslab;
- if(iod_array_read(udata->iod_oh, IOD_TID_UNKNOWN, NULL,
+ if(iod_array_read(udata->iod_oh, tid, NULL,
mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
@@ -1563,7 +1608,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
/* create a blob object if one has not been created yet */
if(0 == blob_id) {
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL/*hints*/, IOD_OBJ_BLOB, NULL, NULL,
+ if(iod_obj_create(coh, tid, NULL/*hints*/, IOD_OBJ_BLOB, NULL, NULL,
&blob_id, NULL /*event*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "Failed to create BLOB object");
}
@@ -1612,7 +1657,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
blob_desc->frag[0].len = (iod_size_t)buf_size;
/* write the VL data to the blob */
- if(iod_blob_write(blob_oh, IOD_TID_UNKNOWN, NULL, mem_desc, blob_desc, NULL, NULL) < 0)
+ if(iod_blob_write(blob_oh, tid, NULL, mem_desc, blob_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
free(mem_desc);
@@ -1631,7 +1676,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
mem_desc->frag[1].len = sizeof(iod_size_t);
/* write the blob ID & size to the array element */
- if(iod_array_write(udata->iod_oh, IOD_TID_UNKNOWN, NULL,
+ if(iod_array_write(udata->iod_oh, tid, NULL,
mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_READERROR, FAIL, "can't read from array object");
@@ -1664,7 +1709,7 @@ H5VL__iod_server_vl_data_io_cb(void UNUSED *elem, hid_t type_id, unsigned ndims,
blob_desc->frag[0].len = old_seq_len * udata->mem_type_size;
/* read the VL data from the blob */
- if(iod_blob_read(blob_oh, IOD_TID_UNKNOWN, NULL, mem_desc, blob_desc, NULL, NULL) < 0)
+ if(iod_blob_read(blob_oh, tid, NULL, mem_desc, blob_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
udata->buf_ptr += old_seq_len * udata->mem_type_size;
diff --git a/src/H5VLiod_dtype.c b/src/H5VLiod_dtype.c
index 3c6ac58..f08a4b6 100644
--- a/src/H5VLiod_dtype.c
+++ b/src/H5VLiod_dtype.c
@@ -76,12 +76,12 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the datatype 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,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
/* create the datatype */
- ret = iod_obj_create(coh, IOD_TID_UNKNOWN, NULL/*hints*/, IOD_OBJ_BLOB, NULL, NULL,
+ ret = iod_obj_create(coh, wtid, NULL/*hints*/, IOD_OBJ_BLOB, NULL, NULL,
&dtype_id, NULL /*event*/);
if(collective && (0 == ret || EEXISTS == ret)) {
/* Datatype has been created by another process, open it */
@@ -96,12 +96,12 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
the parent KV, create scratch pad */
if(0 == ret) {
/* create the metadata KV object for the datatype */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &mdkv_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
/* create the attribute KV object for the datatype */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &attr_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
@@ -112,7 +112,7 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
sp.filler2_id = IOD_ID_UNDEFINED;
/* set scratch pad in datatype */
- if (iod_obj_set_scratch(dtype_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if (iod_obj_set_scratch(dtype_oh, wtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set scratch pad");
/* Store Metadata in scratch pad */
@@ -142,7 +142,7 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
file_desc->frag[0].len = (iod_size_t)buf_size;
/* write the serialized type value to the BLOB object */
- if(iod_blob_write(dtype_oh, IOD_TID_UNKNOWN, NULL, mem_desc, file_desc, NULL, NULL) < 0)
+ if(iod_blob_write(dtype_oh, wtid, NULL, mem_desc, file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
free(mem_desc);
@@ -153,17 +153,17 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
tcpl_id = input->tcpl_id;
/* insert plist metadata */
- if(H5VL_iod_insert_plist(mdkv_oh, IOD_TID_UNKNOWN, tcpl_id,
+ if(H5VL_iod_insert_plist(mdkv_oh, wtid, tcpl_id,
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, (uint64_t)1,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, (uint64_t)1,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert object type metadata */
- if(H5VL_iod_insert_object_type(mdkv_oh, IOD_TID_UNKNOWN, H5I_DATATYPE,
+ if(H5VL_iod_insert_object_type(mdkv_oh, wtid, H5I_DATATYPE,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -177,7 +177,7 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
kv.value_len = sizeof(iod_size_t);
kv.value = &buf_size;
- if (iod_kv_set(mdkv_oh, IOD_TID_UNKNOWN, NULL, &kv, NULL, NULL) < 0)
+ if (iod_kv_set(mdkv_oh, wtid, NULL, &kv, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent");
free(key);
@@ -188,7 +188,7 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
/* add link in parent group to current object */
- if(H5VL_iod_insert_new_link(cur_oh, IOD_TID_UNKNOWN, last_comp,
+ if(H5VL_iod_insert_new_link(cur_oh, wtid, last_comp,
H5L_TYPE_HARD, &dtype_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
}
@@ -274,11 +274,11 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* Traverse Path and open dtype */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &dtype_id, &dtype_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, rtid, &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(dtype_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(dtype_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -287,11 +287,11 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine,
/* MSC - NEED IOD */
#if 0
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
@@ -299,7 +299,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine,
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,
+ if(iod_kv_get_value(mdkv_oh, rtid, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size,
&kv_size, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "datatype size lookup failed");
@@ -324,7 +324,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine,
file_desc->frag[0].len = (iod_size_t)buf_size;
/* read the serialized type value from the BLOB object */
- if(iod_blob_read(dtype_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
+ if(iod_blob_read(dtype_oh, rtid, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
free(mem_desc);
diff --git a/src/H5VLiod_group.c b/src/H5VLiod_group.c
index 89d202d..466a039 100644
--- a/src/H5VLiod_group.c
+++ b/src/H5VLiod_group.c
@@ -74,12 +74,12 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
/* 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,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
/* create the group */
- ret = iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ ret = iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &grp_id, NULL);
if(collective && (0 == ret || EEXISTS == ret)) {
/* group has been created by another process, open it */
@@ -94,12 +94,12 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
the scratch pad for it too */
if(0 == ret) {
/* create the metadata KV object for the group */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &mdkv_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
/* create the attribute KV object for the group */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &attr_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
@@ -110,7 +110,7 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
sp.filler2_id = IOD_ID_UNDEFINED;
/* set scratch pad in group */
- if (iod_obj_set_scratch(grp_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if (iod_obj_set_scratch(grp_oh, wtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set scratch pad");
/* store metadata */
@@ -123,17 +123,17 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
gcpl_id = input->gcpl_id;
/* insert plist metadata */
- if(H5VL_iod_insert_plist(mdkv_oh, IOD_TID_UNKNOWN, gcpl_id,
+ if(H5VL_iod_insert_plist(mdkv_oh, wtid, gcpl_id,
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, (uint64_t)1,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, (uint64_t)1,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert object type metadata */
- if(H5VL_iod_insert_object_type(mdkv_oh, IOD_TID_UNKNOWN, H5I_GROUP,
+ if(H5VL_iod_insert_object_type(mdkv_oh, wtid, H5I_GROUP,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -142,7 +142,7 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
/* add link in parent group to current object */
- if(H5VL_iod_insert_new_link(cur_oh, IOD_TID_UNKNOWN, last_comp,
+ if(H5VL_iod_insert_new_link(cur_oh, wtid, last_comp,
H5L_TYPE_HARD, &grp_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
} /* end if */
@@ -222,11 +222,11 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* Traverse Path and open group */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &grp_id, &grp_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, rtid, &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(grp_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(grp_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -235,11 +235,11 @@ 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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
diff --git a/src/H5VLiod_link.c b/src/H5VLiod_link.c
index fb8c89c..5287cf6 100644
--- a/src/H5VLiod_link.c
+++ b/src/H5VLiod_link.c
@@ -66,8 +66,8 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the link needs
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,
- &src_last_comp, &src_id, &src_oh) < 0)
+ if(H5VL_iod_server_traverse(coh, input->loc_id, input->loc_oh, input->loc_name,
+ rtid, FALSE, &src_last_comp, &src_id, &src_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
#if H5VL_IOD_DEBUG
@@ -81,23 +81,24 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine,
/* 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)
+ input->target_name, rtid, &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,
+ if(H5VL_iod_insert_new_link(src_oh, wtid, 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 - must get mdkvID from client, not get here. */
/* get scratch pad */
- if(iod_obj_get_scratch(target_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(target_oh, rtid, &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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
@@ -105,7 +106,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine,
link_count ++;
/* insert link count metadata */
- if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, link_count,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -121,7 +122,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine,
}
else if(H5VL_LINK_CREATE_SOFT == create_type) {
/* add link in parent group to the source location */
- if(H5VL_iod_insert_new_link(src_oh, IOD_TID_UNKNOWN, src_last_comp,
+ if(H5VL_iod_insert_new_link(src_oh, wtid, src_last_comp,
H5L_TYPE_SOFT, input->link_value,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -214,30 +215,30 @@ 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, &src_last_comp, &src_id, &src_oh) < 0)
+ rtid, 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, &dst_last_comp, &dst_id, &dst_oh) < 0)
+ rtid, FALSE, &dst_last_comp, &dst_id, &dst_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
/* get the link value */
- if(H5VL_iod_get_metadata(src_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(src_oh, rtid, H5VL_IOD_LINK,
src_last_comp, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
/* Insert object in the destination path */
if(H5L_TYPE_HARD == iod_link.link_type) {
- if(H5VL_iod_insert_new_link(dst_oh, IOD_TID_UNKNOWN, dst_last_comp,
+ if(H5VL_iod_insert_new_link(dst_oh, wtid, dst_last_comp,
iod_link.link_type, &iod_link.u.iod_id,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
}
else if(H5L_TYPE_SOFT == iod_link.link_type) {
- if(H5VL_iod_insert_new_link(dst_oh, IOD_TID_UNKNOWN, dst_last_comp,
+ if(H5VL_iod_insert_new_link(dst_oh, wtid, dst_last_comp,
iod_link.link_type, &iod_link.u.symbolic_name,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -251,7 +252,7 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine,
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)
+ if(iod_kv_unlink_keys(src_oh, wtid, NULL, (iod_size_t)1, &kvs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair");
}
@@ -267,14 +268,14 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine,
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)
+ if(iod_obj_get_scratch(target_oh, rtid, &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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
@@ -282,7 +283,7 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine,
link_count ++;
/* insert link count metadata */
- if(H5VL_iod_insert_link_count(mdkv_oh, IOD_TID_UNKNOWN, link_count,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, link_count,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -384,14 +385,14 @@ H5VL_iod_server_link_exists_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the link needs
to be checked */
- if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, FALSE,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0) {
ret = FALSE;
HGOTO_DONE(SUCCEED);
}
/* check the last component */
- if(iod_kv_get_value(cur_oh, IOD_TID_UNKNOWN, last_comp,
+ if(iod_kv_get_value(cur_oh, rtid, last_comp,
NULL, &kv_size, NULL, NULL) < 0) {
ret = FALSE;
} /* end if */
@@ -466,7 +467,7 @@ H5VL_iod_server_link_get_info_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the link needs
to be checked */
- if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, FALSE,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
@@ -475,7 +476,7 @@ H5VL_iod_server_link_get_info_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* lookup link information in the current location */
- if(H5VL_iod_get_metadata(cur_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(cur_oh, rtid, H5VL_IOD_LINK,
last_comp, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
@@ -568,7 +569,7 @@ H5VL_iod_server_link_get_val_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the link needs
to be checked */
- if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, FALSE,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
@@ -577,7 +578,7 @@ H5VL_iod_server_link_get_val_cb(AXE_engine_t UNUSED axe_engine,
#endif
/* lookup link information in the current location */
- if(H5VL_iod_get_metadata(cur_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(cur_oh, rtid, H5VL_IOD_LINK,
last_comp, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
@@ -673,19 +674,19 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine,
/* 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,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_oh, loc_name, rtid,
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(H5VL_iod_get_metadata(cur_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(cur_oh, rtid, H5VL_IOD_LINK,
last_comp, NULL, NULL, &iod_link) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
/* unlink object from conainer */
kv.key = last_comp;
kvs.kv = &kv;
- if(iod_kv_unlink_keys(cur_oh, IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0)
+ if(iod_kv_unlink_keys(cur_oh, wtid, NULL, (iod_size_t)1, &kvs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair");
/* MSC - NEED IOD */
@@ -705,14 +706,14 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine,
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)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
@@ -722,7 +723,7 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine,
/* 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,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, link_count,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
}
@@ -735,11 +736,11 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine,
/* 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)
+ if(iod_obj_unlink(coh, obj_id, wtid, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object");
- if(iod_obj_unlink(coh, sp.mdkv_id, IOD_TID_UNKNOWN, NULL) < 0)
+ if(iod_obj_unlink(coh, sp.mdkv_id, wtid, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object");
- if(iod_obj_unlink(coh, sp.attrkv_id, IOD_TID_UNKNOWN, NULL) < 0)
+ if(iod_obj_unlink(coh, sp.attrkv_id, wtid, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object");
}
}
diff --git a/src/H5VLiod_map.c b/src/H5VLiod_map.c
index f49260f..f8af268 100644
--- a/src/H5VLiod_map.c
+++ b/src/H5VLiod_map.c
@@ -76,12 +76,12 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine,
/* the traversal will retrieve the location where the map 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,
+ if(H5VL_iod_server_traverse(coh, loc_id, loc_handle, name, rtid, FALSE,
&last_comp, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
/* create the map */
- ret = iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ ret = iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &map_id, NULL);
if(collective && (0 == ret || EEXISTS == ret)) {
/* map has been created by another process, open it */
@@ -96,12 +96,12 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine,
the scratch pad for it too */
if(0 == ret) {
/* create the metadata KV object for the map */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &mdkv_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
/* create the attribute KV object for the root group */
- if(iod_obj_create(coh, IOD_TID_UNKNOWN, NULL, IOD_OBJ_KV,
+ if(iod_obj_create(coh, wtid, NULL, IOD_OBJ_KV,
NULL, NULL, &attr_id, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object");
@@ -112,7 +112,7 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine,
sp.filler2_id = IOD_ID_UNDEFINED;
/* set scratch pad in map */
- if (iod_obj_set_scratch(map_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if (iod_obj_set_scratch(map_oh, wtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set scratch pad");
/* Open Metadata KV object for write */
@@ -124,17 +124,17 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine,
mcpl_id = input->mcpl_id;
/* insert plist metadata */
- if(H5VL_iod_insert_plist(mdkv_oh, IOD_TID_UNKNOWN, mcpl_id,
+ if(H5VL_iod_insert_plist(mdkv_oh, wtid, mcpl_id,
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, (uint64_t)1,
+ if(H5VL_iod_insert_link_count(mdkv_oh, wtid, (uint64_t)1,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
/* insert object type metadata */
- if(H5VL_iod_insert_object_type(mdkv_oh, IOD_TID_UNKNOWN, H5I_MAP,
+ if(H5VL_iod_insert_object_type(mdkv_oh, wtid, H5I_MAP,
NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
@@ -146,7 +146,7 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
/* add link in parent group to current object */
- if(H5VL_iod_insert_new_link(cur_oh, IOD_TID_UNKNOWN, last_comp,
+ if(H5VL_iod_insert_new_link(cur_oh, wtid, last_comp,
H5L_TYPE_HARD, &map_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
} /* end if */
@@ -223,11 +223,11 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine,
output.valtype_id = -1;
/* Traverse Path and open map */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, &map_id, &map_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_handle, name, rtid, &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(map_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(map_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -236,11 +236,11 @@ 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_PLIST,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST,
H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.mcpl_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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
@@ -376,7 +376,7 @@ H5VL_iod_server_map_set_cb(AXE_engine_t UNUSED axe_engine,
kv.value = val_buf;
kv.value_len = (iod_size_t)val_size;
/* insert kv pair into scratch pad */
- if (iod_kv_set(iod_oh, IOD_TID_UNKNOWN, NULL, &kv, NULL, NULL) < 0)
+ if (iod_kv_set(iod_oh, wtid, NULL, &kv, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent");
done:
@@ -491,7 +491,7 @@ H5VL_iod_server_map_get_cb(AXE_engine_t UNUSED axe_engine,
if(NULL == (val_buf = malloc((size_t)val_size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate buffer");
- if(iod_kv_get_value(iod_oh, IOD_TID_UNKNOWN, key_buf, val_buf,
+ if(iod_kv_get_value(iod_oh, rtid, key_buf, val_buf,
&src_size, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve value from parent KV store");
@@ -582,7 +582,7 @@ H5VL_iod_server_map_get_count_cb(AXE_engine_t UNUSED axe_engine,
opened_locally = TRUE;
}
- if(iod_kv_get_num(iod_oh, IOD_TID_UNKNOWN, &num, NULL) < 0)
+ if(iod_kv_get_num(iod_oh, rtid, &num, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve Number of KV pairs in MAP");
/* MSC - fake something for now */
@@ -684,7 +684,7 @@ H5VL_iod_server_map_exists_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed")
/* determine if the Key exists by querying its value size */
- if(iod_kv_get_value(iod_oh, IOD_TID_UNKNOWN, key_buf, NULL,
+ if(iod_kv_get_value(iod_oh, rtid, key_buf, NULL,
&val_size, NULL, NULL) < 0)
exists = FALSE;
else
@@ -791,7 +791,7 @@ H5VL_iod_server_map_delete_cb(AXE_engine_t UNUSED axe_engine,
kv.key = key_buf;
kvs.kv = &kv;
- if(iod_kv_unlink_keys(iod_oh,IOD_TID_UNKNOWN, NULL, (iod_size_t)1, &kvs, NULL) < 0)
+ if(iod_kv_unlink_keys(iod_oh, wtid, NULL, (iod_size_t)1, &kvs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink KV pair");
done:
diff --git a/src/H5VLiod_obj.c b/src/H5VLiod_obj.c
index 83a618a..2b80ed9 100644
--- a/src/H5VLiod_obj.c
+++ b/src/H5VLiod_obj.c
@@ -63,11 +63,11 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine,
/* 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)
+ rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -76,35 +76,35 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine,
/* MSC - NEED IOD */
#if 0
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
NULL, NULL, &output.obj_type) < 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,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, 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");
switch(output.obj_type) {
case H5I_MAP:
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.cpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
break;
case H5I_GROUP:
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.cpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
break;
case H5I_DATASET:
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.cpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
NULL, NULL, &output.type_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &output.space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
break;
@@ -116,7 +116,7 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine,
iod_blob_iodesc_t file_desc; /* file descriptor used to write */
/* retrieve blob size metadata from scratch pad */
- if(iod_kv_get_value(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size,
+ if(iod_kv_get_value(mdkv_oh, rtid, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size,
sizeof(iod_size_t), NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "datatype size lookup failed");
@@ -134,7 +134,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(obj_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
+ if(iod_blob_read(obj_oh, rtid, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
/* decode the datatype */
@@ -267,28 +267,28 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine,
/* 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)
+ rtid, &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
intermediate group does not exist. */
if(H5VL_iod_server_traverse(coh, input->dst_loc_id, input->dst_loc_oh, input->dst_loc_name,
- FALSE, &new_name, &dst_id, &dst_oh) < 0)
+ FALSE, rtid, &new_name, &dst_id, &dst_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't traverse path");
/* MSC - NEED IOD & a lot more work*/
#if 0
/* get scratch pad of the object */
- if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &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_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
NULL, NULL, &obj_type) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count");
@@ -296,20 +296,20 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine,
case H5I_MAP:
break;
case H5I_GROUP:
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.cpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
break;
case H5I_DATASET:
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL,
NULL, NULL, &output.cpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE,
NULL, NULL, &output.type_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype");
- if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE,
NULL, NULL, &output.space_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace");
break;
@@ -321,7 +321,7 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine,
iod_blob_iodesc_t file_desc; /* file descriptor used to write */
/* retrieve blob size metadata from scratch pad */
- if(iod_kv_get_value(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size,
+ if(iod_kv_get_value(mdkv_oh, rtid, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size,
sizeof(iod_size_t), NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "datatype size lookup failed");
@@ -339,7 +339,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(obj_oh, IOD_TID_UNKNOWN, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
+ if(iod_blob_read(obj_oh, rtid, NULL, &mem_desc, &file_desc, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write BLOB object");
/* decode the datatype */
@@ -364,7 +364,7 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't close object");
/* Insert object in the destination path */
- if(H5VL_iod_insert_new_link(dst_oh, IOD_TID_UNKNOWN, new_name,
+ if(H5VL_iod_insert_new_link(dst_oh, wtid, new_name,
H5L_TYPE_HARD, &obj_id, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't insert KV value");
#endif
@@ -432,7 +432,7 @@ H5VL_iod_server_object_exists_cb(AXE_engine_t UNUSED axe_engine,
FUNC_ENTER_NOAPI_NOINIT
/* Traverse Path and open object */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0) {
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, rtid, &obj_id, &obj_oh) < 0) {
ret = FALSE;
HGOTO_DONE(SUCCEED);
}
@@ -497,21 +497,20 @@ H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine,
iod_obj_id_t obj_id;
scratch_pad_t sp;
H5I_type_t obj_type;
- int num_attrs;
+ iod_size_t num_attrs = 0;
const char *loc_name = input->loc_name;
- htri_t ret = -1;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
/* Traverse Path and open object */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, rtid, &obj_id, &obj_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "object does not exist");
oinfo.addr = obj_id;
/* get scratch pad of the object */
- if(iod_obj_get_scratch(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -522,7 +521,7 @@ H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine,
if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attrkv_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_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
NULL, NULL, &obj_type) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count");
@@ -546,11 +545,11 @@ H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine,
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unsupported object type for H5Oget_info");
}
- 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, rtid, H5VL_IOD_LINK_COUNT, H5VL_IOD_KEY_OBJ_LINK_COUNT,
NULL, NULL, &oinfo.rc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count");
- if(iod_kv_get_num(attrkv_oh, IOD_TID_UNKNOWN, &num_attrs, NULL) < 0)
+ if(iod_kv_get_num(attrkv_oh, rtid, &num_attrs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve attribute count");
oinfo.num_attrs = num_attrs;
@@ -583,7 +582,7 @@ done:
oinfo.type = H5O_TYPE_UNKNOWN;
oinfo.addr = IOD_ID_UNDEFINED;
oinfo.rc = 0;
- oinfo.num_attrs = -1;
+ oinfo.num_attrs = 0;
HG_Handler_start_output(op_data->hg_handle, &oinfo);
}
@@ -630,11 +629,11 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine,
FUNC_ENTER_NOAPI_NOINIT
/* Traverse Path and open object */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -650,7 +649,7 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine,
kv.value_len = strlen(comment) + 1;
kv.value = &comment;
- if (iod_kv_set(mdkv_oh, IOD_TID_UNKNOWN, NULL, &kv, NULL, NULL) < 0)
+ if (iod_kv_set(mdkv_oh, wtid, NULL, &kv, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent");
free(key);
@@ -721,11 +720,11 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine,
FUNC_ENTER_NOAPI_NOINIT
/* Traverse Path and open object */
- if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, &obj_id, &obj_oh) < 0)
+ if(H5VL_iod_server_open_path(coh, loc_id, loc_oh, loc_name, rtid, &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(obj_oh, IOD_TID_UNKNOWN, &sp, NULL, NULL) < 0)
+ if(iod_obj_get_scratch(obj_oh, rtid, &sp, NULL, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
/* open the metadata scratch pad */
@@ -738,14 +737,14 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine,
/* MSC - NEED IOD */
#if 0
- if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_OBJ_COMMENT, NULL,
+ if(iod_kv_get_value(oh, rtid, H5VL_IOD_KEY_OBJ_COMMENT, NULL,
&size, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "lookup failed");
if(NULL == (value = malloc (size)))
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate value buffer");
- if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_OBJ_COMMENT, value,
+ if(iod_kv_get_value(oh, rtid, H5VL_IOD_KEY_OBJ_COMMENT, value,
&size, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "lookup failed");
diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h
index 1207abc..d77f8f9 100644
--- a/src/H5VLiod_server.h
+++ b/src/H5VLiod_server.h
@@ -353,12 +353,12 @@ H5_DLL void H5VL_iod_server_trans_abort_cb(AXE_engine_t axe_engine,
/* Helper routines used several times in different places */
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,
+ const char *path, iod_trans_id_t tid, 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);
+ iod_handle_t loc_handle, const char *path,
+ iod_trans_id_t tid, /*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/H5VLiod_util.c b/src/H5VLiod_util.c
index f36f3ea..9ffb462 100644
--- a/src/H5VLiod_util.c
+++ b/src/H5VLiod_util.c
@@ -49,7 +49,7 @@
*/
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,
+ const char *path, iod_trans_id_t rtid, hbool_t create_interm_grps,
/* out */char **last_comp, /* out */iod_obj_id_t *iod_id,
/* out */iod_handle_t *iod_oh)
{
@@ -63,6 +63,7 @@ H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc
FUNC_ENTER_NOAPI_NOINIT
+ /* Creating intermediate groups is not supported for now */
assert(FALSE == create_interm_grps);
cur_oh = loc_handle;
@@ -70,7 +71,7 @@ H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc
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)
+ if (iod_obj_open_read(coh, loc_id, NULL /*hints*/, &cur_oh, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group");
}
@@ -112,7 +113,7 @@ H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc
prev_oh = cur_oh;
/* lookup next object in the current group */
- if(H5VL_iod_get_metadata(cur_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(cur_oh, rtid, H5VL_IOD_LINK,
comp, NULL, NULL, &value) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
@@ -130,7 +131,7 @@ H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc
/* Traverse Path and open the target object */
if(H5VL_iod_server_open_path(coh, cur_id, cur_oh, value.u.symbolic_name,
- &cur_id, &cur_oh) < 0)
+ rtid, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object");
free(value.u.symbolic_name);
@@ -145,7 +146,7 @@ H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc
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)
+ if (iod_obj_open_read(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 */
@@ -183,7 +184,8 @@ done:
*/
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)
+ const char *path, iod_trans_id_t rtid,
+ /*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 */
@@ -200,7 +202,7 @@ H5VL_iod_server_open_path(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t lo
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)
+ if (iod_obj_open_read(coh, loc_id, NULL /*hints*/, &cur_oh, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group");
}
@@ -233,7 +235,7 @@ H5VL_iod_server_open_path(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t lo
prev_oh = cur_oh;
/* lookup next object in the current group */
- if(H5VL_iod_get_metadata(cur_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK,
+ if(H5VL_iod_get_metadata(cur_oh, rtid, H5VL_IOD_LINK,
comp, NULL, NULL, &value) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
@@ -247,7 +249,7 @@ H5VL_iod_server_open_path(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t lo
/* Traverse Path and open the target object */
if(H5VL_iod_server_open_path(coh, cur_id, cur_oh, value.u.symbolic_name,
- &cur_id, &cur_oh) < 0)
+ rtid, &cur_id, &cur_oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't open object");
free(value.u.symbolic_name);
@@ -262,7 +264,7 @@ H5VL_iod_server_open_path(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t lo
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)
+ if (iod_obj_open_read(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 */
@@ -732,6 +734,9 @@ H5VL_iod_insert_new_link(iod_handle_t oh, iod_trans_id_t tid, const char *link_n
break;
}
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_EXTERNAL:
+ case H5L_TYPE_MAX:
default:
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unsupported link type");
}
@@ -867,6 +872,9 @@ H5VL_iod_get_metadata(iod_handle_t oh, iod_trans_id_t tid, H5VL_iod_metadata_t m
case H5L_TYPE_SOFT:
iod_link->u.symbolic_name = strdup((char *)val_ptr);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_EXTERNAL:
+ case H5L_TYPE_MAX:
default:
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unsupported link type");
}