summaryrefslogtreecommitdiffstats
path: root/src/H5HFcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-22 17:50:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-22 17:50:25 (GMT)
commit5c5f9e8e28dc7665051b10494a7133d331f673f5 (patch)
tree63d21cc2d4bfac7b7efa843c8563f2da5ce4f75e /src/H5HFcache.c
parentc2c6e2d0d5f4bfe8c7d31711a09b0bc1cdcd267f (diff)
downloadhdf5-5c5f9e8e28dc7665051b10494a7133d331f673f5.zip
hdf5-5c5f9e8e28dc7665051b10494a7133d331f673f5.tar.gz
hdf5-5c5f9e8e28dc7665051b10494a7133d331f673f5.tar.bz2
[svn-r12612] Description:
Provide more abstract internal routine for computing checksums on metadata in a file. This will allow a unified policy on which algorithm to choose and under what criteria (length probably) to be more easily maintained. Tested On: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5HFcache.c')
-rw-r--r--src/H5HFcache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index ddf8e0c..5da8197 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -396,7 +396,7 @@ HDfprintf(stderr, "%s: Load heap header, addr = %a\n", FUNC, addr);
/* Compute checksum on entire header */
/* (including the filter information, if present) */
- computed_chksum = H5_fletcher32(buf, (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
+ computed_chksum = H5_checksum_metadata(buf, (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
/* Verify checksum */
if(stored_chksum != computed_chksum)
@@ -525,7 +525,7 @@ HDfprintf(stderr, "%s: Flushing heap header, addr = %a, destroy = %u\n", FUNC, a
} /* end if */
/* Compute metadata checksum */
- metadata_chksum = H5_fletcher32(buf, hdr->heap_size - H5HF_SIZEOF_CHKSUM);
+ metadata_chksum = H5_checksum_metadata(buf, hdr->heap_size - H5HF_SIZEOF_CHKSUM);
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
@@ -826,7 +826,7 @@ HDfprintf(stderr, "%s: iblock->ents[%Zu] = {%a}\n", FUNC, u, iblock->ents[u].add
HDassert((size_t)(p - buf) == iblock->size);
/* Compute checksum on indirect block */
- computed_chksum = H5_fletcher32(buf, (iblock->size - H5HF_SIZEOF_CHKSUM));
+ computed_chksum = H5_checksum_metadata(buf, (iblock->size - H5HF_SIZEOF_CHKSUM));
/* Verify checksum */
if(stored_chksum != computed_chksum)
@@ -973,7 +973,7 @@ HDfprintf(stderr, "%s: iblock->filt_ents[%Zu] = {%Zu, %x}\n", FUNC, u, iblock->f
} /* end for */
/* Compute checksum */
- metadata_chksum = H5_fletcher32(buf, iblock->size - H5HF_SIZEOF_CHKSUM);
+ metadata_chksum = H5_checksum_metadata(buf, iblock->size - H5HF_SIZEOF_CHKSUM);
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);
@@ -1235,7 +1235,7 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, NULL, "I/O filters not supported yet")
HDmemset((uint8_t *)p - H5HF_SIZEOF_CHKSUM, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
- computed_chksum = H5_fletcher32(dblock->blk, dblock->size);
+ computed_chksum = H5_checksum_metadata(dblock->blk, dblock->size);
/* Verify checksum */
if(stored_chksum != computed_chksum)
@@ -1314,7 +1314,7 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
HDmemset(p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
- metadata_chksum = H5_fletcher32(dblock->blk, dblock->size);
+ metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size);
/* Metadata checksum */
UINT32ENCODE(p, metadata_chksum);