summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorU-hdf\nfortne2 <nfortne2@UMMON.ad.hdfgroup.org>2016-12-15 15:49:52 (GMT)
committerU-hdf\nfortne2 <nfortne2@UMMON.ad.hdfgroup.org>2016-12-15 15:49:52 (GMT)
commit9a4b73eea06b984119e42e533bb6bb554644f1bc (patch)
tree1c408c68973d446538bc9f180e2b079f2d7f9611
parent7697a7230428eaca5d101749d03c53ff5abc26fc (diff)
downloadhdf5-9a4b73eea06b984119e42e533bb6bb554644f1bc.zip
hdf5-9a4b73eea06b984119e42e533bb6bb554644f1bc.tar.gz
hdf5-9a4b73eea06b984119e42e533bb6bb554644f1bc.tar.bz2
Add support for reading FCPL from file. Other minor fixes.
-rw-r--r--examples/h5dsm_group_create.c2
-rw-r--r--src/H5FF.c4
-rw-r--r--src/H5VLdaosm.c6
3 files changed, 11 insertions, 1 deletions
diff --git a/examples/h5dsm_group_create.c b/examples/h5dsm_group_create.c
index ad6e3da..e5c3d49 100644
--- a/examples/h5dsm_group_create.c
+++ b/examples/h5dsm_group_create.c
@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
if((trans = H5TRcreate(file, trans_num + 1)) < 0)
ERROR;
- printf("Creating dataset - transaction number = %llu\n", (long long unsigned)(trans_num + 1));
+ printf("Creating group - transaction number = %llu\n", (long long unsigned)(trans_num + 1));
/* Create group */
if((grp = H5Gcreate_ff(file, argv[3], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, trans)) < 0)
diff --git a/src/H5FF.c b/src/H5FF.c
index 301e328..1378f9e 100644
--- a/src/H5FF.c
+++ b/src/H5FF.c
@@ -350,6 +350,10 @@ H5Fclose_ff(hid_t file_id, hid_t H5_ATTR_UNUSED trans_id)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", file_id, trans_id);
+ /* Check/fix arguments. */
+ if(H5I_FILE != H5I_get_type(file_id))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID")
+
/* flush file using trans_id? DSMINC */
/* Decrement reference count on atom. When it reaches zero the file will be closed. */
diff --git a/src/H5VLdaosm.c b/src/H5VLdaosm.c
index c99abb3..0c304b3 100644
--- a/src/H5VLdaosm.c
+++ b/src/H5VLdaosm.c
@@ -1067,6 +1067,12 @@ H5VL_daosm_file_open(const char *name, unsigned flags, hid_t fapl_id,
if(NULL == (file->root_grp = (H5VL_daosm_group_t *)H5VL_daosm_group_open_helper(file, root_grp_oid, H5P_GROUP_ACCESS_DEFAULT, dxpl_id, req, epoch)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't open root group")
+ /* FCPL was stored as root group's GCPL (as GCPL is the parent of FCPL).
+ * Point to it. */
+ file->fcpl_id = file->root_grp->gcpl_id;
+ if(H5Iinc_ref(file->fcpl_id) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, NULL, "can't increment FCPL ref count")
+
/* Determine if we want to acquire a transaction for the opened file */
if(H5P_get(plist, H5VL_ACQUIRE_TR_ID, &trans_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for trans id")