Merge pull request #2630 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop

* commit '87695c999ad7ea348ee6dc03b46b0bd345f7d7df':
  Minor normalizations with HDF5 1.10.
This commit is contained in:
Dana Robinson 2020-06-08 08:27:52 -05:00
commit 56ab55be3f
6 changed files with 38 additions and 46 deletions

View File

@ -280,7 +280,7 @@ H5Fget_create_plist(hid_t file_id)
/* Retrieve the file creation property list */ /* Retrieve the file creation property list */
if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FCPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FCPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties") HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties")
done: done:
FUNC_LEAVE_API(ret_value) FUNC_LEAVE_API(ret_value)
@ -320,7 +320,7 @@ H5Fget_access_plist(hid_t file_id)
/* Retrieve the file's access property list */ /* Retrieve the file's access property list */
if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FAPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0) if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FAPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list") HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list")
done: done:
FUNC_LEAVE_API(ret_value) FUNC_LEAVE_API(ret_value)
@ -584,8 +584,8 @@ done:
* *
* Purpose: Check if the file can be opened with the given fapl. * Purpose: Check if the file can be opened with the given fapl.
* *
* Return: Succeed: TRUE/FALSE * Return: Success: TRUE/FALSE
* Failure: FAIL (includes file does not exist) * Failure: -1 (includes file does not exist)
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -820,8 +820,7 @@ done:
* not remove them from the cache. The OBJECT_ID can be a file, * not remove them from the cache. The OBJECT_ID can be a file,
* dataset, group, attribute, or named data type. * dataset, group, attribute, or named data type.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -863,8 +862,8 @@ done:
* closed until those objects are closed; however, all data for * closed until those objects are closed; however, all data for
* the file and the open objects is flushed. * the file and the open objects is flushed.
* *
* Return: SUCCEED/FAIL * Return: Success: Non-negative
* * Failure: Negative
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -879,11 +878,9 @@ H5Fclose(hid_t file_id)
if(H5I_FILE != H5I_get_type(file_id)) if(H5I_FILE != H5I_get_type(file_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID")
/* Decrement reference count on atom. When it reaches zero the file will /* Close the file */
* be closed.
*/
if(H5I_dec_app_ref(file_id) < 0) if(H5I_dec_app_ref(file_id) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed") HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "closing file ID failed")
done: done:
FUNC_LEAVE_API(ret_value) FUNC_LEAVE_API(ret_value)
@ -1011,8 +1008,7 @@ done:
* Purpose: Public API to retrieve the file's 'intent' flags passed * Purpose: Public API to retrieve the file's 'intent' flags passed
* during H5Fopen() * during H5Fopen()
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1117,8 +1113,8 @@ done:
* is called after an existing file is opened in order * is called after an existing file is opened in order
* to learn the true size of the underlying file. * to learn the true size of the underlying file.
* *
* Return: SUCCEED/FAIL * Return: Success: Non-negative
* * Failure: Negative
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1622,14 +1618,14 @@ done:
* set up flush dependency/proxy even for file opened without * set up flush dependency/proxy even for file opened without
* SWMR to resolve issues with opened objects. * SWMR to resolve issues with opened objects.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/negative on failure
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
H5Fstart_swmr_write(hid_t file_id) H5Fstart_swmr_write(hid_t file_id)
{ {
H5VL_object_t *vol_obj = NULL; /* File info */ H5VL_object_t *vol_obj = NULL; /* File info */
herr_t ret_value = SUCCEED; /* Return value */ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL) FUNC_ENTER_API(FAIL)
@ -1658,8 +1654,7 @@ done:
* Purpose: Start metadata cache logging operations for a file. * Purpose: Start metadata cache logging operations for a file.
* - Logging must have been set up via the fapl. * - Logging must have been set up via the fapl.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on errors
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1691,8 +1686,7 @@ done:
* - Does not close the log file. * - Does not close the log file.
* - Logging must have been set up via the fapl. * - Logging must have been set up via the fapl.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on errors
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1724,8 +1718,7 @@ done:
* set up via the fapl. is_currently_logging determines if * set up via the fapl. is_currently_logging determines if
* log messages are being recorded at this time. * log messages are being recorded at this time.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on errors
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1759,8 +1752,7 @@ done:
* H5Fset_latest_format() starting release 1.10.2. * H5Fset_latest_format() starting release 1.10.2.
* See explanation for H5Fset_latest_format() in H5Fdeprec.c. * See explanation for H5Fset_latest_format() in H5Fdeprec.c.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1796,8 +1788,7 @@ done:
* downgrade persistent file space to non-persistent * downgrade persistent file space to non-persistent
* for 1.8 library. * for 1.8 library.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1831,8 +1822,7 @@ done:
* *
* Purpose: Resets statistics for the page buffer layer. * Purpose: Resets statistics for the page buffer layer.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1862,8 +1852,7 @@ done:
* *
* Purpose: Retrieves statistics for the page buffer layer. * Purpose: Retrieves statistics for the page buffer layer.
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1901,8 +1890,7 @@ done:
* image_len: --size of the on disk metadata cache image * image_len: --size of the on disk metadata cache image
* --zero if no cache image * --zero if no cache image
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on failure
*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1934,7 +1922,10 @@ done:
* allocated memory in the file. * allocated memory in the file.
* (See H5FDget_eoa() in H5FD.c) * (See H5FDget_eoa() in H5FD.c)
* *
* Return: SUCCEED/FAIL * Return: Success: First byte after allocated memory.
* Failure: HADDR_UNDEF
*
* Non-negative on success/Negative on failure
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t
@ -1967,7 +1958,7 @@ done:
* *
* Purpose: Set the EOA for the file to the maximum of (EOA, EOF) + increment * Purpose: Set the EOA for the file to the maximum of (EOA, EOF) + increment
* *
* Return: SUCCEED/FAIL * Return: Non-negative on success/Negative on errors
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
herr_t herr_t

View File

@ -1138,7 +1138,7 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list") HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list")
f->shared = H5FL_FREE(H5F_shared_t, f->shared); f->shared = H5FL_FREE(H5F_shared_t, f->shared);
} /* end if */ }
/* Free VOL object */ /* Free VOL object */
if(f->vol_obj) if(f->vol_obj)
@ -1146,7 +1146,7 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "unable to free VOL object") HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "unable to free VOL object")
f = H5FL_FREE(H5F_t, f); f = H5FL_FREE(H5F_t, f);
} /* end if */ }
FUNC_LEAVE_NOAPI(ret_value) FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__new() */ } /* end H5F__new() */

