diff options
Diffstat (limited to 'src/H5MFaggr.c')
-rw-r--r-- | src/H5MFaggr.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index 0b1bc91..89412cd 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -227,7 +227,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) { if(H5FD_free(f->shared->lf, dxpl_id, other_alloc_type, f, other_aggr->addr, other_aggr->size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") other_aggr->addr = 0; other_aggr->tot_size = 0; @@ -236,7 +236,7 @@ HDfprintf(stderr, "%s: aggr = {%a, %Hu, %Hu}\n", FUNC, aggr->addr, aggr->tot_siz /* Allocate space from the VFD (i.e. at the end of the file) */ if(HADDR_UNDEF == (ret_value = H5FD_alloc(f->shared->lf, dxpl_id, type, f, size, &eoa_frag_addr, &eoa_frag_size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block") } /* end else */ } /* end if */ else { @@ -271,7 +271,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) { if(H5FD_free(f->shared->lf, dxpl_id, other_alloc_type, f, other_aggr->addr, other_aggr->size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") other_aggr->addr = 0; other_aggr->tot_size = 0; other_aggr->size = 0; @@ -279,12 +279,12 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); /* Allocate space from the VFD (i.e. at the end of the file) */ if(HADDR_UNDEF == (new_space = H5FD_alloc(f->shared->lf, dxpl_id, alloc_type, f, aggr->alloc_size, &eoa_frag_addr, &eoa_frag_size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate aggregation block") /* Return the unused portion of the block to a free list */ if(aggr->size > 0) if(H5MF_xfree(f, alloc_type, dxpl_id, aggr->addr, aggr->size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation block") /* Point the aggregator at the newly allocated block */ aggr->addr = new_space; @@ -301,12 +301,12 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); /* Freeing any possible fragment due to file allocation */ if(eoa_frag_size) if(H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") /* Freeing any possible fragment due to alignment in the block after extension */ if(extended && frag_size) if(H5MF_xfree(f, type, dxpl_id, frag_addr, frag_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") } /* end if */ else { /* Allocate space out of the block */ @@ -317,7 +317,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); /* free any possible fragment */ if (frag_size) if(H5MF_xfree(f, type, dxpl_id, frag_addr, frag_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free aggregation fragment") } /* end else */ } /* end if */ else { @@ -333,7 +333,7 @@ HDfprintf(stderr, "%s: Allocating block\n", FUNC); if(eoa_frag_size) /* Put fragment on the free list */ if(H5MF_xfree(f, type, dxpl_id, eoa_frag_addr, eoa_frag_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") } /* end else */ /* Sanity check for overlapping into file's temporary allocation space */ @@ -366,7 +366,7 @@ HDfprintf(stderr, "%s: ret_value = %a\n", FUNC, ret_value); *------------------------------------------------------------------------- */ htri_t -H5MF_aggr_try_extend(const H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type, +H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_requested) { htri_t ret_value = FALSE; /* Return value */ @@ -640,8 +640,8 @@ HDfprintf(stderr, "%s: tmp_addr = %a, tmp_size = %Hu\n", FUNC, tmp_addr, tmp_siz /* Return the unused portion of the metadata block to the file */ if(tmp_size > 0 && (H5F_INTENT(f) & H5F_ACC_RDWR)) - if(H5FD_free(f->shared->lf, dxpl_id, alloc_type, f, tmp_addr, tmp_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free space") + if(H5MF_xfree(f, alloc_type, dxpl_id, tmp_addr, tmp_size) < 0) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't release aggregator's free space") } /* end if */ done: |