summaryrefslogtreecommitdiffstats
path: root/src/H5Tdeprec.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2018-12-05 19:03:59 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2018-12-05 19:03:59 (GMT)
commit14f463593bb8fb5eb326709753aa6ead2db2c7c3 (patch)
treef1b4206452ac0885ef8f4d51c72296a8db6c6e70 /src/H5Tdeprec.c
parent2f605eaa99e1d8fc359079f93b91522c561500b0 (diff)
parentc58d84e721ef9fbda63abc834767a28dc978d121 (diff)
downloadhdf5-14f463593bb8fb5eb326709753aa6ead2db2c7c3.zip
hdf5-14f463593bb8fb5eb326709753aa6ead2db2c7c3.tar.gz
hdf5-14f463593bb8fb5eb326709753aa6ead2db2c7c3.tar.bz2
Merge pull request #1347 in HDFFV/hdf5 from stackable_vol to develop
* commit 'c58d84e721ef9fbda63abc834767a28dc978d121': (50 commits) Refactor allocating & releasing pass through wrapper objects. Fix typo Remove duplicated comment. Add a couple of missing prototypes for static routines, along with updating a comment from VOL plugin -> connector. Switch H5VL_class_value_t from unsigned to int, and add "invalid" ID value. Correct "make check-vol" regression test target. Switch H5VL_class_value_t from enum to unsigned integer Add support for "make check-vol", along with a few minor cleanups, etc. Refactor infrastructure for setting FAPL information from environment variables during testing, including connecting native, pass-through, and dynamically loaded VOL connectors. Also bring native and pass-through VOL connectors into alignment, removing the "H5VLnative_private.h" header. Remove example VOL connector, since it's been superceded by the pass-through VOL connector in the src subdirectory. Add pass-through VOL connector Update API tracing info for VOL functions and regenerate trace macros for VOL API calls. Added 'notify' callback for async requests; switched VOL class and info comparison to return comparison value as parameter, so they can return error values; "cancelled" -> "canceled"; switched order of 'wrap_object' and 'free_wrap_ctx' management callbacks. Add using FAPL from h5_fileaccess() to more tests. Remove unused test for unimplemented routine. Switch loc_params to VOL callbacks to pass struct by pointer instead of by value. Add info_to_str and str_to_info "management" callbacks for serializing and deserializing a connector's info object. Revert some of the changes to support the original property list value of metadata read attempts. Add VOL connector info to the flie access property list returned from H5Fget_access_plist(). Also, other misc. cleanups, etc. Switch tool error output to match VOL changes within library ...
Diffstat (limited to 'src/H5Tdeprec.c')
-rw-r--r--src/H5Tdeprec.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 0e45587..6ee0cd7 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -43,7 +43,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Ppublic.h" /* Property Lists */
#include "H5Tpkg.h" /* Datatypes */
-#include "H5VLprivate.h" /* VOL plugins */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/****************/
@@ -137,20 +137,17 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Commit the datatype */
- if(NULL == (data = H5VL_datatype_commit(vol_obj->data, loc_params, vol_obj->driver->cls,
- name, type_id, H5P_LINK_CREATE_DEFAULT,
- H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (data = H5VL_datatype_commit(vol_obj, &loc_params, name, type_id, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Set up VOL object */
if(NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
HGOTO_ERROR(H5E_VOL, H5E_NOSPACE, FAIL, "can't allocate top object structure")
- new_obj->driver = vol_obj->driver;
- new_obj->driver->nrefs ++;
+ new_obj->connector = vol_obj->connector;
+ new_obj->connector->nrefs ++;
new_obj->data = data;
- /* Set the committed type object to the VOL pluging pointer in the H5T_t struct */
+ /* Set the committed type object to the VOL connector pointer in the H5T_t struct */
dt->vol_obj = new_obj;
done:
@@ -177,7 +174,7 @@ done:
hid_t
H5Topen1(hid_t loc_id, const char *name)
{
- void *dt = NULL; /* Datatype token created by VOL plugin */
+ void *dt = NULL; /* Datatype token created by VOL connector */
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -197,19 +194,17 @@ H5Topen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the datatype */
- if(NULL == (dt = H5VL_datatype_open(vol_obj->data, loc_params, vol_obj->driver->cls,
- name, H5P_DATATYPE_ACCESS_DEFAULT,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (dt = H5VL_datatype_open(vol_obj, &loc_params, name, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype")
/* Register the type and return the ID */
- if((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->driver, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype")
+ if((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->connector, TRUE)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype")
done:
/* Cleanup on error */
if(H5I_INVALID_HID == ret_value)
- if(dt && H5VL_datatype_close(dt, vol_obj->driver->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(dt && H5VL_datatype_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to close datatype")
FUNC_LEAVE_API(ret_value)