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/H5FScache.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/H5FScache.c')
-rw-r--r-- | src/H5FScache.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c index c7bfab2..449628d 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -283,7 +283,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len H5F_DECODE_LENGTH(udata->f, image, fspace->max_sect_size); /* Address of serialized free space sections */ - H5F_addr_decode(udata->f, &image, &fspace->sect_addr); + H5_addr_decode(udata->f, &image, &fspace->sect_addr); /* Size of serialized free space sections */ H5F_DECODE_LENGTH(udata->f, image, fspace->sect_size); @@ -380,7 +380,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT assert(fspace); assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); assert(fspace->cache_info.type == H5AC_FSPACE_HDR); - assert(H5F_addr_defined(addr)); + assert(H5_addr_defined(addr)); assert(new_addr); assert(new_len); assert(flags); @@ -406,7 +406,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * * 1) The instance of H5FS_sinfo_t is not in the metadata cache. * - * This will be TRUE iff H5F_addr_defined(fspace->sect_addr) + * This will be TRUE iff H5_addr_defined(fspace->sect_addr) * is FALSE, and fspace->sinfo is not NULL. This is sometimes * referred to as "floating" section info in the comments. * @@ -417,11 +417,11 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * * and * - * H5F_addr_defined(fspace->addr) + * H5_addr_defined(fspace->addr) * * will both be TRUE. If this condition does not hold, then * either the free space info is not persistent - * (!H5F_addr_defined(fspace->addr)???) or the section info + * (!H5_addr_defined(fspace->addr)???) or the section info * contains no free space data that must be written to file * ( fspace->serial_sect_count == 0 ). * @@ -441,7 +441,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * cases 2) and 3), as the section info should not be stored on * disk if it doesn't exist. Similarly, since the section info * will not be stored to disk unless the header is, - * H5F_addr_defined(fspace->addr) must hold as well. + * H5_addr_defined(fspace->addr) must hold as well. * * As the objective is to touch up the free space manager header * so that it contains sensical data on the size and location of @@ -449,7 +449,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * cases differently. * * Case 1) If either fspace->serial_sect_count == 0 or - * ! H5F_addr_defined(fspace->addr) do nothing as either + * ! H5_addr_defined(fspace->addr) do nothing as either * the free space manager data is not persistent, or the * section info is empty. * @@ -473,11 +473,11 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * as dirty, as the metadata cache would not be attempting to * serialize the header if it thought it was clean. */ - if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) { + if (fspace->serial_sect_count > 0 && H5_addr_defined(fspace->addr)) { /* Sanity check */ assert(fspace->sect_size > 0); - if (!H5F_addr_defined(fspace->sect_addr)) { /* case 1 */ + if (!H5_addr_defined(fspace->sect_addr)) { /* case 1 */ haddr_t tag = HADDR_UNDEF; haddr_t sect_addr; hsize_t saved_sect_size, new_sect_size; @@ -573,10 +573,10 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT /* for one reason or another (see comment above) there should * not be any file space allocated for the section info. */ - assert(!H5F_addr_defined(fspace->sect_addr)); + assert(!H5_addr_defined(fspace->sect_addr)); } /* end else */ } /* end if */ - else if (H5F_addr_defined(fspace->sect_addr)) { + else if (H5_addr_defined(fspace->sect_addr)) { /* Here the metadata cache is managing the section info. * * Do some sanity checks, and then test to see if the section @@ -616,7 +616,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT fspace->alloc_sect_size = (size_t)fspace->sect_size; /* Sanity check */ - assert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr)); + assert(!H5_addr_eq(fspace->sect_addr, new_sect_addr)); /* Let the metadata cache know the section info moved */ if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0) @@ -686,10 +686,10 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN * into real file space if necessary before this function was called. * The following asserts are a cursory check on this. */ - assert((!H5F_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr))); + assert((!H5_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr))); if (!H5F_POINT_OF_NO_RETURN(f)) - assert((!H5F_addr_defined(fspace->sect_addr)) || + assert((!H5_addr_defined(fspace->sect_addr)) || ((fspace->sect_size > 0) && (fspace->alloc_sect_size == (size_t)fspace->sect_size))); /* Magic number */ @@ -732,7 +732,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN H5F_ENCODE_LENGTH(f, image, fspace->max_sect_size); /* Address of serialized free space sections */ - H5F_addr_encode(f, &image, fspace->sect_addr); + H5_addr_encode(f, &image, fspace->sect_addr); /* Size of serialized free space sections */ H5F_ENCODE_LENGTH(f, image, fspace->sect_size); @@ -963,8 +963,8 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version") /* Address of free space header for these sections */ - H5F_addr_decode(udata->f, &image, &fs_addr); - if (H5F_addr_ne(fs_addr, fspace->addr)) + H5_addr_decode(udata->f, &image, &fs_addr); + if (H5_addr_ne(fs_addr, fspace->addr)) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections") /* Check for any serialized sections */ @@ -1134,8 +1134,8 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); assert(fspace->cache_info.type == H5AC_FSPACE_HDR); assert(fspace->cache_info.is_pinned); - assert(H5F_addr_defined(addr)); - assert(H5F_addr_eq(fspace->sect_addr, addr)); + assert(H5_addr_defined(addr)); + assert(H5_addr_eq(fspace->sect_addr, addr)); assert(fspace->sect_size == len); assert(new_addr); assert(new_len); @@ -1147,7 +1147,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { /* Sanity check */ assert(fspace->sect_size > 0); - assert(H5F_addr_eq(fspace->sect_addr, addr)); + assert(H5_addr_eq(fspace->sect_addr, addr)); /* Allocate space for the section info in file */ if (HADDR_UNDEF == (sinfo_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size))) @@ -1156,7 +1156,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ fspace->alloc_sect_size = (size_t)fspace->sect_size; /* Sanity check */ - assert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr)); + assert(!H5_addr_eq(sinfo->fspace->sect_addr, sinfo_addr)); /* Let the metadata cache know the section info moved */ if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, sinfo->fspace->sect_addr, sinfo_addr) < 0) @@ -1170,7 +1170,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") } /* end if */ - if (!H5F_addr_eq(addr, sinfo_addr)) { + if (!H5_addr_eq(addr, sinfo_addr)) { *new_addr = sinfo_addr; *flags = H5C__SERIALIZE_MOVED_FLAG; } /* end if */ @@ -1227,7 +1227,7 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi *image++ = H5FS_SINFO_VERSION; /* Address of free space header for these sections */ - H5F_addr_encode(f, &image, sinfo->fspace->addr); + H5_addr_encode(f, &image, sinfo->fspace->addr); /* Set up user data for iterator */ udata.sinfo = sinfo; |