summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-07-20 02:32:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-07-20 02:32:47 (GMT)
commitd08619bfe1a3cbc593bdaae5a5bd393e1d33f150 (patch)
tree57ec6ef4e2167462f2a10b5739b0f79f2299584d /src/H5SM.c
parent90497050b818e914ab814e40811b1c0ff98384ea (diff)
downloadhdf5-d08619bfe1a3cbc593bdaae5a5bd393e1d33f150.zip
hdf5-d08619bfe1a3cbc593bdaae5a5bd393e1d33f150.tar.gz
hdf5-d08619bfe1a3cbc593bdaae5a5bd393e1d33f150.tar.bz2
[svn-r15388] Description:
Convert object header cache client to use the new metadata journaling cache, which included adding a new client for handling continuation chunks. Added "real" protect calls around modifying chunks in object headers. Switched a few more metadata cache library API routines to drop the file pointer, when it is not needed (pinning/unpinning entries, etc.) Fixed bug in journaling cache handling of 'image_len' callbacks and also changed cache to retry deserializing entries when the entry's size is larger than the speculative size initially tried. Retrying for 'image_len' callbacks has problems with the 'multi' VFD, so the h5dump and FORTRAN 'multi' tests are commented out, until the changes to the 'multi' VFD from the file free space branch are brought back into the trunk. Currently, the 'h5recover' tool has a bug which requires it to be run twice before replaying the journal "sticks". However, this is from an earlier checkin, since the code in the branch already has this behavior... :-( Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.4 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5SM.c')
-rwxr-xr-xsrc/H5SM.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 9607f23..fe401e9 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -25,7 +25,6 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
@@ -1582,8 +1581,6 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
H5HF_t *fheap = NULL; /* Fractal heap that contains the message */
size_t buf_size; /* Size of the encoded message (out) */
void *encoding_buf = NULL; /* The encoded message (out) */
- H5O_loc_t oloc; /* Object location for message in object header */
- H5O_t *oh = NULL; /* Object header for message in object header */
unsigned type_id; /* Message type to operate on */
herr_t ret_value = SUCCEED;
@@ -1716,15 +1713,6 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
} /* end if */
done:
- /* Unprotect & close the object header if we opened one */
- if(oh && oh != open_oh) {
- if(H5AC_unprotect(oloc.file, dxpl_id, H5AC_OHDR, oloc.addr, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
-
- if(H5O_close(&oloc) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object header")
- } /* end if */
-
/* Release the SOHM list */
if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index")
@@ -2257,8 +2245,8 @@ H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap,
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to open object header")
/* Load the object header from the cache */
- if(NULL == (oh = H5AC_protect(oloc.file, dxpl_id, H5AC_OHDR, oloc.addr, NULL, NULL, H5AC_READ)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header")
+ if(NULL == (oh = H5O_protect(&oloc, dxpl_id, H5AC2_READ)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
} /* end if */
else
oh = open_oh;
@@ -2286,8 +2274,8 @@ H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap,
done:
/* Close the object header if we opened one and had an error */
if(oh && oh != open_oh) {
- if(H5AC_unprotect(oloc.file, dxpl_id, H5AC_OHDR, oloc.addr, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ if(oh && H5O_unprotect(&oloc, dxpl_id, oh, H5AC2__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(H5O_close(&oloc) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object header")