summaryrefslogtreecommitdiffstats
path: root/src/H5B2pkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
commit74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch)
treed0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /src/H5B2pkg.h
parent4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff)
downloadhdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2
[svn-r18702] Description:
Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5B2pkg.h')
-rw-r--r--src/H5B2pkg.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index f2f4e61..35c2eb1 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -207,12 +207,26 @@ struct H5B2_t {
H5F_t *f; /* Pointer to file for v2 B-tree */
};
-/* User data for metadata cache 'load' callback */
-typedef struct {
- H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
- uint16_t nrec; /* Number of records in node to load */
- uint16_t depth; /* Depth of node to load */
-} H5B2_int_load_ud1_t;
+/* Callback info for loading a free space header into the cache */
+typedef struct H5B2_hdr_cache_ud_t {
+ H5F_t *f; /* File that v2 b-tree header is within */
+ void *ctx_udata; /* User-data for protecting */
+} H5B2_hdr_cache_ud_t;
+
+/* Callback info for loading a free space internal node into the cache */
+typedef struct H5B2_internal_cache_ud_t {
+ H5F_t *f; /* File that v2 b-tree header is within */
+ H5B2_hdr_t *hdr; /* v2 B-tree header */
+ unsigned nrec; /* Number of records in node to load */
+ unsigned depth; /* Depth of node to load */
+} H5B2_internal_cache_ud_t;
+
+/* Callback info for loading a free space leaf node into the cache */
+typedef struct H5B2_leaf_cache_ud_t {
+ H5F_t *f; /* File that v2 b-tree header is within */
+ H5B2_hdr_t *hdr; /* v2 B-tree header */
+ unsigned nrec; /* Number of records in node to load */
+} H5B2_leaf_cache_ud_t;
#ifdef H5B2_TESTING
/* Node information for testing */
@@ -268,6 +282,10 @@ H5_DLL size_t H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2_hdr_dirty(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id);
+/* Routines for operating on leaf nodes */
+H5B2_leaf_t *H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
+ unsigned nrec, H5AC_protect_t rw);
+
/* Routines for operating on internal nodes */
H5_DLL H5B2_internal_t *H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
haddr_t addr, unsigned nrec, unsigned depth, H5AC_protect_t rw);