View File

@ -25,15 +25,15 @@ typedef struct H5F_t H5F_t;
#include "H5Fpublic.h" #include "H5Fpublic.h"
/* Public headers needed by this file */ /* Public headers needed by this file */
#include "H5FDpublic.h" /* File drivers */ #include "H5FDpublic.h" /* File drivers */
/* Private headers needed by this file */ /* Private headers needed by this file */
#include "H5MMprivate.h" /* Memory management */ #include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_PARALLEL #ifdef H5_HAVE_PARALLEL
#include "H5Pprivate.h" /* Property lists */ #include "H5Pprivate.h" /* Property lists */
#endif /* H5_HAVE_PARALLEL */ #endif /* H5_HAVE_PARALLEL */
#include "H5VMprivate.h" /* Vectors and arrays */ #include "H5VMprivate.h" /* Vectors and arrays */
#include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VLprivate.h" /* Virtual Object Layer */
/**************************/ /**************************/
@ -795,7 +795,6 @@ H5_DLL hsize_t H5F_get_alignment(const H5F_t *f);
H5_DLL hsize_t H5F_get_threshold(const H5F_t *f); H5_DLL hsize_t H5F_get_threshold(const H5F_t *f);
#ifdef H5_HAVE_PARALLEL #ifdef H5_HAVE_PARALLEL
H5_DLL H5P_coll_md_read_flag_t H5F_coll_md_read(const H5F_t *f); H5_DLL H5P_coll_md_read_flag_t H5F_coll_md_read(const H5F_t *f);
H5_DLL void H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t flag);
#endif /* H5_HAVE_PARALLEL */ #endif /* H5_HAVE_PARALLEL */
H5_DLL hbool_t H5F_use_mdc_logging(const H5F_t *f); H5_DLL hbool_t H5F_use_mdc_logging(const H5F_t *f);
H5_DLL hbool_t H5F_start_mdc_log_on_access(const H5F_t *f); H5_DLL hbool_t H5F_start_mdc_log_on_access(const H5F_t *f);

View File

@ -229,6 +229,7 @@ H5F_get_extpath(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f); HDassert(f);
HDassert(f->shared);
HDassert(f->shared->extpath); HDassert(f->shared->extpath);
FUNC_LEAVE_NOAPI(f->shared->extpath) FUNC_LEAVE_NOAPI(f->shared->extpath)

View File

@ -1137,10 +1137,11 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
/* If it's metadata, check if the space to free intersects with the file's /* If it's metadata, check if the space to free intersects with the file's
* metadata accumulator * metadata accumulator
*/ */
if(H5FD_MEM_DRAW != alloc_type) if(H5FD_MEM_DRAW != alloc_type) {
/* Check if the space to free intersects with the file's metadata accumulator */ /* Check if the space to free intersects with the file's metadata accumulator */
if(H5F__accum_free(f->shared, alloc_type, addr, size) < 0) if(H5F__accum_free(f->shared, alloc_type, addr, size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator") HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator")
} /* end if */
/* Check if the free space manager for the file has been initialized */ /* Check if the free space manager for the file has been initialized */
if(!f->shared->fs_man[fs_type]) { if(!f->shared->fs_man[fs_type]) {

View File

@ -314,7 +314,7 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un
/* Allocate the new page buffering structure */ /* Allocate the new page buffering structure */
if(NULL == (page_buf = H5FL_CALLOC(H5PB_t))) if(NULL == (page_buf = H5FL_CALLOC(H5PB_t)))
HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
page_buf->max_size = size; page_buf->max_size = size;
H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t); H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t);