summaryrefslogtreecommitdiffstats
path: root/src/H5HFiter.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
commit5a7ef381b26985886a88ad88b2afda703b578d24 (patch)
tree55b1938c7711683b77c10dfd296c5e518437f4eb /src/H5HFiter.c
parentc83c6dd945d44cdf9de44087c4063876ab378ac1 (diff)
downloadhdf5-5a7ef381b26985886a88ad88b2afda703b578d24.zip
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.gz
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.bz2
[svn-r12598] Description:
- Migrate "direct block location" routine from H5HFman.c to H5HFdblock.c, which is a more appropriate location - Optimize performance of heap code by taking advantage of pinned indirect blocks and use them without putting a metadata cache protect/unprotect pair around them. - Other minor compiler warning cleanups and optimizations... Tested On: FreeBSD/32 4.11 (sleipnir) Linux/64 2.4 (mir) Solaris/64 2.9 (shanti)
Diffstat (limited to 'src/H5HFiter.c')
-rw-r--r--src/H5HFiter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index 94f0b8b..25e1d67 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -169,6 +169,8 @@ HDfprintf(stderr, "%s: offset = %Hu\n", FUNC, offset);
*/
do {
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
+
/* Walk down the rows in the doubling table until we've found the correct row for the next block */
for(row = 0; row < hdr->man_dtable.max_root_rows; row++)
if((offset >= hdr->man_dtable.row_block_off[row]) &&
@@ -224,7 +226,7 @@ HDfprintf(stderr, "%s: biter->curr->entry = %u\n", FUNC, biter->curr->entry);
} /* end else */
/* Load indirect block for this context location */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, H5AC_WRITE)))
+ if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, FALSE, H5AC_WRITE, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Make indirect block the context for the current location */
@@ -235,7 +237,7 @@ HDfprintf(stderr, "%s: biter->curr->entry = %u\n", FUNC, biter->curr->entry);
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Release the current indirect block */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, iblock_addr, iblock, H5AC__NO_FLAGS_SET) < 0)
+ if(H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
iblock = NULL;