diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 23:39:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 23:39:48 (GMT) |
commit | 38e234b620595f3eac5ff68dd71d4b29cfd46b18 (patch) | |
tree | 905658547118279ea17cab8ffac2820d865b3b92 /src/H5MF.c | |
parent | e286b6e706b28330a64115c13c11ae832536b857 (diff) | |
download | hdf5-38e234b620595f3eac5ff68dd71d4b29cfd46b18.zip hdf5-38e234b620595f3eac5ff68dd71d4b29cfd46b18.tar.gz hdf5-38e234b620595f3eac5ff68dd71d4b29cfd46b18.tar.bz2 |
Convert H5F_addr calls to H5_addr (#3297)
Diffstat (limited to 'src/H5MF.c')
-rw-r--r-- | src/H5MF.c | 84 |
1 files changed, 42 insertions, 42 deletions
@@ -48,7 +48,7 @@ #define H5MF_CHECK_FSM(FSM, CF) \ do { \ assert(*CF == FALSE); \ - if (!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \ + if (!H5_addr_defined(FSM->addr) || !H5_addr_defined(FSM->sect_addr)) \ *CF = TRUE; \ } while (0) @@ -309,7 +309,7 @@ H5MF__open_fstype(H5F_t *f, H5F_mem_page_t type) assert((H5FD_mem_t)type != H5FD_MEM_NOLIST); } /* end else */ assert(f->shared); - assert(H5F_addr_defined(f->shared->fs_addr[type])); + assert(H5_addr_defined(f->shared->fs_addr[type])); assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED); /* Set up the alignment and threshold to use depending on the manager type */ @@ -384,7 +384,7 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type) assert((H5FD_mem_t)type != H5FD_MEM_NOLIST); } /* end else */ assert(f->shared); - assert(!H5F_addr_defined(f->shared->fs_addr[type])); + assert(!H5_addr_defined(f->shared->fs_addr[type])); assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED); /* Set the free space creation parameters */ @@ -458,7 +458,7 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type) } /* end else */ /* Check if the free space manager exists already */ - if (H5F_addr_defined(f->shared->fs_addr[type])) { + if (H5_addr_defined(f->shared->fs_addr[type])) { /* Open existing free space manager */ if (H5MF__open_fstype(f, type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, FAIL, "can't initialize file free space") @@ -500,7 +500,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type) assert(type < H5F_MEM_PAGE_NTYPES); else assert((H5FD_mem_t)type < H5FD_MEM_NTYPES); - assert(H5F_addr_defined(f->shared->fs_addr[type])); + assert(H5_addr_defined(f->shared->fs_addr[type])); /* Put address into temporary variable and reset it */ /* (Avoids loopback in file space freeing routine) */ @@ -532,7 +532,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type) f->shared->fs_state[type] = H5F_FS_STATE_CLOSED; /* Sanity check that the free space manager for this type wasn't started up again */ - assert(!H5F_addr_defined(f->shared->fs_addr[type])); + assert(!H5_addr_defined(f->shared->fs_addr[type])); done: /* Reset the ring in the API context */ @@ -781,7 +781,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) "attempt to notify cache that ring is unsettled failed") /* Check if the free space manager for the file has been initialized */ - if (!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type])) { + if (!f->shared->fs_man[fs_type] && H5_addr_defined(f->shared->fs_addr[fs_type])) { /* Open the free-space manager */ if (H5MF__open_fstype(f, fs_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, HADDR_UNDEF, "can't initialize file free space") @@ -795,7 +795,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) } /* end if */ /* If no space is found from the free-space manager, continue further action */ - if (!H5F_addr_defined(ret_value)) { + if (!H5_addr_defined(ret_value)) { #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: Check 2.0\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -810,7 +810,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd") } /* end else */ } /* end if */ - assert(H5F_addr_defined(ret_value)); + assert(H5_addr_defined(ret_value)); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: Check 3.0\n", __func__); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -1018,7 +1018,7 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size) ret_value = f->shared->tmp_addr - size; /* Check for overlap into the actual allocated space in the file */ - if (H5F_addr_le(ret_value, eoa)) + if (H5_addr_le(ret_value, eoa)) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed") /* Adjust temporary address allocator in the file */ @@ -1056,7 +1056,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* check arguments */ assert(f); - if (!H5F_addr_defined(addr) || 0 == size) + if (!H5_addr_defined(addr) || 0 == size) HGOTO_DONE(SUCCEED) assert(addr != 0); /* Can't deallocate the superblock :-) */ @@ -1080,7 +1080,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) "attempt to notify cache that ring is unsettled failed") /* Check for attempting to free space that's a 'temporary' file address */ - if (H5F_addr_le(f->shared->tmp_addr, addr)) + if (H5_addr_le(f->shared->tmp_addr, addr)) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, "attempting to free temporary file space") /* If it's metadata, check if the space to free intersects with the file's @@ -1102,7 +1102,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]); #endif /* H5MF_ALLOC_DEBUG_MORE */ - if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) { + if (!H5_addr_defined(f->shared->fs_addr[fs_type])) { htri_t status; /* "can absorb" status for section into */ #ifdef H5MF_ALLOC_DEBUG_MORE @@ -1348,7 +1348,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi udata.alloc_type = alloc_type; /* Check if the free space for the file has been initialized */ - if (!f->shared->fs_man[fs_type] && H5F_addr_defined(f->shared->fs_addr[fs_type])) + if (!f->shared->fs_man[fs_type] && H5_addr_defined(f->shared->fs_addr[fs_type])) /* Open the free-space manager */ if (H5MF__open_fstype(f, fs_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") @@ -1423,7 +1423,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) assert(f); assert(f->shared); assert(f->shared->lf); - assert(H5F_addr_defined(addr)); + assert(H5_addr_defined(addr)); assert(size > 0); /* Set up free-space section class information */ @@ -1564,7 +1564,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) #endif /* H5MF_ALLOC_DEBUG_MORE */ /* If there is free space manager info for this type, delete it */ - if (H5F_addr_defined(f->shared->fs_addr[type])) + if (H5_addr_defined(f->shared->fs_addr[type])) if (H5MF__delete_fstype(f, type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't delete the free space manager") @@ -1734,7 +1734,7 @@ H5MF__close_aggrfs(H5F_t *f) /* superblock extension and free space manager message should * exist at this point -- verify at least the former. */ - assert(H5F_addr_defined(f->shared->sblock->ext_addr)); + assert(H5_addr_defined(f->shared->sblock->ext_addr)); /* file space for all non-empty free space managers should be * allocated at this point, and these free space managers should @@ -1904,7 +1904,7 @@ H5MF__close_pagefs(H5F_t *f) /* superblock extension and free space manager message should * exist at this point -- verify at least the former. */ - assert(H5F_addr_defined(f->shared->sblock->ext_addr)); + assert(H5_addr_defined(f->shared->sblock->ext_addr)); /* file space for all non-empty free space managers should be * allocated at this point, and these free space managers should @@ -1982,7 +1982,7 @@ H5MF__close_pagefs(H5F_t *f) * it is ignored in the following assert. */ assert((H5F_NULL_FSM_ADDR(f)) || (final_eoa == f->shared->eoa_fsm_fsalloc) || - ((H5F_addr_defined(f->shared->eoa_post_mdci_fsalloc)) && + ((H5_addr_defined(f->shared->eoa_post_mdci_fsalloc)) && (final_eoa == f->shared->eoa_post_mdci_fsalloc))); } /* end if */ else { @@ -2196,7 +2196,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) fs_started[type] = FALSE; /* Check if the free space for the file has been initialized */ - if (!f->shared->fs_man[type] && H5F_addr_defined(f->shared->fs_addr[type])) { + if (!f->shared->fs_man[type] && H5_addr_defined(f->shared->fs_addr[type])) { if (H5MF__open_fstype(f, type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") assert(f->shared->fs_man[type]); @@ -2347,7 +2347,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t curr_ring = needed_ring; } /* end if */ - if (!f->shared->fs_man[ty] && H5F_addr_defined(f->shared->fs_addr[ty])) { + if (!f->shared->fs_man[ty] && H5_addr_defined(f->shared->fs_addr[ty])) { if (H5MF__open_fstype(f, ty) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager") assert(f->shared->fs_man[ty]); @@ -2678,7 +2678,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * space. */ if (NULL == f->shared->fs_man[fsm_type]) { - if (H5F_addr_defined(f->shared->fs_addr[fsm_type])) { + if (H5_addr_defined(f->shared->fs_addr[fsm_type])) { /* Sanity check */ assert(fsm_opened[fsm_type] == FALSE); @@ -2706,7 +2706,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't get free-space info") /* Check if the free space manager has space in the file */ - if (H5F_addr_defined(fs_stat.addr) || H5F_addr_defined(fs_stat.sect_addr)) { + if (H5_addr_defined(fs_stat.addr) || H5_addr_defined(fs_stat.sect_addr)) { /* Delete the free space manager in the file. Will * reallocate later if the free space manager contains * any free space. @@ -2736,7 +2736,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * file space manager info message is guaranteed to exist. * Leave it in for now, but consider removing it. */ - if (H5F_addr_defined(f->shared->sblock->ext_addr)) + if (H5_addr_defined(f->shared->sblock->ext_addr)) if (H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension") @@ -2855,7 +2855,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) */ if (fs_stat.serial_sect_count > 0) { /* Sanity check */ - assert(!H5F_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.addr)); /* Allocate FSM header */ if (H5FS_alloc_hdr(f, f->shared->fs_man[fsm_type], @@ -2864,7 +2864,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) "can't allocated free-space header") /* Allocate FSM section info */ - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.alloc_sect_size == 0); if (H5FS_alloc_sect(f, f->shared->fs_man[fsm_type]) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, @@ -2876,16 +2876,16 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't get free-space info") - assert(H5F_addr_defined(fs_stat.addr)); - assert(H5F_addr_defined(fs_stat.sect_addr)); + assert(H5_addr_defined(fs_stat.addr)); + assert(H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.serial_sect_count > 0); assert(fs_stat.alloc_sect_size > 0); assert(fs_stat.alloc_sect_size == fs_stat.sect_size); #endif /* NDEBUG */ } /* end if */ else { - assert(!H5F_addr_defined(fs_stat.addr)); - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.serial_sect_count == 0); assert(fs_stat.alloc_sect_size == 0); } /* end else */ @@ -3056,8 +3056,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) assert(sm_fssinfo_fs_type > H5F_MEM_PAGE_DEFAULT); assert(sm_fssinfo_fs_type < H5F_MEM_PAGE_LARGE_SUPER); - assert(!H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type])); - assert(!H5F_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type])); + assert(!H5_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type])); + assert(!H5_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type])); /* Note that in most cases, sm_hdr_fspace will equal sm_sinfo_fspace. */ sm_hdr_fspace = f->shared->fs_man[sm_fshdr_fs_type]; @@ -3075,8 +3075,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) assert(lg_fssinfo_fs_type >= H5F_MEM_PAGE_LARGE_SUPER); assert(lg_fssinfo_fs_type < H5F_MEM_PAGE_NTYPES); - assert(!H5F_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type])); - assert(!H5F_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type])); + assert(!H5_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type])); + assert(!H5_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type])); /* Note that in most cases, lg_hdr_fspace will equal lg_sinfo_fspace. */ lg_hdr_fspace = f->shared->fs_man[lg_fshdr_fs_type]; @@ -3095,8 +3095,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5FS_stat_info(f, sm_hdr_fspace, &fs_stat) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info") - assert(!H5F_addr_defined(fs_stat.addr)); - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.alloc_sect_size == 0); } /* end if */ @@ -3106,8 +3106,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5FS_stat_info(f, sm_sinfo_fspace, &fs_stat) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info") - assert(!H5F_addr_defined(fs_stat.addr)); - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.alloc_sect_size == 0); } /* end if */ @@ -3118,8 +3118,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5FS_stat_info(f, lg_hdr_fspace, &fs_stat) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (3)") - assert(!H5F_addr_defined(fs_stat.addr)); - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.alloc_sect_size == 0); } /* end if */ @@ -3131,8 +3131,8 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5FS_stat_info(f, lg_sinfo_fspace, &fs_stat) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (4)") - assert(!H5F_addr_defined(fs_stat.addr)); - assert(!H5F_addr_defined(fs_stat.sect_addr)); + assert(!H5_addr_defined(fs_stat.addr)); + assert(!H5_addr_defined(fs_stat.sect_addr)); assert(fs_stat.alloc_sect_size == 0); } /* end if */ } /* end if */ |