diff options
-rw-r--r-- | src/H5VLiod.c | 4 | ||||
-rw-r--r-- | src/H5VLiod_attr.c | 46 | ||||
-rw-r--r-- | src/H5VLiod_dset.c | 20 | ||||
-rw-r--r-- | src/H5VLiod_dtype.c | 14 | ||||
-rw-r--r-- | src/H5VLiod_file.c | 14 | ||||
-rw-r--r-- | src/H5VLiod_group.c | 14 | ||||
-rw-r--r-- | src/H5VLiod_link.c | 16 | ||||
-rw-r--r-- | src/H5VLiod_map.c | 14 | ||||
-rw-r--r-- | src/H5VLiod_obj.c | 22 | ||||
-rw-r--r-- | src/H5VLiod_server.h | 7 | ||||
-rw-r--r-- | src/H5VLiod_util.c | 6 |
11 files changed, 88 insertions, 89 deletions
diff --git a/src/H5VLiod.c b/src/H5VLiod.c index f6c2995..31bb0f6 100644 --- a/src/H5VLiod.c +++ b/src/H5VLiod.c @@ -6025,7 +6025,11 @@ H5VL_iod_map_get(void *_map, hid_t key_mem_type_id, const void *key, info->val_ptr = value; info->val_cs_ptr = NULL; info->val_is_vl = val_is_vl; + + /* The value size expected to be received. If VL data, this will + be 0, because the first call would be to get the value size */ info->val_size = val_size; + info->rcxt_id = rcxt_id; info->key.buf_size = key_size; info->key.buf = key; diff --git a/src/H5VLiod_attr.c b/src/H5VLiod_attr.c index aba222a..fb7e875 100644 --- a/src/H5VLiod_attr.c +++ b/src/H5VLiod_attr.c @@ -59,7 +59,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, const char *attr_name = input->attr_name; /* attribute's name */ 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; + scratch_pad sp; iod_ret_t ret; hbool_t collective = FALSE; /* MSC - change when we allow for collective */ herr_t ret_value = SUCCEED; @@ -108,10 +108,10 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = IOD_ID_UNDEFINED; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = IOD_ID_UNDEFINED; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in attribute */ if (iod_obj_set_scratch(attr_oh, wtid, &sp, NULL, NULL) < 0) @@ -147,7 +147,7 @@ H5VL_iod_server_attr_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't get scratch pad for object"); /* open the attribute KV in scratch pad */ - if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attr_kv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[1], NULL /*hints*/, &attr_kv_oh, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* insert new attribute in scratch pad of current object */ @@ -228,7 +228,7 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, 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 */ - scratch_pad_t sp; + scratch_pad sp; H5VL_iod_link_t iod_link; herr_t ret_value = SUCCEED; @@ -250,12 +250,12 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, /* MSC - Dont do this check until we have a real IOD */ #if 0 /* if attribute KV does not exist, return error*/ - if(IOD_ID_UNDEFINED == sp.attr_id) + if(IOD_ID_UNDEFINED == sp[1]) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "Object has no attributes"); #endif /* open the attribute KV in scratch pad */ - if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attr_kv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[1], NULL /*hints*/, &attr_kv_oh, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* get attribute ID */ @@ -283,7 +283,7 @@ H5VL_iod_server_attr_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); #if 0 @@ -386,7 +386,7 @@ H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine, size_t size; /* size of outgoing bulk data */ void *buf; /* buffer to hold outgoing data */ iod_handle_t mdkv_oh; /* metadata KV handle of attribute */ - scratch_pad_t sp; + scratch_pad 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 */ @@ -414,7 +414,7 @@ H5VL_iod_server_attr_read_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE, @@ -547,7 +547,7 @@ H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine, size_t size; /* size of outgoing bulk data */ void *buf; /* buffer to hold outgoing data */ int ndims; /* dataset's rank/number of dimensions */ - scratch_pad_t sp; + scratch_pad 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*/ na_addr_t source = HG_Handler_get_addr(op_data->hg_handle); /* source address to pull data from */ @@ -599,7 +599,7 @@ H5VL_iod_server_attr_write_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE, @@ -703,7 +703,7 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t obj_id; const char *loc_name = input->path; /* path to start hierarchy traversal */ const char *attr_name = input->attr_name; /* attribute's name */ - scratch_pad_t sp; + scratch_pad sp; iod_size_t kv_size = 0; htri_t ret = -1; herr_t ret_value = SUCCEED; @@ -731,14 +731,14 @@ H5VL_iod_server_attr_exists_cb(AXE_engine_t UNUSED axe_engine, /* MSC - Dont do this check until we have a real IOD */ #if 0 /* if attribute KV does not exist, return false*/ - if(IOD_ID_UNDEFINED == sp.attr_id) { + if(IOD_ID_UNDEFINED == sp[1]) { ret = FALSE; HGOTO_DONE(SUCCEED); } #endif /* open the attribute KV in scratch pad */ - if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attr_kv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[1], NULL /*hints*/, &attr_kv_oh, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* get attribute ID */ @@ -808,7 +808,7 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine, iod_kv_params_t kvs; /* KV lists for objects - used to unlink attribute object */ iod_kv_t kv; /* KV entry */ H5VL_iod_link_t iod_link; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -834,12 +834,12 @@ H5VL_iod_server_attr_rename_cb(AXE_engine_t UNUSED axe_engine, /* MSC - Dont do this check until we have a real IOD */ #if 0 /* if attribute KV does not exist, return error*/ - if(IOD_ID_UNDEFINED == sp.attr_id) + if(IOD_ID_UNDEFINED == sp[1]) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "Object has no attributes"); #endif /* open the attribute KV in scratch pad */ - if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attr_kv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[1], NULL /*hints*/, &attr_kv_oh, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* get attribute ID */ @@ -918,7 +918,7 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, iod_kv_params_t kvs; iod_kv_t kv; H5VL_iod_link_t iod_link; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -944,12 +944,12 @@ H5VL_iod_server_attr_remove_cb(AXE_engine_t UNUSED axe_engine, /* MSC - Dont do this check until we have a real IOD */ #if 0 /* if attribute KV does not exist, return error*/ - if(IOD_ID_UNDEFINED == sp.attr_id) + if(IOD_ID_UNDEFINED == sp[1]) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "Object has no attributes"); #endif /* open the attribute KV in scratch pad */ - if (iod_obj_open_write(coh, sp.attr_id, NULL /*hints*/, &attr_kv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[1], NULL /*hints*/, &attr_kv_oh, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* get attribute ID */ diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c index 7a45ae9..998e918 100644 --- a/src/H5VLiod_dset.c +++ b/src/H5VLiod_dset.c @@ -95,7 +95,7 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine, hid_t dcpl_id; iod_array_struct_t array; /* IOD array struct describing the dataset's dimensions */ iod_size_t *max_dims; - scratch_pad_t sp; + scratch_pad sp; iod_ret_t ret; hbool_t collective = FALSE; /* MSC - change when we allow for collective */ herr_t ret_value = SUCCEED; @@ -162,10 +162,10 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = attr_id; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = attr_id; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in dataset */ if (iod_obj_set_scratch(dset_oh, wtid, &sp, NULL, NULL) < 0) @@ -285,7 +285,7 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, 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; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -303,7 +303,7 @@ H5VL_iod_server_dset_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* MSC - retrieve metadata - NEED IOD */ @@ -1046,7 +1046,7 @@ H5VL_iod_server_dset_set_extent_cb(AXE_engine_t UNUSED axe_engine, FUNC_ENTER_NOAPI_NOINIT #if H5VL_IOD_DEBUG - fprintf(stderr, "Start dataset Extend\n"); + fprintf(stderr, "Start dataset Set Extent\n"); #endif /* open the dataset if we don't have the handle yet */ @@ -1065,7 +1065,7 @@ H5VL_iod_server_dset_set_extent_cb(AXE_engine_t UNUSED axe_engine, { int rank; hid_t space_id; - scratch_pad_t sp; + scratch_pad sp; iod_handle_t mdkv_oh; /* get scratch pad of the dataset */ @@ -1073,7 +1073,7 @@ H5VL_iod_server_dset_set_extent_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* get the stored dataset dataspace */ diff --git a/src/H5VLiod_dtype.c b/src/H5VLiod_dtype.c index f08a4b6..e728b73 100644 --- a/src/H5VLiod_dtype.c +++ b/src/H5VLiod_dtype.c @@ -62,7 +62,7 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine, void *buf; iod_mem_desc_t *mem_desc = NULL; /* memory descriptor used for writing */ iod_blob_iodesc_t *file_desc = NULL; /* file descriptor used to write */ - scratch_pad_t sp; + scratch_pad sp; iod_ret_t ret; hbool_t collective = FALSE; /* flag to indicate whether we opened the attribute here or if it was already open */ herr_t ret_value = SUCCEED; @@ -106,10 +106,10 @@ H5VL_iod_server_dtype_commit_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = attr_id; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = attr_id; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in datatype */ if (iod_obj_set_scratch(dtype_oh, wtid, &sp, NULL, NULL) < 0) @@ -263,7 +263,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, void *buf = NULL; iod_mem_desc_t *mem_desc = NULL; /* memory descriptor used for reading */ iod_blob_iodesc_t *file_desc = NULL; /* file descriptor used to write */ - scratch_pad_t sp; + scratch_pad sp; iod_size_t kv_size; herr_t ret_value = SUCCEED; @@ -282,7 +282,7 @@ H5VL_iod_server_dtype_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* MSC - NEED IOD */ diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c index 476192c..0f6edfa 100644 --- a/src/H5VLiod_file.c +++ b/src/H5VLiod_file.c @@ -93,7 +93,7 @@ H5VL_iod_server_file_create_cb(AXE_engine_t UNUSED axe_engine, /* for the process that succeeded in creating the group, create the scratch pad for it too */ if(0 == ret) { - scratch_pad_t sp; + scratch_pad sp; iod_kv_t kv; void *key = NULL; void *value = NULL; @@ -110,10 +110,10 @@ H5VL_iod_server_file_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = attr_id; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = attr_id; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in root group */ if (iod_obj_set_scratch(root_oh, first_tid, &sp, NULL, NULL) < 0) @@ -236,7 +236,7 @@ H5VL_iod_server_file_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t coh; /* container handle */ iod_handle_t root_oh; /* root object handle */ iod_handle_t mdkv_oh; /* metadata object handle for KV to store file's metadata */ - scratch_pad_t sp; + scratch_pad sp; iod_container_tids_t tids; iod_trans_id_t rtid; herr_t ret_value = SUCCEED; @@ -271,7 +271,7 @@ H5VL_iod_server_file_open_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for root object"); /* open the metadata scratch pad */ - if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* retrieve all metadata from scratch pad */ diff --git a/src/H5VLiod_group.c b/src/H5VLiod_group.c index 466a039..4007bd7 100644 --- a/src/H5VLiod_group.c +++ b/src/H5VLiod_group.c @@ -60,7 +60,7 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t cur_id, mdkv_id, attr_id; char *last_comp = NULL; /* the name of the group obtained from traversal function */ hid_t gcpl_id; - scratch_pad_t sp; + scratch_pad sp; iod_ret_t ret; hbool_t collective = FALSE; /* MSC - change when we allow for collective */ herr_t ret_value = SUCCEED; @@ -104,10 +104,10 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = attr_id; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = attr_id; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in group */ if (iod_obj_set_scratch(grp_oh, wtid, &sp, NULL, NULL) < 0) @@ -212,7 +212,7 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, iod_trans_id_t rtid = input->rcxt_num; iod_obj_id_t grp_id; /* The ID of the group that needs to be opened */ iod_handle_t grp_oh, mdkv_oh; /* The group handle and its metadata KV handle */ - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -230,7 +230,7 @@ H5VL_iod_server_group_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* MSC - retrieve metadata, need IOD */ diff --git a/src/H5VLiod_link.c b/src/H5VLiod_link.c index 6f34d2f..e3887b2 100644 --- a/src/H5VLiod_link.c +++ b/src/H5VLiod_link.c @@ -75,7 +75,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, #endif if(H5VL_LINK_CREATE_HARD == create_type) { - scratch_pad_t sp; + scratch_pad sp; iod_handle_t mdkv_oh; uint64_t link_count = 0; @@ -95,7 +95,7 @@ H5VL_iod_server_link_create_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_LINK_COUNT, @@ -261,7 +261,7 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, { iod_handle_t target_oh; iod_handle_t mdkv_oh; - scratch_pad_t sp; + scratch_pad sp; uint64_t link_count = 0; /* open the current group */ @@ -273,7 +273,7 @@ H5VL_iod_server_link_move_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_LINK_COUNT, @@ -697,7 +697,7 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine, if(iod_link.link_type == H5L_TYPE_HARD) { iod_handle_t obj_oh; iod_handle_t mdkv_oh; - scratch_pad_t sp; + scratch_pad sp; uint64_t link_count = 0; obj_id = iod_link.u.iod_id; @@ -711,7 +711,7 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_LINK_COUNT, @@ -739,9 +739,9 @@ H5VL_iod_server_link_remove_cb(AXE_engine_t UNUSED axe_engine, if(0 == link_count) { 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, wtid, NULL) < 0) + if(iod_obj_unlink(coh, sp[0], wtid, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "Unable to unlink object"); - if(iod_obj_unlink(coh, sp.attrkv_id, wtid, NULL) < 0) + if(iod_obj_unlink(coh, sp[1], 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 fc1ae87..e5ff5e8 100644 --- a/src/H5VLiod_map.c +++ b/src/H5VLiod_map.c @@ -65,7 +65,7 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t cur_id, mdkv_id, attr_id; char *last_comp; /* the name of the group obtained from traversal function */ hid_t mcpl_id; - scratch_pad_t sp; + scratch_pad sp; iod_ret_t ret; hbool_t collective = FALSE; /* MSC - change when we allow for collective */ herr_t ret_value = SUCCEED; @@ -109,10 +109,10 @@ H5VL_iod_server_map_create_cb(AXE_engine_t UNUSED axe_engine, HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create metadata KV object"); /* set values for the scratch pad object */ - sp.mdkv_id = mdkv_id; - sp.attr_id = attr_id; - sp.filler1_id = IOD_ID_UNDEFINED; - sp.filler2_id = IOD_ID_UNDEFINED; + sp[0] = mdkv_id; + sp[1] = attr_id; + sp[2] = IOD_ID_UNDEFINED; + sp[3] = IOD_ID_UNDEFINED; /* set scratch pad in map */ if (iod_obj_set_scratch(map_oh, wtid, &sp, NULL, NULL) < 0) @@ -213,7 +213,7 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, iod_trans_id_t rtid = input->rcxt_num; iod_obj_id_t map_id; /* The ID of the map that needs to be opened */ iod_handle_t map_oh, mdkv_oh; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -234,7 +234,7 @@ H5VL_iod_server_map_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* MSC - retrieve metadata - need IOD*/ diff --git a/src/H5VLiod_obj.c b/src/H5VLiod_obj.c index 2b80ed9..1b54619 100644 --- a/src/H5VLiod_obj.c +++ b/src/H5VLiod_obj.c @@ -52,7 +52,7 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t obj_oh; /* The handle for object */ iod_obj_id_t obj_id; /* The ID of the object */ iod_handle_t mdkv_oh; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -71,7 +71,7 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); /* MSC - NEED IOD */ @@ -285,7 +285,7 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE, @@ -495,7 +495,7 @@ H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine, iod_trans_id_t rtid = input->rcxt_num; iod_handle_t obj_oh, mdkv_oh, attrkv_oh; iod_obj_id_t obj_id; - scratch_pad_t sp; + scratch_pad sp; H5I_type_t obj_type; iod_size_t num_attrs = 0; const char *loc_name = input->loc_name; @@ -514,11 +514,11 @@ H5VL_iod_server_object_get_info_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], 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.attr_id, NULL /*hints*/, &attrkv_oh, NULL) < 0) + /* open the attribute scratch pad */ + if (iod_obj_open_write(coh, sp[1], 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, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE, @@ -623,7 +623,7 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, iod_obj_id_t obj_id; const char *loc_name = input->path; const char *comment = input->comment; - scratch_pad_t sp; + scratch_pad sp; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -637,7 +637,7 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); { @@ -713,7 +713,7 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, iod_handle_t obj_oh, mdkv_oh; iod_obj_id_t obj_id; const char *loc_name = input->path; - scratch_pad_t sp; + scratch_pad sp; ssize_t size = 0; herr_t ret_value = SUCCEED; @@ -728,7 +728,7 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, 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) + if (iod_obj_open_write(coh, sp[0], NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); comment.value_size = (ssize_t *)malloc(sizeof(ssize_t)); diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h index 4194fb6..e1350ad 100644 --- a/src/H5VLiod_server.h +++ b/src/H5VLiod_server.h @@ -60,12 +60,7 @@ typedef struct op_data_t { } op_data_t; /* the IOD scratch pad type */ -typedef struct scratch_pad_t { - iod_obj_id_t mdkv_id; /* IOD ID of the KV store holding the metadata about an object */ - iod_obj_id_t attr_id; /* IOD ID of the KV store holding the attribute ID attached to object */ - iod_obj_id_t filler1_id; /* filler value - not used */ - iod_obj_id_t filler2_id; /* filler value - not used */ -} scratch_pad_t; +typedef iod_obj_id_t scratch_pad[4]; /* the link value stored in KV stores */ typedef struct H5VL_iod_link_t { diff --git a/src/H5VLiod_util.c b/src/H5VLiod_util.c index f05caee..8d7e1c3 100644 --- a/src/H5VLiod_util.c +++ b/src/H5VLiod_util.c @@ -477,7 +477,7 @@ H5VL_iod_insert_plist(iod_handle_t oh, iod_trans_id_t tid, hid_t plist_id, kv.key = (char *)key; kv.value = value; kv.value_len = (iod_size_t)buf_size; - /* insert kv pair into scratch pad */ + /* insert kv pair into KV object */ if (iod_kv_set(oh, tid, hints, &kv, cs, event) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); @@ -611,7 +611,7 @@ H5VL_iod_insert_datatype(iod_handle_t oh, iod_trans_id_t tid, hid_t type_id, kv.key = (char *)key; kv.value = value; kv.value_len = (iod_size_t)buf_size; - /* insert kv pair into scratch pad */ + /* insert kv pair into KV */ if (iod_kv_set(oh, tid, hints, &kv, cs, event) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); @@ -667,7 +667,7 @@ H5VL_iod_insert_dataspace(iod_handle_t oh, iod_trans_id_t tid, hid_t space_id, kv.key = (char *)key; kv.value = value; kv.value_len = (iod_size_t)buf_size; - /* insert kv pair into scratch pad */ + /* insert kv pair into KV */ if (iod_kv_set(oh, tid, hints, &kv, cs, event) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't set KV pair in parent"); |