summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5D.c4
-rw-r--r--src/H5G.c10
-rw-r--r--src/H5Oflush.c10
-rw-r--r--src/H5Tcommit.c13
4 files changed, 34 insertions, 3 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 2755993..f6afd93 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1029,7 +1029,7 @@ H5Drefresh(hid_t dset_id)
/* Set wrapper info in API context */
if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Refresh the dataset object */
@@ -1040,7 +1040,7 @@ H5Drefresh(hid_t dset_id)
done:
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
+ HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Drefresh() */
diff --git a/src/H5G.c b/src/H5G.c
index 6caf6ed..3845c7e 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -825,6 +825,7 @@ herr_t
H5Grefresh(hid_t group_id)
{
H5VL_object_t *vol_obj; /* Group for this operation */
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -838,12 +839,21 @@ H5Grefresh(hid_t group_id)
if(H5CX_set_loc(group_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info")
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Refresh group's metadata */
if((ret_value = H5VL_group_specific(vol_obj->data, vol_obj->plugin->cls, H5VL_GROUP_REFRESH,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, group_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* H5Grefresh */
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 5a27aff..887cc4c 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -239,6 +239,7 @@ H5Orefresh(hid_t oid)
{
H5VL_object_t *vol_obj = NULL; /* Object token */
H5VL_loc_params_t loc_params;
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -256,12 +257,21 @@ H5Orefresh(hid_t oid)
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(oid);
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Refresh the object */
if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, oid)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* end H5Orefresh() */
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 3e59c82..3eb9cd7 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -752,6 +752,7 @@ herr_t
H5Trefresh(hid_t type_id)
{
H5T_t *dt; /* Datatype for this operation */
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -768,12 +769,22 @@ H5Trefresh(hid_t type_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
/* Refresh the datatype's metadata */
- if(dt->vol_obj)
+ if(dt->vol_obj) {
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(dt->vol_obj->data, dt->vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
if((ret_value = H5VL_datatype_specific(dt->vol_obj->data, dt->vol_obj->plugin->cls, H5VL_DATATYPE_REFRESH,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, type_id)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype")
+ } /* end if */
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* H5Trefresh */