summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2020-01-03 05:51:25 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2020-02-01 23:54:59 (GMT)
commit2dbcd87fcddfb519369a368a00acbe8826d5a0eb (patch)
treebc9e9d5c5746f9ce2018d4a984c281d23aec5b44 /src
parent20ebc34e01601a7d7d67b925e47227ad9e17110b (diff)
downloadhdf5-2dbcd87fcddfb519369a368a00acbe8826d5a0eb.zip
hdf5-2dbcd87fcddfb519369a368a00acbe8826d5a0eb.tar.gz
hdf5-2dbcd87fcddfb519369a368a00acbe8826d5a0eb.tar.bz2
Fix some places where H5P_DEFAULT gets passed down to a VOL connector
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c36
-rw-r--r--src/H5Adeprec.c9
-rw-r--r--src/H5Aint.c5
-rw-r--r--src/H5Ddeprec.c13
-rw-r--r--src/H5F.c7
-rw-r--r--src/H5G.c6
-rw-r--r--src/H5Gdeprec.c47
-rw-r--r--src/H5L.c8
-rw-r--r--src/H5Lexternal.c8
-rw-r--r--src/H5Plapl.c64
-rw-r--r--src/H5Tcommit.c3
-rw-r--r--src/H5Tdeprec.c3
-rw-r--r--src/H5VL.c6
-rw-r--r--src/H5VLint.c2
-rw-r--r--src/H5VLnative.c2
15 files changed, 102 insertions, 117 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 92c71b0..f99fb7d 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -383,13 +383,9 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
- if(H5P_DEFAULT != lapl_id) {
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID")
- H5CX_set_lapl(lapl_id);
- }
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info")
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info")
/* Set up location struct */
loc_params.type = H5VL_OBJECT_BY_NAME;
@@ -530,16 +526,9 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
- /* Set lapl_id and add to context */
- if(H5P_DEFAULT != lapl_id) {
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID")
- H5CX_set_lapl(lapl_id);
- }
- else
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info")
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info")
/* Fill in location struct fields */
loc_params.type = H5VL_OBJECT_BY_NAME;
@@ -618,16 +607,9 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
- /* Set lapl_id and add to context */
- if(H5P_DEFAULT != lapl_id) {
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID")
- H5CX_set_lapl(lapl_id);
- }
- else
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info")
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info")
/* Fill in location struct parameters */
loc_params.type = H5VL_OBJECT_BY_IDX;
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 671c697..e0a0f55 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -147,7 +147,8 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Create the attribute */
- if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, type_id, space_id, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, type_id, space_id, acpl_id,
+ H5P_ATTRIBUTE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
@@ -212,7 +213,8 @@ H5Aopen_name(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the attribute */
- if(NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, name, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, name, H5P_ATTRIBUTE_ACCESS_DEFAULT,
+ H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute")
/* Register the attribute and get an ID for it */
@@ -280,7 +282,8 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the attribute */
- if(NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, NULL, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, NULL, H5P_ATTRIBUTE_ACCESS_DEFAULT,
+ H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute")
/* Register the attribute and get an ID for it */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 4690616..06ef4591 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -180,8 +180,9 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type,
if(NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "can't allocate shared attr structure")
- /* If the creation property list is H5P_DEFAULT, use the default character encoding */
- if(acpl_id == H5P_DEFAULT)
+ /* If the creation property list is H5P_ATTRIBUTE_CREATE_DEFAULT, use the default character encoding */
+ HDassert(acpl_id != H5P_DEFAULT);
+ if(acpl_id == H5P_ATTRIBUTE_CREATE_DEFAULT)
attr->shared->encoding = H5F_DEFAULT_CSET;
else {
H5P_genplist_t *ac_plist; /* ACPL Property list */
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 50bb3da..f4f4223 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -116,8 +116,6 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
void *dset = NULL; /* dset object from VOL connector */
H5VL_object_t *vol_obj = NULL; /* object of loc_id */
H5VL_loc_params_t loc_params;
- hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
- hid_t dapl_id = H5P_DEFAULT; /* DAPL used by library */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
@@ -129,6 +127,10 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
if(!*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
+ /* Set up collective metadata if appropriate */
+ if(H5CX_set_loc(loc_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read")
+
if(H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
else
@@ -138,10 +140,6 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
/* Set the DCPL for the API context */
H5CX_set_dcpl(dcpl_id);
- /* Verify access property list and set up collective metadata if appropriate */
- if(H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(loc_id);
@@ -151,7 +149,8 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Create the dataset through the VOL */
- if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, lcpl_id, type_id, space_id, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, H5P_LINK_CREATE_DEFAULT, type_id, space_id, dcpl_id,
+ H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
/* Get an atom for the dataset */
diff --git a/src/H5F.c b/src/H5F.c
index 50473fe..8a1504a 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -914,13 +914,6 @@ H5Fdelete(const char *filename, hid_t fapl_id)
if(!filename || !*filename)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
- /* Check the file access property list */
- if(H5P_DEFAULT == fapl_id)
- fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
-
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
diff --git a/src/H5G.c b/src/H5G.c
index 585518c..a766e8a 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -343,7 +343,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
void *grp = NULL; /* Structure for new group */
H5VL_object_t *vol_obj = NULL; /* object of loc_id */
H5VL_loc_params_t loc_params;
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE5("i", "i*siii", loc_id, name, lcpl_id, gcpl_id, gapl_id);
@@ -501,7 +501,7 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
void *grp = NULL; /* Group opened */
H5VL_object_t *vol_obj = NULL; /* object of loc_id */
H5VL_loc_params_t loc_params;
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, name, gapl_id);
@@ -557,7 +557,7 @@ hid_t
H5Gget_create_plist(hid_t group_id)
{
H5VL_object_t *vol_obj = NULL;
- hid_t ret_value = H5I_INVALID_HID;
+ hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", group_id);
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 70c8b73..126456b 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -176,7 +176,6 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
H5VL_object_t *vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
hid_t tmp_gcpl = H5I_INVALID_HID; /* Temporary group creation property list */
- hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
@@ -228,7 +227,8 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Create the group */
- if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, lcpl_id, tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, H5P_LINK_CREATE_DEFAULT, tmp_gcpl,
+ H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
/* Get an atom for the group */
@@ -289,7 +289,8 @@ H5Gopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the group */
- if(NULL == (grp = H5VL_group_open(vol_obj, &loc_params, name, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (grp = H5VL_group_open(vol_obj, &loc_params, name, H5P_GROUP_ACCESS_DEFAULT,
+ H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group")
/* Get an atom for the group */
@@ -316,7 +317,6 @@ done:
herr_t
H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name)
{
- hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -342,11 +342,11 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
loc_params1.type = H5VL_OBJECT_BY_NAME;
loc_params1.obj_type = H5I_get_type(cur_loc_id);
loc_params1.loc_data.loc_by_name.name = cur_name;
- loc_params1.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params1.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params2.type = H5VL_OBJECT_BY_NAME;
loc_params2.loc_data.loc_by_name.name = new_name;
- loc_params2.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params2.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
/* get the location object */
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(cur_loc_id)))
@@ -357,7 +357,8 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
tmp_vol_obj.connector = vol_obj->connector;
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj->data, &loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj->data, &loc_params1) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
else if(type == H5L_TYPE_SOFT) {
@@ -366,7 +367,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = new_name;
- loc_params.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params.obj_type = H5I_get_type(cur_loc_id);
/* get the location object */
@@ -374,7 +375,8 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end else-if */
else
@@ -397,7 +399,6 @@ herr_t
H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
hid_t new_loc_id, const char *new_name)
{
- hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -423,12 +424,12 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
loc_params1.type = H5VL_OBJECT_BY_NAME;
loc_params1.obj_type = H5I_get_type(cur_loc_id);
loc_params1.loc_data.loc_by_name.name = cur_name;
- loc_params1.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params1.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params2.type = H5VL_OBJECT_BY_NAME;
loc_params2.obj_type = H5I_get_type(new_loc_id);
loc_params2.loc_data.loc_by_name.name = new_name;
- loc_params2.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params2.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
/* get the location object */
if(NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(cur_loc_id)))
@@ -437,7 +438,8 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, &loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, &loc_params1) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
else if(type == H5L_TYPE_SOFT) {
@@ -451,7 +453,7 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = new_name;
- loc_params.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params.obj_type = H5I_get_type(new_loc_id);
/* get the location object */
@@ -459,7 +461,8 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end else-if */
else
@@ -495,18 +498,19 @@ H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name)
loc_params1.type = H5VL_OBJECT_BY_NAME;
loc_params1.obj_type = H5I_get_type(src_loc_id);
loc_params1.loc_data.loc_by_name.name = src_name;
- loc_params1.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params1.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params2.type = H5VL_OBJECT_BY_NAME;
loc_params2.loc_data.loc_by_name.name = dst_name;
- loc_params2.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params2.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
/* get the location object */
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(src_loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Move the link */
- if(H5VL_link_move(vol_obj, &loc_params1, NULL, &loc_params2, H5P_DEFAULT, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(H5VL_link_move(vol_obj, &loc_params1, NULL, &loc_params2, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "couldn't move link")
done:
@@ -541,13 +545,13 @@ H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
/* Set location parameter for source object */
loc_params1.type = H5VL_OBJECT_BY_NAME;
loc_params1.loc_data.loc_by_name.name = src_name;
- loc_params1.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params1.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params1.obj_type = H5I_get_type(src_loc_id);
/* Set location parameter for destination object */
loc_params2.type = H5VL_OBJECT_BY_NAME;
loc_params2.loc_data.loc_by_name.name = dst_name;
- loc_params2.loc_data.loc_by_name.lapl_id = H5P_DEFAULT;
+ loc_params2.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params2.obj_type = H5I_get_type(dst_loc_id);
if(H5L_SAME_LOC != src_loc_id)
@@ -560,7 +564,8 @@ H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Move the link */
- if(H5VL_link_move(vol_obj1, &loc_params1, vol_obj2, &loc_params2, H5P_DEFAULT, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(H5VL_link_move(vol_obj1, &loc_params1, vol_obj2, &loc_params2, H5P_LINK_CREATE_DEFAULT,
+ H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "unable to move link")
done:
diff --git a/src/H5L.c b/src/H5L.c
index 4533ea7..6612ff8 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -487,6 +487,10 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
/* Set the LCPL for the API context */
H5CX_set_lcpl(lcpl_id);
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
+
/* Set location fields */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = link_name;
@@ -497,10 +501,6 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
if(NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(link_loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Verify access property list and set up collective metadata if appropriate */
- if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
-
/* Create the link */
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, link_target) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create soft link")
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index e5ac7c8..1b007b6 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -371,6 +371,10 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
/* Set the LCPL for the API context */
H5CX_set_lcpl(lcpl_id);
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
+
/* Get normalized copy of the link target */
if(NULL == (norm_obj_name = H5G_normalize(obj_name)))
HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize object name")
@@ -389,10 +393,6 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
p += file_name_len;
HDstrncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
- /* Verify access property list and set up collective metadata if appropriate */
- if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
-
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = link_name;
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index c4642e2..6e582fb 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -270,8 +270,8 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if(NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
- if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
+ if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
} /* end if */
done:
@@ -313,8 +313,8 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if(NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
- if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
+ if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
} /* end if */
done:
@@ -329,8 +329,8 @@ done:
* property in the dataset access property list is
* encoded.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Wednesday, August 15, 2012
@@ -401,8 +401,8 @@ done:
* property in the dataset access property list is
* decoded.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Wednesday, August 15, 2012
@@ -454,15 +454,15 @@ done:
/*--------------------------------------------------------------------------
- * Function: H5P__lacc_elink_fapl_del
+ * Function: H5P__lacc_elink_fapl_del
*
- * Purpose: Close the FAPL for link access
+ * Purpose: Close the FAPL for link access
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Vailin Choi
- * Tuesday, Sept 23, 2008
+ * Programmer: Vailin Choi
+ * Tuesday, Sept 23, 2008
*
*--------------------------------------------------------------------------
*/
@@ -482,7 +482,7 @@ H5P__lacc_elink_fapl_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
/* Close the FAPL */
if(l_fapl_id != H5P_DEFAULT && H5I_dec_ref(l_fapl_id) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close atom for file access property list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close atom for file access property list")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -490,15 +490,15 @@ done:
/*--------------------------------------------------------------------------
- * Function: H5P__lacc_elink_fapl_copy
+ * Function: H5P__lacc_elink_fapl_copy
*
- * Purpose: Copy the FAPL for link access
+ * Purpose: Copy the FAPL for link access
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Vailin Choi
- * Tuesday, Sept 23, 2008
+ * Programmer: Vailin Choi
+ * Tuesday, Sept 23, 2008
*
*--------------------------------------------------------------------------
*/
@@ -522,8 +522,8 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
if(NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list")
- if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
+ if(((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list")
} /* end if */
done:
@@ -579,23 +579,23 @@ done:
/*--------------------------------------------------------------------------
- * Function: H5P__lacc_elink_fapl_close
+ * Function: H5P__lacc_elink_fapl_close
*
- * Purpose: Close the FAPL for link access
+ * Purpose: Close the FAPL for link access
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Vailin Choi
- * Tuesday, Sept 23, 2008
+ * Programmer: Vailin Choi
+ * Tuesday, Sept 23, 2008
*
*---------------------------------------------------------------------------
*/
static herr_t
H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- hid_t l_fapl_id;
- herr_t ret_value = SUCCEED;
+ hid_t l_fapl_id;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -607,7 +607,7 @@ H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
/* Close the FAPL */
if((l_fapl_id > H5P_DEFAULT) && (H5I_dec_ref(l_fapl_id) < 0))
- HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close atom for file access property list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close atom for file access property list")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index f6eaf1a..1b922d5 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -306,7 +306,8 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Commit the datatype */
- if(NULL == (dt = H5VL_datatype_commit(vol_obj, &loc_params, NULL, type_id, H5P_DEFAULT, tcpl_id, tapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (dt = H5VL_datatype_commit(vol_obj, &loc_params, NULL, type_id, H5P_LINK_CREATE_DEFAULT,
+ tcpl_id, tapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Setup VOL object */
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 1a0ee7e..2c98dc0 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -137,7 +137,8 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Commit the datatype */
- if(NULL == (data = H5VL_datatype_commit(vol_obj, &loc_params, name, type_id, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (data = H5VL_datatype_commit(vol_obj, &loc_params, name, type_id, H5P_LINK_CREATE_DEFAULT,
+ H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Set up VOL object */
diff --git a/src/H5VL.c b/src/H5VL.c
index bd34d4e..18fd3d6 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -107,7 +107,7 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector must provide free callback for object wrapping contexts when a get callback is provided")
- /* Check VOL initialization property list */
+ /* Check VOL initialization property list */
if(H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
else
@@ -154,7 +154,7 @@ H5VLregister_connector_by_name(const char *name, hid_t vipl_id)
if (0 == HDstrlen(name))
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "zero-length VOL connector name is disallowed")
- /* Check VOL initialization property list */
+ /* Check VOL initialization property list */
if(H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
else
@@ -199,7 +199,7 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id)
if(value < 0)
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "negative VOL connector value is disallowed")
- /* Check VOL initialization property list */
+ /* Check VOL initialization property list */
if(H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
else
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 572221a..39b0f53 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -443,7 +443,7 @@ H5VL__set_def_conn(void)
else {
/* Register the VOL connector */
/* (NOTE: No provisions for vipl_id currently) */
- if((connector_id = H5VL__register_connector_by_name(tok, TRUE, H5P_DEFAULT)) < 0)
+ if((connector_id = H5VL__register_connector_by_name(tok, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register connector")
} /* end else */
} /* end else */
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index c2fab72..616ca60 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -164,7 +164,7 @@ H5VL_native_register(void)
/* Register the native VOL connector, if it isn't already */
if(H5I_INVALID_HID == H5VL_NATIVE_ID_g)
- if((H5VL_NATIVE_ID_g = H5VL_register_connector(&H5VL_native_cls_g, TRUE, H5P_DEFAULT)) < 0)
+ if((H5VL_NATIVE_ID_g = H5VL_register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector")
/* Set return value */