summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-01-12 20:36:03 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-01-12 20:36:03 (GMT)
commit37318f109a294bb47e5040be5888963967c1badc (patch)
tree183f86084fec7afa0ce48787db692c567dc812ab /src/H5F.c
parent7af4786a9b29184596cb31afa80b69a68f00349b (diff)
downloadhdf5-37318f109a294bb47e5040be5888963967c1badc.zip
hdf5-37318f109a294bb47e5040be5888963967c1badc.tar.gz
hdf5-37318f109a294bb47e5040be5888963967c1badc.tar.bz2
Changes made based on code reviews.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/H5F.c b/src/H5F.c
index c670e17..8e5f65a 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1478,6 +1478,8 @@ H5Fstart_swmr_write(hid_t file_id)
if(file->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file superblock version should be at least 3")
+ HDassert((file->shared->low_bound == H5F_LIBVER_V110) && (file->shared->high_bound == H5F_LIBVER_V110));
+
/* Should not be marked for SWMR writing mode already */
if(file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file already in SWMR writing mode")
@@ -1739,9 +1741,12 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Fset_libver_bounds (Internal library use)
+ * Function: H5Fset_libver_bounds
*
- * Purpose: Set .... the "latest format" flag while a file is open.
+ * Purpose: Set to a different low and high bounds while a file is open.
+ * This public routine is introduced in place of
+ * H5Fset_latest_format() starting release 1.10.2.
+ * See explanation for H5Fset_latest_format() in H5Fdeprec.c.
*
* Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
@@ -1759,12 +1764,9 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high)
if(NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID")
- /* Call the flush routine, for this file */
- if(H5F__flush(f, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")
-
- f->shared->low_bound = low;
- f->shared->high_bound = high;
+ /* Call private set_libver_bounds function */
+ if(H5F_set_libver_bounds(f, low, high) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds")
done:
FUNC_LEAVE_API(ret_value)