summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5B2cache.c2
-rw-r--r--src/H5B2pkg.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 86592c5..d8679aa 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -647,6 +647,7 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr
/* B-tree type */
*p++ = shared->type->id;
+ HDassert((size_t)(p - shared->page) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for internal node */
native = internal->int_native;
@@ -982,6 +983,7 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5
/* b-tree type */
*p++ = shared->type->id;
+ HDassert((size_t)(p - shared->page) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for leaf node */
native = leaf->leaf_native;
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 3dfbe41..43fab1f 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -69,6 +69,7 @@
#define H5B2_METADATA_PREFIX_SIZE ( \
H5B2_SIZEOF_MAGIC /* Signature */ \
+ 1 /* Version */ \
+ + 1 /* Tree type */ \
+ H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \
)
@@ -78,7 +79,6 @@
H5B2_METADATA_PREFIX_SIZE \
\
/* Header specific fields */ \
- + 1 /* Tree type */ \
+ 4 /* Node size, in bytes */ \
+ 2 /* Record size, in bytes */ \
+ 2 /* Depth of tree */ \