diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-08-22 20:03:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-08-22 20:03:21 (GMT) |
commit | 618fd1f98d13e5379738e656e9badac6585693a9 (patch) | |
tree | 5b3f3a1a3588acecc722b948ff57a504ca1add38 /src/H5B2pkg.h | |
parent | 06ae330cd842f7e8cf573cbde5917fc42d93beb0 (diff) | |
download | hdf5-618fd1f98d13e5379738e656e9badac6585693a9.zip hdf5-618fd1f98d13e5379738e656e9badac6585693a9.tar.gz hdf5-618fd1f98d13e5379738e656e9badac6585693a9.tar.bz2 |
[svn-r12615] Description:
Add checksum to v2 B-tree metadata.
Tested On:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5B2pkg.h')
-rw-r--r-- | src/H5B2pkg.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index 5a27494..1ab7129 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -53,17 +53,30 @@ /* Size of a "node pointer" (on disk) */ #define H5B2_NODE_POINTER_SIZE(f) (H5F_SIZEOF_ADDR(f)+H5B2_SIZEOF_RECORDS_PER_NODE+H5F_SIZEOF_SIZE(f)) +/* Size of checksum information (on disk) */ +#define H5B2_SIZEOF_CHKSUM 4 + +/* Format overhead for all v2 B-tree metadata in the file */ +#define H5B2_METADATA_PREFIX_SIZE ( \ + H5B2_SIZEOF_MAGIC /* Signature */ \ + + 1 /* Version */ \ + + H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \ + ) + /* Size of the B-tree header on disk */ #define H5B2_HEADER_SIZE(f) ( \ - 4 /* Signature */ \ - + 1 /* Version */ \ + /* General metadata fields */ \ + H5B2_METADATA_PREFIX_SIZE \ + \ + /* Header specific fields */ \ + 1 /* Tree type */ \ + 4 /* Node size, in bytes */ \ + 2 /* Key size, in bytes */ \ + 2 /* Depth of tree */ \ + 2 /* Split % of full (as integer, ie. "98" means 98%) */ \ + 2 /* Merge % of full (as integer, ie. "98" means 98%) */ \ - + H5B2_NODE_POINTER_SIZE(f)) /* Node pointer to root node in tree */ + + H5B2_NODE_POINTER_SIZE(f) /* Node pointer to root node in tree */ \ + ) /* Macro to retrieve pointer to i'th native record for native record buffer */ #define H5B2_NAT_NREC(b,shared,idx) (b+(shared)->nat_off[(idx)]) |