diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-19 19:19:51 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-19 19:19:51 (GMT) |
commit | aff0124b38f2ba19cd06431f756ff5791882dbae (patch) | |
tree | 7b00758d1f5f6a45690d21971c868d111a35367c /src/H5A.c | |
parent | ffc4b3a7f73e9e808bcb11a5f86ce9d6229f31f8 (diff) | |
download | hdf5-aff0124b38f2ba19cd06431f756ff5791882dbae.zip hdf5-aff0124b38f2ba19cd06431f756ff5791882dbae.tar.gz hdf5-aff0124b38f2ba19cd06431f756ff5791882dbae.tar.bz2 |
[svn-r25537] VOL framework changes.
Diffstat (limited to 'src/H5A.c')
-rw-r--r-- | src/H5A.c | 173 |
1 files changed, 64 insertions, 109 deletions
@@ -275,7 +275,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, /* Create the attribute through the VOL */ if(NULL == (attr = H5VL_attr_create(obj, loc_params, vol_plugin, attr_name, acpl_id, aapl_id, - H5AC_dxpl_id, H5_EVENT_STACK_NULL))) + H5AC_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create attribute") /* Get an atom for the attribute */ @@ -284,7 +284,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + if(H5VL_attr_close(attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to release attr") FUNC_LEAVE_API(ret_value) @@ -374,7 +374,8 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_create(obj, loc_params, vol_plugin, attr_name, acpl_id, aapl_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL))) + if(NULL == (attr = H5VL_attr_create(obj, loc_params, vol_plugin, attr_name, acpl_id, + aapl_id, H5AC_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create attribute") /* Get an atom for the attribute */ @@ -383,7 +384,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to release attr") FUNC_LEAVE_API(ret_value) } /* H5Acreate_by_name() */ @@ -438,7 +439,8 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t aapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, attr_name, aapl_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL))) + if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, attr_name, aapl_id, + H5AC_ind_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open attribute") /* Get an atom for the attribute */ @@ -447,7 +449,7 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t aapl_id) done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to release attr") FUNC_LEAVE_API(ret_value) } /* H5Aopen() */ @@ -514,7 +516,8 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, attr_name, aapl_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL))) + if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, attr_name, aapl_id, + H5AC_ind_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open attribute") /* Get an atom for the attribute */ @@ -523,7 +526,7 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to release attr") FUNC_LEAVE_API(ret_value) } /* H5Aopen_by_name() */ @@ -599,7 +602,8 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, NULL, aapl_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL))) + if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, NULL, aapl_id, + H5AC_ind_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open attribute") /* Get an atom for the attribute */ @@ -608,7 +612,7 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to release attr") FUNC_LEAVE_API(ret_value) } /* H5Aopen_by_idx() */ @@ -651,7 +655,7 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* write the data through the VOL */ - if((ret_value = H5VL_attr_write(attr, vol_plugin, dtype_id, buf, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) + if((ret_value = H5VL_attr_write(attr, vol_plugin, dtype_id, buf, H5AC_dxpl_id, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't read data") done: @@ -696,7 +700,7 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Read the data through the VOL */ - if((ret_value = H5VL_attr_read(attr, vol_plugin, dtype_id, buf, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) + if((ret_value = H5VL_attr_read(attr, vol_plugin, dtype_id, buf, H5AC_dxpl_id, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't read data") done: @@ -739,7 +743,7 @@ H5Aget_space(hid_t attr_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* get the dataspace through the VOL */ - if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_SPACE, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0) + if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_SPACE, H5AC_dxpl_id, H5_REQUEST_NULL, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get data space") done: @@ -782,7 +786,7 @@ H5Aget_type(hid_t attr_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* get the datatype through the VOL */ - if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_TYPE, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0) + if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_TYPE, H5AC_dxpl_id, H5_REQUEST_NULL, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get type") done: @@ -831,7 +835,7 @@ H5Aget_create_plist(hid_t attr_id) /* get the acpl through the VOL */ if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_ACPL, H5AC_dxpl_id, - H5_EVENT_STACK_NULL, &ret_value) < 0) + H5_REQUEST_NULL, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get acpl") done: @@ -885,7 +889,8 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* get the name through the VOL */ - if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_NAME, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, buf_size, buf, &ret_value) < 0) + if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_NAME, H5AC_ind_dxpl_id, H5_REQUEST_NULL, + loc_params, buf_size, buf, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get name") done: @@ -955,20 +960,10 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, loc_params.obj_type = H5I_get_type(loc_id); /* get the name through the VOL */ - if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_NAME, H5AC_dxpl_id, H5_EVENT_STACK_NULL, + if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_NAME, H5AC_ind_dxpl_id, H5_REQUEST_NULL, loc_params, size, name, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get name") -#if 0 - if(H5VL_object_misc(loc_id, H5VL_ATTR_OPEN_BY_IDX, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &attr_id, - obj_name, idx_type, order, n, H5P_DEFAULT, lapl_id) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to open attribute") - - /* get the name through the VOL */ - if(H5VL_attr_get(attr_id, H5VL_ATTR_GET_NAME, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value, size, name) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get name") -#endif - done: FUNC_LEAVE_API(ret_value) } /* end H5Aget_name_by_idx() */ @@ -1003,14 +998,14 @@ H5Aget_storage_size(hid_t attr_id) /* check arguments */ if(NULL == (attr = (void *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an attribute") /* get the plugin pointer */ if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(attr_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "ID does not contain VOL information") /* get the storage size through the VOL */ - if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_STORAGE_SIZE, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &ret_value) < 0) + if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_STORAGE_SIZE, H5AC_dxpl_id, H5_REQUEST_NULL, &ret_value) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, 0, "unable to get acpl") done: @@ -1054,7 +1049,8 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo) loc_params.obj_type = H5I_get_type(attr_id); /* get the attribute info through the VOL */ - if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, ainfo) < 0) + if(H5VL_attr_get(attr, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_ind_dxpl_id, + H5_REQUEST_NULL, loc_params, ainfo) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") done: @@ -1115,24 +1111,10 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") /* get the attribute info through the VOL */ - if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, ainfo, attr_name) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") - -#if 0 - /* Open the attribute through the VOL */ - if((attr_id = H5VL_attr_open(loc_id, loc_params, attr_name, H5P_DEFAULT, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to open attribute") - - /* get the attribute info through the VOL */ - if(H5VL_attr_get(attr_id, H5VL_ATTR_GET_INFO, H5AC_dxpl_id, H5_EVENT_STACK_NULL, ainfo) < 0) + if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_ind_dxpl_id, H5_REQUEST_NULL, + loc_params, ainfo, attr_name) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") - /* release resources */ - if(attr_id > 0 && H5VL_attr_close(attr_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") - -#endif - done: FUNC_LEAVE_API(ret_value) } /* end H5Aget_info_by_name() */ @@ -1198,33 +1180,10 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") /* get the attribute info through the VOL */ - if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_dxpl_id, H5_EVENT_STACK_NULL, + if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_GET_INFO, H5AC_ind_dxpl_id, H5_REQUEST_NULL, loc_params, ainfo) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") -#if 0 - /* Open the attribute on the object header */ - if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute") - - /* Get the attribute information */ - if(H5A_get_info(attr, ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") - - /* open the attribute through the VOL */ - if(H5VL_object_misc(loc_id, H5VL_ATTR_OPEN_BY_IDX, H5AC_dxpl_id, H5_EVENT_STACK_NULL, &attr_id, - obj_name, idx_type, order, n, H5P_DEFAULT, lapl_id) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to open attribute") - - /* get the attribute info through the VOL */ - if(H5VL_attr_get(attr_id, H5VL_ATTR_GET_INFO, H5AC_dxpl_id, H5_EVENT_STACK_NULL, ainfo) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") - - /* Release resources */ - if(attr_id && H5VL_attr_close(attr_id, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") -#endif - done: FUNC_LEAVE_API(ret_value) } /* end H5Aget_info_by_idx() */ @@ -1274,8 +1233,8 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* rename the attribute info through the VOL */ - if(H5VL_object_misc(obj, loc_params, vol_plugin, H5VL_ATTR_RENAME, H5AC_dxpl_id, H5_EVENT_STACK_NULL, - old_name, new_name) < 0) + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_RENAME, + H5AC_dxpl_id, H5_REQUEST_NULL, old_name, new_name)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") } done: @@ -1340,8 +1299,9 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* rename the attribute info through the VOL */ - if(H5VL_object_misc(obj, loc_params, vol_plugin, H5VL_ATTR_RENAME, H5AC_dxpl_id, H5_EVENT_STACK_NULL, - old_attr_name, new_attr_name) < 0) + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_RENAME, + H5AC_dxpl_id, H5_REQUEST_NULL, + old_attr_name, new_attr_name)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") } /* end if */ @@ -1414,17 +1374,18 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); - /* get the file object */ - if(NULL == (obj = (void *)H5I_object(loc_id))) + /* get the loc object */ + if(NULL == (obj = (void *)H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") /* get the plugin pointer */ if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* iterate over the links through the VOL */ - if((ret_value = H5VL_attr_iterate(obj, loc_params, vol_plugin, idx_type, order, idx, - op, op_data, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed") + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_ITER, + H5AC_dxpl_id, H5_REQUEST_NULL, + idx_type, order, idx, op, op_data)) < 0) + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "attribute iteration failed") done: FUNC_LEAVE_API(ret_value) @@ -1482,7 +1443,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ H5VL_loc_params_t loc_params; - herr_t ret_value; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op, @@ -1508,16 +1469,17 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, loc_params.loc_data.loc_by_name.name = obj_name; loc_params.loc_data.loc_by_name.lapl_id = lapl_id; - /* get the file object */ - if(NULL == (obj = (void *)H5I_object(loc_id))) + /* get the loc object */ + if(NULL == (obj = (void *)H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") /* get the plugin pointer */ if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* iterate over the links through the VOL */ - if((ret_value = H5VL_attr_iterate(obj, loc_params, vol_plugin, idx_type, order, idx, - op, op_data, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_ITER, + H5AC_dxpl_id, H5_REQUEST_NULL, + idx_type, order, idx, op, op_data)) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "attribute iteration failed") done: @@ -1566,8 +1528,9 @@ H5Adelete(hid_t loc_id, const char *name) if(NULL == (obj = (void *)H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") - /* Open the attribute through the VOL */ - if(H5VL_attr_remove(obj, loc_params, vol_plugin, name, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + /* Delete the attribute through the VOL */ + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_DELETE, + H5AC_dxpl_id, H5_REQUEST_NULL, name)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") done: @@ -1628,8 +1591,9 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, if(NULL == (obj = (void *)H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") - /* Open the attribute through the VOL */ - if(H5VL_attr_remove(obj, loc_params, vol_plugin, attr_name, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + /* Delete the attribute through the VOL */ + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_DELETE, + H5AC_dxpl_id, H5_REQUEST_NULL, attr_name)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") done: @@ -1703,21 +1667,11 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, if(NULL == (obj = (void *)H5VL_get_object(loc_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") - /* Open the attribute through the VOL */ - if(H5VL_attr_remove(obj, loc_params, vol_plugin, NULL, H5AC_dxpl_id, H5_EVENT_STACK_NULL) < 0) + /* Delete the attribute through the VOL */ + if((ret_value = H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_DELETE, + H5AC_dxpl_id, H5_REQUEST_NULL, NULL)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") -#if 0 - loc_params.type = H5VL_OBJECT_BY_NAME; - loc_params.loc_data.loc_by_name.name = obj_name; - loc_params.loc_data.loc_by_name.lapl_id = lapl_id; - - /* get the attribute info through the VOL */ - if(H5VL_object_misc(loc_id, H5VL_ATTR_DELETE_BY_IDX, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, - idx_type, order, n) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") -#endif - done: FUNC_LEAVE_API(ret_value) } /* H5Adelete_by_idx() */ @@ -1800,10 +1754,10 @@ H5Aexists(hid_t obj_id, const char *attr_name) loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(obj_id); - /* get the attribute info through the VOL */ - if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_EXISTS, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, attr_name, &ret_value) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") - + /* Check existence of attribute through the VOL */ + if(H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_EXISTS, + H5AC_ind_dxpl_id, H5_REQUEST_NULL, attr_name, &ret_value) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") done: FUNC_LEAVE_API(ret_value) } /* H5Aexists() */ @@ -1859,9 +1813,10 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, loc_params.loc_data.loc_by_name.lapl_id = lapl_id; loc_params.obj_type = H5I_get_type(loc_id); - /* get the attribute info through the VOL */ - if(H5VL_attr_get(obj, vol_plugin, H5VL_ATTR_EXISTS, H5AC_dxpl_id, H5_EVENT_STACK_NULL, loc_params, attr_name, &ret_value) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get attribute info") + /* Check existence of attribute through the VOL */ + if(H5VL_attr_specific(obj, loc_params, vol_plugin, H5VL_ATTR_EXISTS, + H5AC_ind_dxpl_id, H5_REQUEST_NULL, attr_name, &ret_value) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") done: FUNC_LEAVE_API(ret_value) @@ -1890,7 +1845,7 @@ H5A_close_attr(void *attr, H5VL_t *vol_plugin) FUNC_ENTER_NOAPI_NOINIT /* Close the attr through the VOL*/ - if((ret_value = H5VL_attr_close(attr, vol_plugin, H5AC_dxpl_id, H5_EVENT_STACK_NULL)) < 0) + if((ret_value = H5VL_attr_close(attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "unable to close attribute") done: |