diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 22:57:29 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 22:57:29 (GMT) |
commit | e4246519c9d59a5f837f2b1009471533b729b778 (patch) | |
tree | 0ed23bfb58157edccfa11487a6c9f293b9e97670 /src/H5B2hdr.c | |
parent | fc3de1ec794584b1bdc6e615d8d2afc15f5bb5ec (diff) | |
download | hdf5-e4246519c9d59a5f837f2b1009471533b729b778.zip hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.gz hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.bz2 |
[svn-r18920] Description:
Bring r18917 from trunk to 1.8 branch:
Bring r18911 (plus some adaptions to match the code on the trunk)
from the metadata journaling "merging" branch to the trunk:
More general changes to align trunk with eventual changes from
metadata journaling branch.
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
Diffstat (limited to 'src/H5B2hdr.c')
-rw-r--r-- | src/H5B2hdr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index cbbfed6..94e2c54 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -107,8 +107,8 @@ H5FL_SEQ_DEFINE(H5B2_node_info_t); *------------------------------------------------------------------------- */ herr_t -H5B2_hdr_init(H5F_t *f, H5B2_hdr_t *hdr, const H5B2_create_t *cparam, - void *ctx_udata, uint16_t depth) +H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, + uint16_t depth) { size_t sz_max_nrec; /* Temporary variable for range checking */ unsigned u_max_nrec_size; /* Temporary variable for range checking */ @@ -120,7 +120,6 @@ H5B2_hdr_init(H5F_t *f, H5B2_hdr_t *hdr, const H5B2_create_t *cparam, /* * Check arguments. */ - HDassert(f); HDassert(hdr); HDassert(cparam); HDassert(cparam->cls); @@ -133,7 +132,6 @@ H5B2_hdr_init(H5F_t *f, H5B2_hdr_t *hdr, const H5B2_create_t *cparam, HDassert(cparam->merge_percent < (cparam->split_percent / 2)); /* Initialize basic information */ - hdr->f = f; hdr->rc = 0; hdr->pending_delete = FALSE; @@ -258,6 +256,7 @@ H5B2_hdr_alloc(H5F_t *f) hdr->f = f; hdr->sizeof_addr = H5F_SIZEOF_ADDR(f); hdr->sizeof_size = H5F_SIZEOF_SIZE(f); + hdr->hdr_size = H5B2_HEADER_SIZE(hdr); hdr->root.addr = HADDR_UNDEF; /* Set return value */ @@ -302,11 +301,11 @@ H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed for B-tree header") /* Initialize shared B-tree info */ - if(H5B2_hdr_init(f, hdr, cparam, ctx_udata, (uint16_t)0) < 0) + if(H5B2_hdr_init(hdr, cparam, ctx_udata, (uint16_t)0) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, HADDR_UNDEF, "can't create shared B-tree info") /* Allocate space for the header on disk */ - if(HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)H5B2_HEADER_SIZE(hdr)))) + if(HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->hdr_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header") /* Cache the new B-tree node */ |