summaryrefslogtreecommitdiffstats
path: root/src/H5PB.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2020-06-29 16:53:55 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2020-06-29 16:53:55 (GMT)
commit785a1cef0c2ea2d1a179d86e34117ffd73aaa70d (patch)
tree328dac1fd1adf20d4c2077fa15da7327a39817f2 /src/H5PB.c
parent7a4d7da14a745333c4e8f3955a0afd9db70969c0 (diff)
parent30776671fb0a27a98b0640aa968f850241a862ce (diff)
downloadhdf5-785a1cef0c2ea2d1a179d86e34117ffd73aaa70d.zip
hdf5-785a1cef0c2ea2d1a179d86e34117ffd73aaa70d.tar.gz
hdf5-785a1cef0c2ea2d1a179d86e34117ffd73aaa70d.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '30776671fb0a27a98b0640aa968f850241a862ce': (31 commits) * Fix intermittent error with Splitter VFD. Mismatch in time of test file creation was creating false negatives. Added note for HDFFV-10591. Fix HDFFV-10591 Reduce overhead for H5open, which is involved in the public symbols like H5T_NATIVE_INT, etc. Remove unnecessary version conditions for Clang compilers. Fix for HDFFV-10961: Couple changes to the tests' usage output files for h5clear. Fix for HDFFV-10961: add description to usage for --increment option. Add c++ to --enable-sanitize-checks option. Remove duplicate entries in MANIFEST. Make changes to CMake CompilerFlags.cmake files so extra flags are loaded for non-GNU compilers. Fix MANIFEST Add tests for all version to H5_NO_DEPRECATED_SYMBOLS section and to section for current version, with and without default API version flags. HDFFV-11000: update-testh5cc.sh.in to test sample versioned functions in HDF5 1.10, 1.12 and develop. Remember the info for the last ID looked up for a given ID type. Eliminate allocating file & memory offset & length arrays when performing I/O on a single element. Update new clang files to not pick up clang as vendor for pgCC. Add new files to MANIFEST Temporary demotion of 2 -Werror warning flags that fail on macos 10.12 Remove Production flag unknown to Apple clang. Remove redundant metadata cache tagging from some low-level internal chunk functions. The metadata cache tagging has already been done by routines further up the call stack. Clean up code to get clang version in config/linux-gnulibc1 Minor normalizations with HDF5 1.10. Add flags from config/clang-warnings/*general files to H5 C and CXX flags for all versions of Clang and Clang++ compilers. Switched from cut to awk in testcheck_version.sh.in to avoid dependence on tab vs. " " in version definitions in H5public.h. ...
Diffstat (limited to 'src/H5PB.c')
-rw-r--r--src/H5PB.c166
1 files changed, 84 insertions, 82 deletions
diff --git a/src/H5PB.c b/src/H5PB.c
index 45f24e3..907fe82 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -24,21 +24,21 @@
/* Module Setup */
/****************/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /* Suppress error about including H5Fpkg */
#include "H5PBmodule.h" /* This source code file is part of the H5PB module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5PBpkg.h" /* File access */
-#include "H5SLprivate.h" /* Skip List */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5PBpkg.h" /* File access */
+#include "H5SLprivate.h" /* Skip List */
/****************/
@@ -153,7 +153,7 @@ H5FL_DEFINE_STATIC(H5PB_entry_t);
/*-------------------------------------------------------------------------
- * Function: H5PB_reset_stats
+ * Function: H5PB_reset_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -162,7 +162,7 @@ H5FL_DEFINE_STATIC(H5PB_entry_t);
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -190,7 +190,7 @@ H5PB_reset_stats(H5PB_t *page_buf)
/*-------------------------------------------------------------------------
- * Function: H5PB_get_stats
+ * Function: H5PB_get_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -202,9 +202,9 @@ H5PB_reset_stats(H5PB_t *page_buf)
* --evictions: the number of metadata and raw data evictions from the page buffer layer
* --bypasses: the number of metadata and raw data accesses that bypass the page buffer layer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -233,16 +233,16 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2],
/*-------------------------------------------------------------------------
- * Function: H5PB_print_stats()
+ * Function: H5PB_print_stats()
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
* Print out statistics collected for the page buffer layer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -278,13 +278,13 @@ H5PB_print_stats(const H5PB_t *page_buf)
/*-------------------------------------------------------------------------
- * Function: H5PB_create
+ * Function: H5PB_create
*
- * Purpose: Create and setup the PB on the file.
+ * Purpose: Create and setup the PB on the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -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 */
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;
H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t);
@@ -355,13 +355,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB__flush_cb
+ * Function: H5PB__flush_cb
*
- * Purpose: Callback to flush PB skiplist entries.
+ * Purpose: Callback to flush PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -389,13 +389,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB_flush
+ * Function: H5PB_flush
*
- * Purpose: Flush/Free all the PB entries to the file.
+ * Purpose: Flush/Free all the PB entries to the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -424,13 +424,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB__dest_cb
+ * Function: H5PB__dest_cb
*
- * Purpose: Callback to free PB skiplist entries.
+ * Purpose: Callback to free PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -461,13 +461,13 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
/*-------------------------------------------------------------------------
- * Function: H5PB_dest
+ * Function: H5PB_dest
*
- * Purpose: Flush and destroy the PB on the file if it exists.
+ * Purpose: Flush and destroy the PB on the file if it exists.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -515,16 +515,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB_add_new_page
+ * Function: H5PB_add_new_page
*
- * Purpose: Add a new page to the new page skip list. This is called
+ * Purpose: Add a new page to the new page skip list. This is called
* from the MF layer when a new page is allocated to
* indicate to the page buffer layer that a read of the page
* from the file is not necessary since it's an empty page.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -575,16 +575,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB_update_entry
+ * Function: H5PB_update_entry
*
- * Purpose: In PHDF5, entries that are written by other processes and just
+ * Purpose: In PHDF5, entries that are written by other processes and just
* marked clean by this process have to have their corresponding
* pages updated if they exist in the page buffer.
* This routine checks and update the pages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -675,14 +675,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB_read
+ * Function: H5PB_read
*
- * Purpose: Reads in the data from the page containing it if it exists
+ * Purpose: Reads in the data from the page containing it if it exists
* in the PB cache; otherwise reads in the page through the VFD.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -971,15 +971,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB_write
+ * Function: H5PB_write
*
- * Purpose: Write data into the Page Buffer. If the page exists in the
- * cache, update it; otherwise read it from disk, update it, and
- * insert into cache.
+ * Purpose: Write data into the Page Buffer. If the page exists in the
+ * cache, update it; otherwise read it from disk, update it, and
+ * insert into cache.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -1311,26 +1311,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB__insert_entry()
- *
- * Purpose: ???
+ * Function: H5PB__insert_entry()
*
- * This function was created without documentation.
- * What follows is my best understanding of Mohamad's intent.
+ * Purpose: This function was created without documentation.
+ * What follows is my best understanding of Mohamad's intent.
*
- * Insert the supplied page into the page buffer, both the
- * skip list and the LRU.
+ * Insert the supplied page into the page buffer, both the
+ * skip list and the LRU.
*
- * As best I can tell, this function imposes no limit on the
- * number of entries in the page buffer beyond an assertion
- * failure it the page count exceeds the limit.
+ * As best I can tell, this function imposes no limit on the
+ * number of entries in the page buffer beyond an assertion
+ * failure it the page count exceeds the limit.
*
* JRM -- 12/22/16
*
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -1361,16 +1359,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB__make_space()
+ * Function: H5PB__make_space()
*
- * Purpose: If necessary and if possible, evict a page from the page
- * buffer to make space for the supplied page. Depending on
- * the page buffer configuration and contents, and the page
- * supplied this may or may not be possible.
+ * Purpose: This function was created without documentation.
+ * What follows is my best understanding of Mohamad's intent.
*
- * Return: Non-negative on success/Negative on failure
+ * If necessary and if possible, evict a page from the page
+ * buffer to make space for the supplied page. Depending on
+ * the page buffer configuration and contents, and the page
+ * supplied this may or may not be possible.
*
- * Programmer: Mohamad Chaarawi
+ * JRM -- 12/22/16
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -1459,17 +1462,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5PB__write_entry()
- *
- * Purpose: ???
+ * Function: H5PB__write_entry()
*
- * This function was created without documentation.
- * What follows is my best understanding of Mohamad's intent.
+ * Purpose: ???
*
+ * This function was created without documentation.
+ * What follows is my best understanding of Mohamad's intent.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/