Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set DXPL in API context for native VOL attribute I/O calls #4228

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/H5VLint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
vol_wrap_ctx->obj_wrap_ctx = obj_wrap_ctx;
} /* end if */
else
/* Incremeent ref count on existing wrapper context */
/* Increment ref count on existing wrapper context */
vol_wrap_ctx->rc++;

/* Save the wrapper context */
Expand Down
13 changes: 9 additions & 4 deletions src/H5VLnative_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* Files */
#include "H5Gprivate.h" /* Groups */
Expand Down Expand Up @@ -195,8 +196,7 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha
*-------------------------------------------------------------------------
*/
herr_t
H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req)
H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t dxpl_id, void H5_ATTR_UNUSED **req)
{
H5T_t *mem_type; /* Memory datatype */
herr_t ret_value; /* Return value */
Expand All @@ -206,6 +206,9 @@ H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t H5_ATTR_UNUS
if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");

/* Set DXPL for operation */
H5CX_set_dxpl(dxpl_id);

/* Go write the actual data to the attribute */
if ((ret_value = H5A__read((H5A_t *)attr, mem_type, buf)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute");
Expand All @@ -224,8 +227,7 @@ H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t H5_ATTR_UNUS
*-------------------------------------------------------------------------
*/
herr_t
H5VL__native_attr_write(void *attr, hid_t dtype_id, const void *buf, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req)
H5VL__native_attr_write(void *attr, hid_t dtype_id, const void *buf, hid_t dxpl_id, void H5_ATTR_UNUSED **req)
{
H5T_t *mem_type; /* Memory datatype */
herr_t ret_value; /* Return value */
Expand All @@ -235,6 +237,9 @@ H5VL__native_attr_write(void *attr, hid_t dtype_id, const void *buf, hid_t H5_AT
if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype");

/* Set DXPL for operation */
H5CX_set_dxpl(dxpl_id);

/* Go write the actual data to the attribute */
if ((ret_value = H5A__write((H5A_t *)attr, mem_type, buf)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute");
Expand Down
Loading