diff options
author | John Mainzer <mainzer@hdfgroup.org> | 2008-10-03 06:50:54 (GMT) |
---|---|---|
committer | John Mainzer <mainzer@hdfgroup.org> | 2008-10-03 06:50:54 (GMT) |
commit | 648d6ac066ed4f75e168f7a4946fb62d0da6d400 (patch) | |
tree | dfe57c4556e6ced61264cdb00f731ac2edcbbb77 /src/H5HFman.c | |
parent | d3f252466cddf196075b31c442fe1aed611b6ca8 (diff) | |
download | hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.zip hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.tar.gz hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.tar.bz2 |
[svn-r15763] Converted the fractal heap direct block cache client to use the
revised cache.
Note that this conversion is not as efficient as it should be. Specifically,
it does it more memcpy's between the metadata cache's on disk image of the
direct block and the fractal heap's on disk image of the direct block than
is absolutely essential. Eventually, we will want to fix this -- probably
by allowing the metadata cache and the fractal heap direct block to share
a common on disk image of the direct block. However, this will require
extensions to the client / metadata cache interface, and some reworking of
the fractal heap as well.
This checkin also includes Mike M's fix to the Linew specific bug mentioned
in my checkin of 22 Aug 2008.
Tested on Phoenix (serial debug and production),
Kagiso (parallel), and
Linew (serial)
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index ddf2504..1d7fa71 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -168,7 +168,7 @@ HDfprintf(stderr, "%s: sec_node->u.single.par_entry = %u\n", FUNC, sec_node->u.s #endif /* QAK */ /* Lock direct block */ - if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC_WRITE))) + if(NULL == (dblock = H5HF_man_dblock_protect(hdr, dxpl_id, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC2_WRITE))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block") /* Insert object into block */ @@ -224,7 +224,7 @@ HDfprintf(stderr, "%s: obj_off = %Hu, obj_len = %Zu\n", FUNC, (dblock->block_off done: /* Release the direct block (marked as dirty) */ - if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__DIRTIED_FLAG) < 0) + if(dblock && H5AC2_unprotect(hdr->f, dxpl_id, H5AC2_FHEAP_DBLOCK, dblock_addr, (size_t)0, dblock, H5AC2__DIRTIED_FLAG) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block") FUNC_LEAVE_NOAPI(ret_value) @@ -250,7 +250,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data, unsigned op_flags) { H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */ - H5AC_protect_t dblock_access; /* Access method for direct block */ + H5AC2_protect_t dblock_access; /* Access method for direct block */ haddr_t dblock_addr; /* Direct block address */ size_t dblock_size; /* Direct block size */ unsigned dblock_cache_flags; /* Flags for unprotecting direct block */ @@ -270,12 +270,12 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, /* Set the access mode for the direct block */ if(op_flags & H5HF_OP_MODIFY) { - dblock_access = H5AC_WRITE; - dblock_cache_flags = H5AC__DIRTIED_FLAG; + dblock_access = H5AC2_WRITE; + dblock_cache_flags = H5AC2__DIRTIED_FLAG; } /* end if */ else { - dblock_access = H5AC_READ; - dblock_cache_flags = H5AC__NO_FLAGS_SET; + dblock_access = H5AC2_READ; + dblock_cache_flags = H5AC2__NO_FLAGS_SET; } /* end else */ /* Skip over the flag byte */ @@ -319,7 +319,7 @@ HDfprintf(stderr, "%s: hdr->man_dtable.cparam.max_direct_size = %Zu\n", FUNC, hd unsigned entry; /* Entry of block */ /* Look up indirect block containing direct block */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC_READ) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &entry, &did_protect, H5AC2_READ) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") #ifdef QAK HDfprintf(stderr, "%s: entry address = %a\n", FUNC, iblock->ents[entry].addr); @@ -377,7 +377,7 @@ HDfprintf(stderr, "%s: dblock_addr = %a, dblock_size = %Zu\n", FUNC, dblock_addr done: /* Unlock direct block */ - if(dblock && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, dblock_cache_flags) < 0) + if(dblock && H5AC2_unprotect(hdr->f, dxpl_id, H5AC2_FHEAP_DBLOCK, dblock_addr, (size_t)0, dblock, dblock_cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block") FUNC_LEAVE_NOAPI(ret_value) @@ -570,7 +570,7 @@ HDfprintf(stderr, "%s: direct root block\n", FUNC); HDfprintf(stderr, "%s: indirect root block\n", FUNC); #endif /* QAK */ /* Look up indirect block containing direct block */ - if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC_WRITE) < 0) + if(H5HF_man_dblock_locate(hdr, dxpl_id, obj_off, &iblock, &dblock_entry, &did_protect, H5AC2_WRITE) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") #ifdef QAK HDfprintf(stderr, "%s: entry address = %a\n", FUNC, iblock->ents[dblock_entry].addr); |