summaryrefslogtreecommitdiffstats
path: root/src/H5FDonion_index.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-08-31 16:01:52 (GMT)
committerGitHub <noreply@github.com>2022-08-31 16:01:52 (GMT)
commitccdcec273a7665ec4bc5ce7e25788218f8842b6a (patch)
tree34db5210a9d84e67c858cfef8a158f4d018ea5e4 /src/H5FDonion_index.c
parent5de9d63ff433f146b29d7331c07ac6fae9a98a5e (diff)
downloadhdf5-ccdcec273a7665ec4bc5ce7e25788218f8842b6a.zip
hdf5-ccdcec273a7665ec4bc5ce7e25788218f8842b6a.tar.gz
hdf5-ccdcec273a7665ec4bc5ce7e25788218f8842b6a.tar.bz2
Updates onion VFD major error codes (#2076)
Diffstat (limited to 'src/H5FDonion_index.c')
-rw-r--r--src/H5FDonion_index.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index 9dbdde7..170172c 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -91,7 +91,7 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
size = history->record_locs[n].record_size;
if (NULL == (buf = H5MM_malloc(sizeof(char) * size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer space")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space")
if (H5FD_read(raw_file, H5FD_MEM_DRAW, addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file")
@@ -125,7 +125,7 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
size = history->record_locs[n].record_size;
if (NULL == (buf = H5MM_malloc(sizeof(char) * size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer space")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space")
if (H5FD_read(raw_file, H5FD_MEM_DRAW, addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file")
@@ -144,12 +144,12 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
if (r_out->comment_size > 0)
if (NULL == (r_out->comment = H5MM_malloc(sizeof(char) * r_out->comment_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate comment space")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate comment space")
if (r_out->archival_index.n_entries > 0)
if (NULL == (r_out->archival_index.list =
H5MM_calloc(r_out->archival_index.n_entries * sizeof(H5FD_onion_index_entry_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate index entry list")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate index entry list")
if (H5FD__onion_revision_record_decode(buf, r_out) != size)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (final)")
@@ -341,11 +341,11 @@ H5FD__onion_revision_index_init(uint32_t page_size)
HDassert(POWER_OF_TWO(page_size));
if (NULL == (rix = H5MM_calloc(sizeof(H5FD_onion_revision_index_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "cannot allocate index")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate index")
if (NULL ==
(rix->_hash_table = H5MM_calloc(table_size * sizeof(H5FD_onion_revision_index_hash_chain_node_t *))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "cannot allocate hash table")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate hash table")
rix->version = H5FD_ONION_REVISION_INDEX_VERSION_CURR;
rix->n_entries = 0;
@@ -396,7 +396,7 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
HDassert(rix->_hash_table);
if (NULL == (new_table = H5MM_calloc(new_size * sizeof(H5FD_onion_revision_index_hash_chain_node_t *))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "cannot allocate new hash table")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new hash table")
for (uint64_t i = 0; i < rix->_hash_table_size; i++) {
while (rix->_hash_table[i] != NULL) {
@@ -461,7 +461,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
if (rix->n_entries >= (rix->_hash_table_size * 2) ||
rix->_hash_table_n_keys_populated >= (rix->_hash_table_size / 2)) {
if (H5FD__onion_revision_index_resize(rix) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NONE_MINOR, FAIL, "unable to resize and hash table")
+ HGOTO_ERROR(H5E_VFL, H5E_NONE_MINOR, FAIL, "unable to resize and hash table")
}
key = entry->logical_page & (rix->_hash_table_size - 1);
@@ -492,7 +492,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
/* Add new entry to bucket chain */
if (append_dest != NULL) {
if (NULL == (node = H5MM_malloc(sizeof(H5FD_onion_revision_index_hash_chain_node_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node")
node->version = H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR;
node->next = NULL;
HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
@@ -869,7 +869,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
new_aix.page_size_log2 = aix->page_size_log2;
if (NULL == (new_aix.list = H5MM_calloc(rix->n_entries * sizeof(H5FD_onion_index_entry_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate new archival index list")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate new archival index list")
for (uint64_t i = 0; i < rix->_hash_table_size; i++) {
const H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
@@ -893,7 +893,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
*/
if (aix->n_entries > 0)
if (NULL == (kept_list = H5MM_calloc(aix->n_entries * sizeof(H5FD_onion_index_entry_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate larger archival index list")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate larger archival index list")
for (uint64_t i = 0; i < aix->n_entries; i++) {
const H5FD_onion_index_entry_t *entry = NULL;
@@ -910,7 +910,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
*/
H5MM_xfree(aix->list);
if (NULL == (aix->list = H5MM_calloc((new_aix.n_entries + n_kept) * sizeof(H5FD_onion_index_entry_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list")
/* Copy (new) revision list entries to replacement list */
HDmemcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);