summaryrefslogtreecommitdiffstats
path: root/src/H5C2journal.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/H5C2journal.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/H5C2journal.c')
-rw-r--r--src/H5C2journal.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/H5C2journal.c b/src/H5C2journal.c
index 8470add..84d9260 100644
--- a/src/H5C2journal.c
+++ b/src/H5C2journal.c
@@ -309,6 +309,16 @@ H5C2_end_journaling(H5F_t * f,
HDassert( cache_ptr->mdj_enabled );
+ /* Turn off journaling now, before attempting to modify the superblock
+ * extension (which is really an object header) and having the
+ * object header code call into the cache, which gets confused
+ * because there's no transaction in progress. -QAK
+ */
+ cache_ptr->mdj_enabled = FALSE;
+
+ /* Remove the journal configuration information from the superblock
+ * extension.
+ */
result = H5C2_unmark_journaling_in_progress(f, dxpl_id, cache_ptr);
if ( result < 0 ) {
@@ -324,8 +334,6 @@ H5C2_end_journaling(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \
"H5C2_jb__takedown() failed.")
}
-
- cache_ptr->mdj_enabled = FALSE;
}
done:
@@ -975,7 +983,7 @@ H5C2_journal_transaction(H5F_t * f,
*/
if ( ( ! resized ) && ( ! renamed ) ) {
- if(HADDR_UNDEF==(eoa = H5FDget_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
+ if(HADDR_UNDEF == (eoa = H5FDget_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, \
"file get eoa request failed")
@@ -1622,8 +1630,7 @@ H5C2_load_journal_config_block(const H5F_t * f,
p += H5C2__JOURNAL_MAGIC_LEN;
/* get the version of the config block */
- HDmemcpy(&version, p, 1);
- p++;
+ version = *p++;
if ( version != H5C2__JOURNAL_CONF_VERSION ) {
@@ -1901,22 +1908,6 @@ H5C2_unmark_journaling_in_progress(H5F_t * f,
/* Finally, flush the file to ensure that changes made it to disk. */
- /* Quincey: Two issues here:
- *
- * First, there is the simple matter of using H5Fflush().
- * Given the curent plans for implementing beging/end
- * transaction, we have the problem of a flush triggering
- * a transaction here -- not what we want. We could get
- * around this by calling H5F_flush(), but presently that
- * function is local to H5F.c
- *
- * Second, there is the matter of the scope parameter:
- * At present, I am passing H5F_SCOPE_GLOBAL here -- is
- * this appropriate? I guess this comes down to how we
- * are going to handle journaling in the case of multiple
- * files -- a point we haven't discussed. We should do so.
- */
-
#if 0 /* JRM */
HDfprintf(stdout, "%s: calling H5F_flush().\n", FUNC);
HDfflush(stdout);