diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-03-31 07:56:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 07:56:29 (GMT) |
commit | bc62da7eb911727497475d1cc90991230f33fa3d (patch) | |
tree | d2bd03b84b8e97d21dbcdfaa04199c898b6ae291 /src/H5FDvfd_swmr.c | |
parent | fbb532cd633e216f47ce846493b38af02cfbb43a (diff) | |
download | hdf5-bc62da7eb911727497475d1cc90991230f33fa3d.zip hdf5-bc62da7eb911727497475d1cc90991230f33fa3d.tar.gz hdf5-bc62da7eb911727497475d1cc90991230f33fa3d.tar.bz2 |
VFD SWMR: Normalization with develop and cleanup (#1559)
* Brought over plugin and test script changes
* Removes remaining register keywords (#1481)
* Fixed warnings in the aux process code
* Minor fixes from develop
* Minor changes from develop, fixed format warnings
* Formatted source
* Added HD prefix to timespec_get
* Cleanup in new files
* Removes the MANIFEST file and unused release files (#1497)
* Removes the MANIFEST file and unused release files
* Updated tar command
* checkposix corrections
* More checkposix fixes
* Ripped out unused instrumentation functionality
* Brought over cache tagging changes from develop
* Changes to tagged metadata expulsion iteration
* Fixed typo
* Brought over H5O__free() changes from develop
* Brings (unused) parallel page buffer test in line with develop
* Moved the functionality in supervise.subr to test_vfd_swmr.sh
* Tools VFD parameter updates
* Committing clang-format changes
* H5F VFD SWMR refactoring
* Committing clang-format changes
* Misc changes
* Acceptance test cleanup
* HD prefix
* H5_get_option instead of getopt
* Some bool fixes
* Changes to VFD SWMR acceptance tests
* Minor cleanup
* Use AC_MSG_RESULT/AC_MSG_ERROR/AC_MSG_WARN instead of echo (#1532)
* Merges from develop
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5FDvfd_swmr.c')
-rw-r--r-- | src/H5FDvfd_swmr.c | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index cd1a02e..c79a357 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -142,9 +142,6 @@ H5FL_SEQ_DEFINE(H5FD_vfd_swmr_idx_entry_t); * Return: Success: The driver ID for the VFD SWMR driver. * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, July 29, 1999 - * *------------------------------------------------------------------------- */ hid_t @@ -170,9 +167,6 @@ H5FD_vfd_swmr_init(void) * * Returns: SUCCEED (Can't fail) * - * Programmer: Quincey Koziol - * Friday, Jan 30, 2004 - * *--------------------------------------------------------------------------- */ static herr_t @@ -214,9 +208,16 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_fapl_vfd_swmr() */ -/* Perform the reader-only aspects of opening in VFD SWMR mode: - * initialize histogram of ticks spent in API calls, wait for the - * shadow file to appear, load the header and index. +/*------------------------------------------------------------------------- + * Function: H5FD__swmr_reader_open + * + * Purpose: Perform the reader-only aspects of opening in VFD SWMR mode: + * initialize histogram of ticks spent in API calls, wait for + * the shadow file to appear, load the header and index. + * + * Return: SUCCEED/FAIL + * + *------------------------------------------------------------------------- */ static herr_t H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file) @@ -351,24 +352,38 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__vfd_swmr_open() */ -/* Perform the reader-only aspects of closing in VFD SWMR mode: optionally - * log and always release the histogram of ticks spent in API calls, - * close the shadow file, release the shadow index. +/*------------------------------------------------------------------------- + * Function: H5FD__swmr_reader_close + * + * Purpose: Perform the reader-only aspects of closing in VFD SWMR mode: + * optionally log and always release the histogram of ticks spent + * in API calls, close the shadow file, release the shadow index. + * + * Return: void + * + *------------------------------------------------------------------------- */ -static void +static herr_t H5FD__swmr_reader_close(H5FD_vfd_swmr_t *file) { + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + if (file->api_elapsed_ticks != NULL) H5MM_xfree(file->api_elapsed_ticks); /* Close the metadata file */ if (file->md_fd >= 0 && HDclose(file->md_fd) < 0) /* Push error, but keep going */ - HERROR(H5E_VFL, H5E_CANTCLOSEFILE, "unable to close the metadata file"); + HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close the metadata file"); /* Free the index entries */ if (file->md_index.num_entries && file->md_index.entries) file->md_index.entries = H5FL_SEQ_FREE(H5FD_vfd_swmr_idx_entry_t, file->md_index.entries); + + FUNC_LEAVE_NOAPI(ret_value) + } /* end H5FD__swmr_reader_close() */ /*------------------------------------------------------------------------- @@ -1188,7 +1203,7 @@ done: } /* H5FD__vfd_swmr_header_deserialize() */ -/* +/*------------------------------------------------------------------------- * Function: H5FD__vfd_swmr_index_deserialize() * * Purpose: Load and decode the index in the metadata file @@ -1199,10 +1214,8 @@ done: * --Decode the index entries if the tick number in the header and * the index match * - * Return: Success: TRUE - * Failure: FAIL - * Retry: FALSE - * + * Return: TRUE/FALSE/FAIL + *------------------------------------------------------------------------- */ static htri_t H5FD__vfd_swmr_index_deserialize(const H5FD_vfd_swmr_t *file, H5FD_vfd_swmr_md_index *md_index, @@ -1342,8 +1355,7 @@ done: * --Return tick_num, num_entries and index from the VFD's * local copies. * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: SUCCEED/FAIL * * Programmer: Vailin Choi * @@ -1392,8 +1404,7 @@ done: * Purpose: Dump a variety of information about the vfd swmr reader * vfd to stderr for debugging purposes. * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ @@ -1476,7 +1487,6 @@ H5FD_vfd_swmr_set_pb_configured(H5FD_t *_file) * Programmer: JRM -- 1/29/19 * *------------------------------------------------------------------------- - * */ void H5FD_vfd_swmr_record_elapsed_ticks(H5FD_t *_file, uint64_t elapsed) |