summaryrefslogtreecommitdiffstats
path: root/src/H5B2cache.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-28 19:33:16 (GMT)
committerGitHub <noreply@github.com>2023-07-28 19:33:16 (GMT)
commit8ddf2706f7e0cde59fad6624e2863960e62f6544 (patch)
treef090bb9fa368c90f67029f5d860ef39df3e8b038 /src/H5B2cache.c
parentb1ab59d239c74cdbea7d518b1398458c4150655f (diff)
downloadhdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.zip
hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.gz
hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.bz2
Sync of src w/ develop (#3307)
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r--src/H5B2cache.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index d63baa1..2c749ff 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -13,10 +13,8 @@
/*-------------------------------------------------------------------------
*
* Created: H5B2cache.c
- * Jan 31 2005
- * Quincey Koziol
*
- * Purpose: Implement v2 B-tree metadata cache methods.
+ * Purpose: Implement v2 B-tree metadata cache methods
*
*-------------------------------------------------------------------------
*/
@@ -30,10 +28,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5B2pkg.h" /* v2 B-trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5WBprivate.h" /* Wrapped Buffers */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata Cache */
+#include "H5B2pkg.h" /* B-Trees (Version 2) */
+#include "H5Eprivate.h" /* Error Handling */
+#include "H5Fprivate.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MMprivate.h" /* Memory Management */
/****************/
/* Local Macros */
@@ -268,7 +269,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
cparam.merge_percent = *image++;
/* Root node pointer */
- H5_addr_decode(udata->f, (const uint8_t **)&image, &(hdr->root.addr));
+ H5F_addr_decode(udata->f, (const uint8_t **)&image, &(hdr->root.addr));
UINT16DECODE(image, hdr->root.node_nrec);
H5F_DECODE_LENGTH(udata->f, image, hdr->root.all_nrec);
@@ -297,7 +298,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
done:
if (!ret_value && hdr)
if (H5B2__hdr_free(hdr) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B2__cache_hdr_deserialize() */
@@ -378,7 +379,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = (uint8_t)hdr->merge_percent;
/* Root node pointer */
- H5_addr_encode(f, &image, hdr->root.addr);
+ H5F_addr_encode(f, &image, hdr->root.addr);
UINT16ENCODE(image, hdr->root.node_nrec);
H5F_ENCODE_LENGTH(f, image, hdr->root.all_nrec);
@@ -663,12 +664,12 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
int_node_ptr = internal->node_ptrs;
for (u = 0; u < (unsigned)(internal->nrec + 1); u++) {
/* Decode node pointer */
- H5_addr_decode(udata->f, (const uint8_t **)&image, &(int_node_ptr->addr));
+ H5F_addr_decode(udata->f, (const uint8_t **)&image, &(int_node_ptr->addr));
UINT64DECODE_VAR(image, node_nrec, udata->hdr->max_nrec_size);
H5_CHECKED_ASSIGN(int_node_ptr->node_nrec, uint16_t, node_nrec, int);
if (udata->depth > 1)
UINT64DECODE_VAR(image, int_node_ptr->all_nrec,
- udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size)
+ udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size);
else
int_node_ptr->all_nrec = int_node_ptr->node_nrec;
@@ -690,7 +691,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
done:
if (!ret_value && internal)
if (H5B2__internal_free(internal) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node");
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_int_deserialize() */
@@ -779,7 +780,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
int_node_ptr = internal->node_ptrs;
for (u = 0; u < (unsigned)(internal->nrec + 1); u++) {
/* Encode node pointer */
- H5_addr_encode(f, &image, int_node_ptr->addr);
+ H5F_addr_encode(f, &image, int_node_ptr->addr);
UINT64ENCODE_VAR(image, int_node_ptr->node_nrec, internal->hdr->max_nrec_size);
if (internal->depth > 1)
UINT64ENCODE_VAR(image, int_node_ptr->all_nrec,
@@ -1063,7 +1064,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
done:
if (!ret_value && leaf)
if (H5B2__leaf_free(leaf) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node");
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__cache_leaf_deserialize() */