summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-08-19 23:00:05 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-08-19 23:00:05 (GMT)
commitdf36318b5f338d469db0086151d86601236e922a (patch)
treeb6c67dbf967f026ab0202baa043e2eb6fec389c7
parent85a56a9c4f9629bb92b4b16a1dada30ae30b5b21 (diff)
downloadhdf5-df36318b5f338d469db0086151d86601236e922a.zip
hdf5-df36318b5f338d469db0086151d86601236e922a.tar.gz
hdf5-df36318b5f338d469db0086151d86601236e922a.tar.bz2
Rest of changes for 'top' file pointer to 'shared' file pointer for H5F__accum
routines.
-rw-r--r--src/H5Faccum.c20
-rw-r--r--src/H5Fpkg.h4
-rw-r--r--src/H5MF.c5
-rw-r--r--src/H5PB.c2
-rw-r--r--test/accum.c2
5 files changed, 16 insertions, 17 deletions
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index c2f6732..c2724b1 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -111,7 +111,7 @@ H5FL_BLK_DEFINE_STATIC(meta_accum);
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_read(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
+H5F__accum_read(H5F_file_t *f_sh, H5FD_mem_t map_type, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_t *file; /* File driver pointer */
@@ -120,18 +120,18 @@ H5F__accum_read(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
+ HDassert(f_sh);
HDassert(buf);
/* Translate to file driver I/O info object */
- file = f->shared->lf;
+ file = f_sh->lf;
/* Check if this information is in the metadata accumulator */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
+ if((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
/* Set up alias for file's metadata accumulator info */
- accum = &f->shared->accum;
+ accum = &f_sh->accum;
if(size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
@@ -847,7 +847,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F__accum_free(H5F_t *f, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr,
+H5F__accum_free(H5F_file_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr,
hsize_t size)
{
H5F_meta_accum_t *accum; /* Alias for file's metadata accumulator */
@@ -857,16 +857,16 @@ H5F__accum_free(H5F_t *f, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr,
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
+ HDassert(f_sh);
/* Set up alias for file's metadata accumulator info */
- accum = &f->shared->accum;
+ accum = &f_sh->accum;
/* Translate to file driver pointer */
- file = f->shared->lf;
+ file = f_sh->lf;
/* Adjust the metadata accumulator to remove the freed block, if it overlaps */
- if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
+ if((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
&& H5F_addr_overlap(addr, size, accum->loc, accum->size)) {
size_t overlap_size; /* Size of overlap with accumulator */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 7af08a2..7e7eca3 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -429,9 +429,9 @@ H5_DLL herr_t H5F__super_ext_remove_msg(H5F_t *f, unsigned id);
H5_DLL herr_t H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created);
/* Metadata accumulator routines */
-H5_DLL herr_t H5F__accum_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf);
+H5_DLL herr_t H5F__accum_read(H5F_file_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf);
H5_DLL herr_t H5F__accum_write(H5F_file_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
-H5_DLL herr_t H5F__accum_free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size);
+H5_DLL herr_t H5F__accum_free(H5F_file_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size);
H5_DLL herr_t H5F__accum_flush(H5F_file_t *f_sh);
H5_DLL herr_t H5F__accum_reset(H5F_file_t *f_sh, hbool_t flush);
diff --git a/src/H5MF.c b/src/H5MF.c
index 3d9ddb0..e91fa14 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1133,11 +1133,10 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
/* If it's metadata, check if the space to free intersects with the file's
* metadata accumulator
*/
- if(H5FD_MEM_DRAW != alloc_type) {
+ if(H5FD_MEM_DRAW != alloc_type)
/* Check if the space to free intersects with the file's metadata accumulator */
- if(H5F__accum_free(f, alloc_type, addr, size) < 0)
+ if(H5F__accum_free(f->shared, alloc_type, addr, size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator")
- } /* end if */
/* Check if the free space manager for the file has been initialized */
if(!f->shared->fs_man[fs_type]) {
diff --git a/src/H5PB.c b/src/H5PB.c
index 088e25d..6acc0cc 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -729,7 +729,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
*/
if(NULL == page_buf || size >= page_buf->page_size ||
(bypass_pb && H5FD_MEM_DRAW == type)) {
- if(H5F__accum_read(f, type, addr, size, buf) < 0)
+ if(H5F__accum_read(f->shared, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "read through metadata accumulator failed")
/* Update statistics */
diff --git a/test/accum.c b/test/accum.c
index a5ef9e6..91acf0f 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -66,7 +66,7 @@ void accum_printf(const H5F_t *f);
/* Private Test H5Faccum Function Wrappers */
#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
-#define accum_free(f,a,s) H5F__accum_free(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
+#define accum_free(f,a,s) H5F__accum_free(f->shared, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
#define accum_flush(f) H5F__accum_flush(f->shared)
#define accum_reset(f) H5F__accum_reset(f->shared, TRUE)