summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2018-03-12 23:00:05 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2018-03-12 23:00:05 (GMT)
commita8afb3ab3b32b07611fb5932303dd0594a1c9658 (patch)
tree670003b264edae0bd2f4ee60233fe5be3dd2a0f2 /src/H5Fint.c
parent612fefc435a9bc07ada6a380a54878f1cf71ae09 (diff)
parentf08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1 (diff)
downloadhdf5-a8afb3ab3b32b07611fb5932303dd0594a1c9658.zip
hdf5-a8afb3ab3b32b07611fb5932303dd0594a1c9658.tar.gz
hdf5-a8afb3ab3b32b07611fb5932303dd0594a1c9658.tar.bz2
Merge pull request #931 in HDFFV/hdf5 from ~VCHOI/my_hdf5_fork:develop to develop
* commit 'f08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1': Enhancement to the tool h5clear (HDFFV-10360) Fix for HDFFV-10209 VDS SWMR test failure Free the object header when there are chksum retries.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index cc5931a..24844a4 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -124,7 +124,6 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
hbool_t driver_prop_copied = FALSE; /* Whether the driver property has been set up */
unsigned efc_size = 0;
- hbool_t latest_format = FALSE; /* Always use the latest format? */
hid_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -820,7 +819,6 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t
else {
H5P_genplist_t *plist; /* Property list */
unsigned efc_size; /* External file cache size */
- hbool_t latest_format; /* Always use the latest format? */
size_t u; /* Local index variable */
HDassert(lf != NULL);
@@ -1602,7 +1600,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
} /* end if */
else if (1 == shared->nrefs) {
/* Read the superblock if it hasn't been read before. */
- if(H5F__super_read(file, meta_dxpl_id, raw_dxpl_id, TRUE) < 0)
+ if(H5F__super_read(file, meta_dxpl_id, raw_dxpl_id, fapl_id, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
/* Create the page buffer before initializing the superblock */
@@ -2921,6 +2919,43 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__set_paged_aggr() */
+/*-------------------------------------------------------------------------
+ * Function: H5F__get_max_eof_eoa
+ *
+ * Purpose: Determine the maximum of (EOA, EOF) for the file
+ *
+ * Return: Non-negative on success/Negative on failure
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa)
+{
+ haddr_t eof; /* Relative address for EOF */
+ haddr_t eoa; /* Relative address for EOA */
+ haddr_t tmp_max;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Sanity checks */
+ HDassert(f);
+ HDassert(f->shared);
+
+ /* Get the relative EOA and EOF */
+ eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT);
+ eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT);
+
+ /* Determine the maximum */
+ tmp_max = MAX(eof, eoa);
+ if(HADDR_UNDEF == tmp_max)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file get eof/eoa requests failed")
+
+ *max_eof_eoa = tmp_max;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F__get_max_eof_eoa() */
+
#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------