summaryrefslogtreecommitdiffstats
path: root/src/H5Odbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-15 20:30:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-15 20:30:48 (GMT)
commit80d5ae2fc16e800fbc30008d7771408a40cfdcbf (patch)
tree8345fd40909d129b14146a027684db235cd28988 /src/H5Odbg.c
parent4fa6fd807dddf42e14d2c4c1c40caf11674bb849 (diff)
downloadhdf5-80d5ae2fc16e800fbc30008d7771408a40cfdcbf.zip
hdf5-80d5ae2fc16e800fbc30008d7771408a40cfdcbf.tar.gz
hdf5-80d5ae2fc16e800fbc30008d7771408a40cfdcbf.tar.bz2
[svn-r18574] Description:
Bring r18571 from trunk to 1.8 branch: Bring r18542 from metadata journaling "merging" branch to trunk: Bring new object header pin/unpin & protect/unprotect routines and split-out object header chunk proxy changes from metadata_journaling branch to "merging" branch, along with some other minor tweaks to clean up compiler warnings, etc. Also: clean up chunk protect/unprotect calls when allocating or freeing space in a chunk, optimize metadata accumulator code to avoid some re-reading of information from the file, refactor H5O_pin/H5O_unpin from way they are done on the merging branch back to way they were previously done on trunk, other minor code cleanups, etc. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode (h5committested on trunk)
Diffstat (limited to 'src/H5Odbg.c')
-rw-r--r--src/H5Odbg.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 9285f4b..8661cfe 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -377,10 +377,6 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
- HDfprintf(stream, "%*s%-*s %t\n", indent + 3, "", MAX(0, fwidth - 3),
- "Dirty:",
- oh->chunk[i].dirty);
-
HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
"Address:",
oh->chunk[i].addr);
@@ -538,6 +534,7 @@ herr_t
H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
H5O_t *oh = NULL; /* Object header to display */
+ H5O_loc_t loc; /* Object location for object to delete */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_debug, FAIL)
@@ -549,14 +546,19 @@ H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- if(NULL == (oh = (H5O_t *)H5AC_protect(f, dxpl_id, H5AC_OHDR, addr, NULL, NULL, H5AC_READ)))
+ /* Set up the object location */
+ loc.file = f;
+ loc.addr = addr;
+ loc.holding_file = FALSE;
+
+ if(NULL == (oh = H5O_protect(&loc, dxpl_id, H5AC_READ)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* debug */
H5O_debug_real(f, dxpl_id, oh, addr, stream, indent, fwidth);
done:
- if(oh && H5AC_unprotect(f, dxpl_id, H5AC_OHDR, addr, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(&loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)