diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-05-27 22:12:43 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-05-27 22:12:43 (GMT) |
commit | b1cf507c6d8ff53f4f9e474fa5878360562b3a1d (patch) | |
tree | 4fd757508145c9b969c717f2843ec5d6957df071 /src/H5B2cache.c | |
parent | 244784ab2cf816b135f27bf03b5a4fb91502aed9 (diff) | |
parent | ae82b5232a98e170c74118fe3ddab4b525d89fe9 (diff) | |
download | hdf5-b1cf507c6d8ff53f4f9e474fa5878360562b3a1d.zip hdf5-b1cf507c6d8ff53f4f9e474fa5878360562b3a1d.tar.gz hdf5-b1cf507c6d8ff53f4f9e474fa5878360562b3a1d.tar.bz2 |
[svn-r27116] svn merge -r26937:27115 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 1e2a6a3..9e01c03 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -173,7 +173,7 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) HDassert(udata); /* Allocate new B-tree header and reset cache info */ - if(NULL == (hdr = H5B2_hdr_alloc(udata->f))) + if(NULL == (hdr = H5B2__hdr_alloc(udata->f))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header") /* Wrap the local buffer for serialized header info */ @@ -238,7 +238,7 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Initialize B-tree header info */ cparam.cls = H5B2_client_class_g[id]; - if(H5B2_hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0) + if(H5B2__hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info") /* Set the B-tree header's address */ @@ -252,7 +252,7 @@ done: if(wb && H5WB_unwrap(wb) < 0) HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer") if(!ret_value && hdr) - if(H5B2_hdr_free(hdr) < 0) + if(H5B2__hdr_free(hdr) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header") FUNC_LEAVE_NOAPI(ret_value) @@ -282,7 +282,7 @@ H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, FUNC_ENTER_STATIC - /* check arguments */ + /* Check arguments */ HDassert(f); HDassert(H5F_addr_defined(addr)); HDassert(hdr); @@ -399,7 +399,7 @@ H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) } /* end if */ /* Release B-tree header info */ - if(H5B2_hdr_free(hdr) < 0) + if(H5B2__hdr_free(hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header info") done: @@ -464,7 +464,7 @@ H5B2__cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ { FUNC_ENTER_STATIC_NOERR - /* check arguments */ + /* Check arguments */ HDassert(f); HDassert(hdr); HDassert(size_ptr); @@ -519,7 +519,7 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) udata->hdr->f = f; /* Increment ref. count on B-tree header */ - if(H5B2_hdr_incr(udata->hdr) < 0) + if(H5B2__hdr_incr(udata->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") /* Share B-tree information */ @@ -601,7 +601,7 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) done: if(!ret_value && internal) - if(H5B2_internal_free(internal) < 0) + if(H5B2__internal_free(internal) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node") FUNC_LEAVE_NOAPI(ret_value) @@ -628,7 +628,7 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add FUNC_ENTER_STATIC - /* check arguments */ + /* Check arguments */ HDassert(f); HDassert(H5F_addr_defined(addr)); HDassert(internal); @@ -742,7 +742,7 @@ H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) } /* end if */ /* Release v2 b-tree internal node */ - if(H5B2_internal_free(internal) < 0) + if(H5B2__internal_free(internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node") done: @@ -807,7 +807,7 @@ H5B2__cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal { FUNC_ENTER_STATIC_NOERR - /* check arguments */ + /* Check arguments */ HDassert(internal); HDassert(internal->hdr); HDassert(size_ptr); @@ -854,14 +854,14 @@ H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata /* Allocate new leaf node and reset cache info */ if(NULL == (leaf = H5FL_MALLOC(H5B2_leaf_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed") HDmemset(&leaf->cache_info, 0, sizeof(H5AC_info_t)); /* Set the B-tree header's file context for this operation */ udata->hdr->f = udata->f; /* Increment ref. count on B-tree header */ - if(H5B2_hdr_incr(udata->hdr) < 0) + if(H5B2__hdr_incr(udata->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") /* Share B-tree header information */ @@ -875,12 +875,12 @@ H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata /* Magic number */ if(HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree leaf node signature") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature") p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_LEAF_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree leaf node version") + HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree leaf node version") /* B-tree type */ if(*p++ != (uint8_t)udata->hdr->cls->id) @@ -888,7 +888,7 @@ H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata /* Allocate space for the native keys in memory */ if(NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[0].nat_rec_fac))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree leaf native keys") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree leaf native keys") /* Set the number of records in the leaf */ leaf->nrec = udata->nrec; @@ -905,7 +905,7 @@ H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata native += udata->hdr->cls->nrec_size; } /* end for */ - /* Compute checksum on internal node */ + /* Compute checksum on leaf node */ computed_chksum = H5_checksum_metadata(udata->hdr->page, (size_t)(p - (const uint8_t *)udata->hdr->page), 0); /* Metadata checksum */ @@ -923,7 +923,7 @@ H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata done: if(!ret_value && leaf) - if(H5B2_leaf_free(leaf) < 0) + if(H5B2__leaf_free(leaf) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node") FUNC_LEAVE_NOAPI(ret_value) @@ -950,7 +950,7 @@ H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H FUNC_ENTER_STATIC - /* check arguments */ + /* Check arguments */ HDassert(f); HDassert(H5F_addr_defined(addr)); HDassert(leaf); @@ -1050,7 +1050,7 @@ H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) } /* end if */ /* Destroy v2 b-tree leaf node */ - if(H5B2_leaf_free(leaf) < 0) + if(H5B2__leaf_free(leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: |