summaryrefslogtreecommitdiffstats
path: root/src/H5Gdeprec.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-12-20 04:41:37 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-12-20 04:41:37 (GMT)
commit58cf79532129a0df49c5516506cfe8be5e09d3eb (patch)
tree768d5f91c9b821329bd06206b6510b5bf31c9ec7 /src/H5Gdeprec.c
parentb55a584fd5b3aac6f2514fba41a6182030b497ae (diff)
downloadhdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.zip
hdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.tar.gz
hdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.tar.bz2
Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what the operation is and decide whether to implement it or not. Added a new VOL sub-class called "introspect" where callbacks that report information about the connector or container can be placed. Added an 'opt_query' callback to this sub-class, for a connector to report back to the library whether a particular optional callback operation is supported. Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or the terminal connector, H5VL_GET_CONN_LVL_TERM). Moved the "post open" operation from a file 'specific' operation to a file 'optional' operation, now that it's possible to detect (with the 'opt_query' introspection callback) whether a VOL connector implements an optional operation, without just returning an error. Added new internal VOL helper routines: H5VL_object_is_native, to determine if an object is in (or is a) native file, and H5VL_file_is_same, to determine if two objects are in (or are) the same terminal VOL connector's container. (And moved the special handling for FILE_IS_EQUAL operation out of internal VOL callback routine into H5VL_file_is_same) Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better with other 'get' operations in API. Fixed several issues with pass-through connectors, which are now passing the 'make check-passthrough-vol' tests again. A bunch of warning and style cleanups as well.
Diffstat (limited to 'src/H5Gdeprec.c')
-rw-r--r--src/H5Gdeprec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index fcb16d3..c321e97 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -700,7 +700,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Set the comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5VL_NATIVE_OBJECT_SET_COMMENT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &loc_params, comment) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value")
done:
@@ -762,7 +762,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "invalid location identifier")
/* Get the comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, buf, bufsize, &op_ret) < 0)
+ if(H5VL_object_optional(vol_obj, H5VL_NATIVE_OBJECT_GET_COMMENT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &loc_params, buf, bufsize, &op_ret) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, -1, "unable to get comment value")
/* Set return value */
@@ -838,7 +838,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
/* Call private iteration function, through VOL callback */
- if((ret_value = H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_ITERATE_OLD, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
+ if((ret_value = H5VL_group_optional(vol_obj, H5VL_NATIVE_GROUP_ITERATE_OLD, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
HERROR(H5E_SYM, H5E_BADITER, "error iterating over group's links");
/* Set the index we stopped at */
@@ -934,11 +934,11 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
H5TRACE4("e", "i*sbx", loc_id, name, follow_link, statbuf);
/* Check arguments */
- if (!name || !*name)
+ if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Set up collective metadata if appropriate */
- if (H5CX_set_loc(loc_id) < 0)
+ if(H5CX_set_loc(loc_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info");
/* Retrieve object info */
@@ -949,11 +949,11 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
loc_params.obj_type = H5I_get_type(loc_id);
/* Get the location object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
+ if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
/* Retrieve the object's information */
- if (H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_GET_OBJINFO, &loc_params, (unsigned)follow_link, statbuf) < 0)
+ if(H5VL_group_optional(vol_obj, H5VL_NATIVE_GROUP_GET_OBJINFO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &loc_params, (unsigned)follow_link, statbuf) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name);
done:
@@ -1212,7 +1212,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
/* Retrieve the object's basic information (which includes its type) */
fields = H5O_INFO_BASIC;
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, &oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5VL_NATIVE_OBJECT_GET_INFO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &loc_params, &oinfo, fields) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object info")
/* Map to group object type */