summaryrefslogtreecommitdiffstats
path: root/src/H5Omdj_msg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-04-05 03:21:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-04-05 03:21:41 (GMT)
commit1c425ac9d2dead1c028370a068ac7add6634ed85 (patch)
tree6c10d9fb596929e980714f6aa571fb40a95a56ad /src/H5Omdj_msg.c
parente023ad625fbfa97ed0cfcd05861f626e55b4b262 (diff)
downloadhdf5-1c425ac9d2dead1c028370a068ac7add6634ed85.zip
hdf5-1c425ac9d2dead1c028370a068ac7add6634ed85.tar.gz
hdf5-1c425ac9d2dead1c028370a068ac7add6634ed85.tar.bz2
[svn-r14796] Description:
Switch v1 B-tree nodes from using previous cache to use the new journaling cache code. This is a major switch for the cache callbacks. Switched the metadata caching code from having a pointer to the file it's in to receiving a pointer to the file, when needed. This was necessary in order to avoid crashing when two files IDs were open on the same underlying file and one of those files was closed with cache entries using the file pointers. Also took out the check in the caching code for reading off the end of the file, which didn't play nicely with the multi-file VFD. Switching the cache from having a pointer internally to requiring one externally meant tweaking almost all the test code. :-/ Added correct exit codes to cache2 tests that didn't have them already, so the 'make check' will stop when they fail. Use the path to the h5diff in this build in the tools/h5recover testing script, since we can't guarantee a user has HDF5 already installed. Assorted minor tweaks to get everything to compile more cleanly and pass all the tests (on my Mac :-). Tested on: Mac OS X (10.5.2) w/C++ (more testing coming up shortly, I just didn't have my "rsync testbed" set up for this branch when I started making changes to the code)
Diffstat (limited to 'src/H5Omdj_msg.c')
-rw-r--r--src/H5Omdj_msg.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/H5Omdj_msg.c b/src/H5Omdj_msg.c
index 0f8115b..b95e843 100644
--- a/src/H5Omdj_msg.c
+++ b/src/H5Omdj_msg.c
@@ -124,7 +124,6 @@ H5O_mdj_msg_decode(H5F_t *f,
unsigned UNUSED mesg_flags,
const uint8_t *p)
{
- const char * fcn_name = "H5O_mdj_msg_decode()";
uint16_t flags = 0; /* packed boolean fields */
H5O_mdj_msg_t *mesg; /* Native message */
void *ret_value; /* Return value */
@@ -260,7 +259,6 @@ done:
static void *
H5O_mdj_msg_copy(const void *_mesg, void *_dest)
{
- const char * fcn_name = "H5O_mdj_msg_copy()";
const H5O_mdj_msg_t *mesg = (const H5O_mdj_msg_t *)_mesg;
H5O_mdj_msg_t *dest = (H5O_mdj_msg_t *)_dest;
void *ret_value;
@@ -312,9 +310,7 @@ H5O_mdj_msg_size(const H5F_t *f,
hbool_t UNUSED disable_shared,
const void *_mesg)
{
- const char * fcn_name = "H5O_mdj_msg_size()";
const H5O_mdj_msg_t * mesg = (const H5O_mdj_msg_t *)_mesg;
- size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mdj_msg_size)
@@ -322,12 +318,7 @@ H5O_mdj_msg_size(const H5F_t *f,
HDassert(f);
HDassert(mesg);
- ret_value = MDJ_MSG_LEN(f);
-
-done:
-
- FUNC_LEAVE_NOAPI(ret_value)
-
+ FUNC_LEAVE_NOAPI(MDJ_MSG_LEN(f))
} /* end H5O_mdj_msg_size() */
@@ -350,23 +341,19 @@ done:
static herr_t
H5O_mdj_msg_reset(void *_mesg)
{
- const char * fcn_name = "H5O_mdj_msg_reset()";
H5O_mdj_msg_t *mesg = (H5O_mdj_msg_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mdj_msg_reset);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mdj_msg_reset)
/* check args */
- assert(mesg);
+ HDassert(mesg);
/* reset */
mesg->mdc_jrnl_enabled = FALSE;
mesg->mdc_jrnl_block_loc = HADDR_UNDEF;
mesg->mdc_jrnl_block_len = 0;
-done:
-
- FUNC_LEAVE_NOAPI(SUCCEED);
-
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O_mdj_msg_reset() */
@@ -391,7 +378,6 @@ H5O_mdj_msg_debug(H5F_t UNUSED *f,
int indent,
int fwidth)
{
- const char * fcn_name = "H5O_mdj_msg_debug()";
const H5O_mdj_msg_t *mesg = (const H5O_mdj_msg_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mdj_msg_debug)
@@ -415,9 +401,6 @@ H5O_mdj_msg_debug(H5F_t UNUSED *f,
"mdc_jrnl_block_len:",
(int)(mesg->mdc_jrnl_block_len));
-done:
-
FUNC_LEAVE_NOAPI(SUCCEED)
-
} /* end H5O_mdj_msg_debug() */