summaryrefslogtreecommitdiffstats
path: root/src/H5HFhdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HFhdr.c')
-rw-r--r--src/H5HFhdr.c159
1 files changed, 80 insertions, 79 deletions
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 28346c0..d74d3a3 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -105,7 +105,7 @@ H5HF__hdr_alloc(H5F_t *f)
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header");
/* Set the internal parameters for the heap */
hdr->f = f;
@@ -192,7 +192,7 @@ H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr)
/* Compute/cache some values */
hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index);
if (H5HF__dtable_init(&hdr->man_dtable) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info");
/* Set the size of heap IDs */
hdr->heap_len_size =
@@ -234,20 +234,20 @@ H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr)
} /* end if */
else if (H5HF__hdr_compute_free_space(hdr, u) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
- "can't initialize direct block free space for indirect block")
+ "can't initialize direct block free space for indirect block");
} /* end for */
/* Initialize the block iterator for searching for free space */
if (H5HF__man_iter_init(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator");
/* Initialize the information for tracking 'huge' objects */
if (H5HF__huge_init(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects");
/* Initialize the information for tracking 'tiny' objects */
if (H5HF__tiny_init(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -276,11 +276,11 @@ H5HF__hdr_finish_init(H5HF_hdr_t *hdr)
/* First phase of header final initialization */
if (H5HF__hdr_finish_init_phase1(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization");
/* Second phase of header final initialization */
if (H5HF__hdr_finish_init_phase2(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -313,35 +313,35 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
#ifndef NDEBUG
/* Check for valid parameters */
if (cparam->managed.width == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero");
if (cparam->managed.width > H5HF_WIDTH_LIMIT)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large");
if (!POWER_OF_TWO(cparam->managed.width))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two");
if (cparam->managed.start_block_size == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero");
if (!POWER_OF_TWO(cparam->managed.start_block_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two");
if (cparam->managed.max_direct_size == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero");
if (cparam->managed.max_direct_size > H5HF_MAX_DIRECT_SIZE_LIMIT)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large");
if (!POWER_OF_TWO(cparam->managed.max_direct_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two");
if (cparam->managed.max_direct_size < cparam->max_man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF,
- "max. direct block size not large enough to hold all managed blocks")
+ "max. direct block size not large enough to hold all managed blocks");
if (cparam->managed.max_index == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero");
#endif /* NDEBUG */
/* Allocate & basic initialization for the shared header */
if (NULL == (hdr = H5HF__hdr_alloc(f)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info");
#ifndef NDEBUG
if (cparam->managed.max_index > (unsigned)(8 * hdr->sizeof_size))
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file");
#endif /* NDEBUG */
/* Set the creation parameters for the heap */
@@ -362,7 +362,7 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/* (doesn't need ID length set up) */
if (H5HF__hdr_finish_init_phase1(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF,
- "can't finish phase #1 of header final initialization")
+ "can't finish phase #1 of header final initialization");
/* Copy any I/O filter pipeline */
/* (This code is not in the "finish init phase" routines because those
@@ -372,26 +372,26 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
if (cparam->pline.nused > 0) {
/* Check if the filters in the DCPL can be applied to this dataset */
if (H5Z_can_apply_direct(&(cparam->pline)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap");
/* Mark the filters as checked */
hdr->checked_filters = TRUE;
/* Make the "set local" filter callbacks for this dataset */
if (H5Z_set_local_direct(&(cparam->pline)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters");
/* Copy the I/O filter pipeline from the creation parameters to the header */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline");
/* Set the version for the I/O pipeline message */
if (H5O_pline_set_version(hdr->f, &(hdr->pline)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline");
/* Compute the I/O filters' encoded size */
if (0 == (hdr->filter_len = (unsigned)H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline))))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size");
/* Compute size of header on disk */
hdr->heap_size = H5HF_HEADER_SIZE(hdr) /* Base header size */
@@ -436,10 +436,10 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/* Check boundaries */
if (cparam->id_len < (1 + hdr->heap_off_size + hdr->heap_len_size))
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF,
- "ID length not large enough to hold object IDs")
+ "ID length not large enough to hold object IDs");
else if (cparam->id_len > H5HF_MAX_ID_LEN)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF,
- "ID length too large to store tiny object lengths")
+ "ID length too large to store tiny object lengths");
/* Use the requested size for the heap ID */
hdr->id_len = cparam->id_len;
@@ -450,22 +450,22 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/* (needs ID and filter lengths set up) */
if (H5HF__hdr_finish_init_phase2(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF,
- "can't finish phase #2 of header final initialization")
+ "can't finish phase #2 of header final initialization");
/* Extra checking for possible gap between max. direct block size minus
* overhead and "huge" object size */
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
if ((cparam->managed.max_direct_size - dblock_overhead) < cparam->max_man_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF,
- "max. direct block size not large enough to hold all managed blocks")
+ "max. direct block size not large enough to hold all managed blocks");
/* Allocate space for the header on disk */
if (HADDR_UNDEF == (hdr->heap_addr = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, (hsize_t)hdr->heap_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header");
/* Cache the new fractal heap header */
if (H5AC_insert_entry(f, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache");
/* Set address of heap header to return */
ret_value = hdr->heap_addr;
@@ -508,7 +508,7 @@ H5HF__hdr_protect(H5F_t *f, haddr_t addr, unsigned flags)
/* Lock the heap header into memory */
if (NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, H5AC_FHEAP_HDR, addr, &cache_udata, flags)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header");
/* Set the header's address */
hdr->heap_addr = addr;
@@ -545,7 +545,7 @@ H5HF__hdr_incr(H5HF_hdr_t *hdr)
/* Mark header as un-evictable when a block is depending on it */
if (hdr->rc == 0)
if (H5AC_pin_protected_entry(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header");
/* Increment reference count on shared header */
hdr->rc++;
@@ -581,7 +581,7 @@ H5HF__hdr_decr(H5HF_hdr_t *hdr)
if (hdr->rc == 0) {
assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header");
} /* end if */
done:
@@ -657,11 +657,11 @@ H5HF__hdr_dirty(H5HF_hdr_t *hdr)
/* Resize pinned header in cache if I/O filter is present. */
if (hdr->filter_len > 0)
if (H5AC_resize_entry(hdr, (size_t)hdr->heap_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header");
/* Mark header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -694,7 +694,7 @@ H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
/* Mark heap header as modified */
if (H5HF__hdr_dirty(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -730,7 +730,7 @@ H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
/* Mark heap header as modified */
if (H5HF__hdr_dirty(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -786,7 +786,7 @@ H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
/* Set up "next block" iterator at correct location */
if (H5HF__man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator");
/* Set the offset of the iterator in the heap */
hdr->man_iter_off = curr_off;
@@ -818,7 +818,7 @@ H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
/* Reset "next block" iterator */
if (H5HF__man_iter_reset(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator");
/* Set the offset of the iterator in the heap */
hdr->man_iter_off = curr_off;
@@ -860,12 +860,12 @@ H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start_e
/* Advance the new block iterator */
if (H5HF__hdr_inc_iter(hdr, sect_size, nentries) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size");
/* Add 'indirect' section for blocks skipped in this row */
if (H5HF__sect_indirect_add(hdr, iblock, start_entry, nentries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL,
- "can't create indirect section for indirect block's free space")
+ "can't create indirect section for indirect block's free space");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -899,7 +899,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Check for creating first indirect block */
if (hdr->man_dtable.curr_root_rows == 0) {
if (H5HF__man_iblock_root_create(hdr, min_dblock_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to create root indirect block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to create root indirect block");
} /* end if */
else {
H5HF_indirect_t *iblock; /* Pointer to indirect block */
@@ -915,12 +915,12 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
if (!H5HF__man_iter_ready(&hdr->next_block)) {
/* Start iterator with previous offset of iterator */
if (H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location");
} /* end if */
/* Get information about current iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location");
/* Check for skipping over blocks in the current block */
if (min_dblock_row > next_row && next_row < iblock->nrows) {
@@ -936,11 +936,12 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Add skipped direct blocks to heap's free space */
if (H5HF__hdr_skip_blocks(hdr, iblock, next_entry, skip_entries) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space");
/* Get information about new iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
+ "unable to retrieve current block iterator location");
} /* end if */
do {
@@ -953,23 +954,23 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Check for needing to expand root indirect block */
if (iblock->parent == NULL) {
if (H5HF__man_iblock_root_double(hdr, min_dblock_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to double root indirect block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to double root indirect block");
} /* end if */
else {
/* Move iterator up one level */
if (H5HF__man_iter_up(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
- "unable to advance current block iterator location")
+ "unable to advance current block iterator location");
/* Increment location of next block at this level */
if (H5HF__man_iter_next(hdr, &hdr->next_block, 1) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location");
} /* end else */
/* Get information about new iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "unable to retrieve current block iterator location")
+ "unable to retrieve current block iterator location");
/* Indicate that we walked up */
walked_up = TRUE;
@@ -1005,7 +1006,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Add skipped indirect blocks to heap's free space */
if (H5HF__hdr_skip_blocks(hdr, iblock, next_entry, (child_entry - next_entry)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
- "can't add skipped blocks to heap's free space")
+ "can't add skipped blocks to heap's free space");
} /* end if */
else {
H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */
@@ -1016,19 +1017,19 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
if (H5HF__man_iblock_create(hdr, iblock, next_entry, child_nrows, child_nrows,
&new_iblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL,
- "can't allocate fractal heap indirect block")
+ "can't allocate fractal heap indirect block");
/* Lock new indirect block */
if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, new_iblock_addr, child_nrows,
iblock, next_entry, FALSE,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
- "unable to protect fractal heap indirect block")
+ "unable to protect fractal heap indirect block");
/* Move iterator down one level (pins indirect block) */
if (H5HF__man_iter_down(&hdr->next_block, new_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
- "unable to advance current block iterator location")
+ "unable to advance current block iterator location");
/* Check for skipping over rows and add free section for skipped rows */
if (min_dblock_size > hdr->man_dtable.cparam.start_block_size) {
@@ -1040,19 +1041,19 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Add skipped blocks to heap's free space */
if (H5HF__hdr_skip_blocks(hdr, new_iblock, 0, new_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
- "can't add skipped blocks to heap's free space")
+ "can't add skipped blocks to heap's free space");
} /* end if */
/* Unprotect child indirect block */
if (H5HF__man_iblock_unprotect(new_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
- "unable to release fractal heap indirect block")
+ "unable to release fractal heap indirect block");
} /* end else */
/* Get information about new iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "unable to retrieve current block iterator location")
+ "unable to retrieve current block iterator location");
/* Indicate that we walked down */
walked_down = TRUE;
@@ -1089,7 +1090,7 @@ H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
/* Advance the iterator for the current location within the indirect block */
if (hdr->next_block.curr)
if (H5HF__man_iter_next(hdr, &hdr->next_block, nentries) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location");
/* Increment the offset of the iterator in the heap */
hdr->man_iter_off += adv_size;
@@ -1128,13 +1129,13 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
if (!H5HF__man_iter_ready(&hdr->next_block))
/* Start iterator with previous offset of iterator */
if (H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location");
/* Walk backwards through heap, looking for direct block to place iterator after */
/* Get information about current iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information");
/* Move current iterator position backwards once */
curr_entry--;
@@ -1160,12 +1161,12 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Move iterator to parent of current block */
if (H5HF__man_iter_up(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
- "unable to move current block iterator location up")
+ "unable to move current block iterator location up");
/* Get information about current iterator location */
if (H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "unable to retrieve current block iterator information")
+ "unable to retrieve current block iterator information");
/* Move current iterator position backwards once */
curr_entry--;
@@ -1179,7 +1180,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Reset 'next block' iterator */
if (H5HF__man_iter_reset(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator");
} /* end else */
} /* end if */
else {
@@ -1195,7 +1196,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Set the current location of the iterator to next entry after the existing direct block */
if (H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location");
/* Update iterator offset */
hdr->man_iter_off = iblock->block_off;
@@ -1218,16 +1219,16 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
child_nrows, iblock, curr_entry, FALSE,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL,
- "unable to protect fractal heap indirect block")
+ "unable to protect fractal heap indirect block");
/* Set the current location of the iterator */
if (H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location");
/* Walk down into child indirect block (pins child block) */
if (H5HF__man_iter_down(&hdr->next_block, child_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL,
- "unable to advance current block iterator location")
+ "unable to advance current block iterator location");
/* Update iterator location */
iblock = child_iblock;
@@ -1236,7 +1237,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Unprotect child indirect block */
if (H5HF__man_iblock_unprotect(child_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL,
- "unable to release fractal heap indirect block")
+ "unable to release fractal heap indirect block");
/* Note that we walked down */
walked_down = TRUE;
@@ -1270,7 +1271,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
/* Reset block iterator, if necessary */
if (H5HF__man_iter_ready(&hdr->next_block))
if (H5HF__man_iter_reset(&hdr->next_block) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator");
/* Shrink managed heap size */
hdr->man_size = 0;
@@ -1288,7 +1289,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
/* Mark heap header as modified */
if (H5HF__hdr_dirty(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1317,12 +1318,12 @@ H5HF__hdr_free(H5HF_hdr_t *hdr)
/* Free the block size lookup table for the doubling table */
if (H5HF__dtable_dest(&hdr->man_dtable) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table");
/* Release any I/O pipeline filter information */
if (hdr->pline.nused)
if (H5O_msg_reset(H5O_PLINE_ID, &(hdr->pline)) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to reset I/O pipeline message")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to reset I/O pipeline message");
/* Free the shared info itself */
hdr = H5FL_FREE(H5HF_hdr_t, hdr);
@@ -1360,7 +1361,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
/* Check the heap header's status in the metadata cache */
if (H5AC_get_entry_status(hdr->f, hdr->heap_addr, &hdr_status) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header");
/* Sanity checks on heap header */
assert(hdr_status & H5AC_ES__IN_CACHE);
@@ -1375,7 +1376,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
if (H5_addr_defined(hdr->fs_addr))
/* Delete free space manager for heap */
if (H5HF__space_delete(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap free space manager")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap free space manager");
/* Check for root direct/indirect block */
if (H5_addr_defined(hdr->man_dtable.table_addr)) {
@@ -1396,14 +1397,14 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
/* Delete root direct block */
if (H5HF__man_dblock_delete(hdr->f, hdr->man_dtable.table_addr, dblock_size) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root direct block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root direct block");
} /* end if */
else {
/* Delete root indirect block */
if (H5HF__man_iblock_delete(hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL,
0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
- "unable to release fractal heap root indirect block")
+ "unable to release fractal heap root indirect block");
} /* end else */
} /* end if */
@@ -1412,7 +1413,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
/* Delete huge objects in heap and their tracker */
if (H5HF__huge_delete(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL,
- "unable to release fractal heap 'huge' objects and tracker")
+ "unable to release fractal heap 'huge' objects and tracker");
} /* end if */
/* Indicate that the heap header should be deleted & file space freed */