summaryrefslogtreecommitdiffstats
path: root/src/H5Bprivate.h
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/H5Bprivate.h
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/H5Bprivate.h')
-rw-r--r--src/H5Bprivate.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index 4dfea84..ef2a159 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -33,7 +33,6 @@
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5RCprivate.h" /* Reference counted object functions */
@@ -73,9 +72,6 @@ typedef enum H5B_ins_t {
typedef int (*H5B_operator_t)(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-/* Typedef for B-tree in memory (defined in H5Bpkg.h) */
-typedef struct H5B_t H5B_t;
-
/* Each B-tree has certain information that can be shared across all
* the instances of nodes in that B-tree.
*/
@@ -85,6 +81,8 @@ typedef struct H5B_shared_t {
size_t sizeof_rkey; /* Size of raw (disk) key */
size_t sizeof_rnode; /* Size of raw (disk) node */
size_t sizeof_keys; /* Size of native (memory) key node */
+ size_t sizeof_addr; /* Size of file address (in bytes) */
+ size_t sizeof_len; /* Size of file lengths (in bytes) */
uint8_t *page; /* Disk page */
size_t *nkey; /* Offsets of each native key in native key buffer */
} H5B_shared_t;
@@ -119,8 +117,8 @@ typedef struct H5B_class_t {
hbool_t*);
/* encode, decode, debug key values */
- herr_t (*decode)(const H5F_t*, const struct H5B_t*, const uint8_t*, void*);
- herr_t (*encode)(const H5F_t*, const struct H5B_t*, uint8_t*, void*);
+ herr_t (*decode)(const H5B_shared_t*, const uint8_t*, void*);
+ herr_t (*encode)(const H5B_shared_t*, uint8_t*, const void*);
herr_t (*debug_key)(FILE*, H5F_t*, hid_t, int, int, const void*, const void*);
} H5B_class_t;