diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-08-19 23:00:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-08-19 23:00:05 (GMT) |
commit | df36318b5f338d469db0086151d86601236e922a (patch) | |
tree | b6c67dbf967f026ab0202baa043e2eb6fec389c7 /src | |
parent | 85a56a9c4f9629bb92b4b16a1dada30ae30b5b21 (diff) | |
download | hdf5-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Faccum.c | 20 | ||||
-rw-r--r-- | src/H5Fpkg.h | 4 | ||||
-rw-r--r-- | src/H5MF.c | 5 | ||||
-rw-r--r-- | src/H5PB.c | 2 |
4 files changed, 15 insertions, 16 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); @@ -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]) { @@ -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 */ |