summaryrefslogtreecommitdiffstats
path: root/src/H5Rint.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-11-13 16:31:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-11-13 16:31:35 (GMT)
commite5f9c60e692a9470954f3500c93558117f6ba7bd (patch)
treeb064a59553bdd0d2063e5ac25e9cfa3c1a1ab1b0 /src/H5Rint.c
parent6b927a773c83bedc111dcd2ad38805f974660b15 (diff)
parente08b69d3d2e572de4707b1fbf908111d29f40a1b (diff)
downloadhdf5-e5f9c60e692a9470954f3500c93558117f6ba7bd.zip
hdf5-e5f9c60e692a9470954f3500c93558117f6ba7bd.tar.gz
hdf5-e5f9c60e692a9470954f3500c93558117f6ba7bd.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'e08b69d3d2e572de4707b1fbf908111d29f40a1b': Use HD prefix. Fix issue where H5R__reopen_file did not make the file "post open" callback. Apparently, + has no special meaning, and neither does \+, in so-called "obsolete" / POSIX "basic" regular expressions. Also, not every version of `sed` out there supports the `-E` option. So delete the -E flag and use the regex `[^/][^/]*` instead of `[^/]+`. Implement H5VLget_file_type() to return a copy of a datatype with the location set to be in a file. Only meant to be used by VOL connectors. Implement H5VLpeek_connector_id() to support connectors querying their own IDs. Fix app_ref with connector IDs in a couple places (external VOLs registered as default through ENV should be visible to the application). Modify vlen and reference interfaces to work with arbitrary VOL connectors. Implement file "post open" specific callback, to enable connectors to update their file structs after a wrap context has been set. Fix HDFFV-10937: use a more reliable (and probably faster) scheme for visiting all elements of a matrix in an arbitrary order.
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r--src/H5Rint.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 443a245..504ae06 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -504,6 +504,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
H5VL_connector_prop_t connector_prop;
unsigned flags = H5F_ACC_RDWR; /* Must open file read-write to allow for object modifications */
H5P_genplist_t *plist;
+ H5VL_object_t *vol_obj = NULL; /* VOL object for file */
hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_PACKAGE
@@ -534,6 +535,14 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
if((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
+ /* Get the file object */
+ if(NULL == (vol_obj = H5VL_vol_object(ret_value)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "invalid object identifier")
+
+ /* Make the post open callback */
+ if(H5VL_file_specific(vol_obj, H5VL_FILE_POST_OPEN, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to make file post open callback")
+
/* Attach loc_id to reference */
if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference")