diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2012-06-06 21:12:34 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2012-06-06 21:12:34 (GMT) |
commit | 596d5b2662e0cd9003efdfce6dd0fa160395ba67 (patch) | |
tree | 89e20ff22e826fa7b2a486c72b7a85c61deb7f69 /src/H5MF.c | |
parent | 71ca559f81df96e2e792e4bb831f4f07db860cf9 (diff) | |
download | hdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.zip hdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.tar.gz hdf5-596d5b2662e0cd9003efdfce6dd0fa160395ba67.tar.bz2 |
[svn-r22438] (1) fix for making MEM_GHEAP as MEM_DRAW
(2) fix to extend into the aggregator based on threshold
(3) fix for the "flavor" logging problem
(4) fix for test failures due to the above fixes
(5) bug fix for h5stat when h5stat against a non-existing file
--Ths line, and th se below, will be ignored--
M test/mf.c
M src/H5MFaggr.c
M src/H5FDpublic.h
M src/H5MF.c
M src/H5FDmulti.c
M src/H5FDlog.c
M src/H5Faccum.c
M tools/h5copy/testfiles/h5copytst.out.ls
M tools/h5copy/testfiles/h5copy_ref.out.ls
M tools/h5stat/testh5stat.sh.in
M tools/h5stat/h5stat.c
Diffstat (limited to 'src/H5MF.c')
-rw-r--r-- | src/H5MF.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -153,7 +153,8 @@ H5MF_init_merge_flags(H5F_t *f) all_metadata_same = TRUE; for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) /* Skip checking raw data free list mapping */ - if(type != H5FD_MEM_DRAW) { + /* (global heap is treated as raw data) */ + if(type != H5FD_MEM_DRAW && type != H5FD_MEM_GHEAP) { /* Check for any different type mappings */ if(f->shared->fs_type_map[type] != f->shared->fs_type_map[H5FD_MEM_SUPER]) { all_metadata_same = FALSE; @@ -176,9 +177,12 @@ H5MF_init_merge_flags(H5F_t *f) HDmemset(f->shared->fs_aggr_merge, 0, sizeof(f->shared->fs_aggr_merge)); /* Check if merging raw data should be allowed */ + /* (treat global heaps as raw data) */ if(H5FD_MEM_DRAW == f->shared->fs_type_map[H5FD_MEM_DRAW] || - H5FD_MEM_DEFAULT == f->shared->fs_type_map[H5FD_MEM_DRAW]) + H5FD_MEM_DEFAULT == f->shared->fs_type_map[H5FD_MEM_DRAW]) { f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA; + f->shared->fs_aggr_merge[H5FD_MEM_GHEAP] = H5F_FS_MERGE_RAWDATA; + } /* end if */ break; case H5MF_AGGR_MERGE_DICHOTOMY: @@ -186,7 +190,9 @@ H5MF_init_merge_flags(H5F_t *f) HDmemset(f->shared->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f->shared->fs_aggr_merge)); /* Allow merging raw data allocations together */ + /* (treat global heaps as raw data) */ f->shared->fs_aggr_merge[H5FD_MEM_DRAW] = H5F_FS_MERGE_RAWDATA; + f->shared->fs_aggr_merge[H5FD_MEM_GHEAP] = H5F_FS_MERGE_RAWDATA; break; case H5MF_AGGR_MERGE_TOGETHER: @@ -717,6 +723,7 @@ H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsize_t extra_requested) { haddr_t end; /* End of block to extend */ + H5FD_mem_t map_type; /* Mapped type */ htri_t ret_value; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -728,18 +735,21 @@ HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_r HDassert(f); HDassert(H5F_INTENT(f) & H5F_ACC_RDWR); + /* Set mapped type, treating global heap as raw data */ + map_type = (alloc_type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : alloc_type; + /* Compute end of block to extend */ end = addr + size; /* Check if the block is exactly at the end of the file */ - if((ret_value = H5FD_try_extend(f->shared->lf, alloc_type, f, end, extra_requested)) < 0) + if((ret_value = H5FD_try_extend(f->shared->lf, map_type, f, end, extra_requested)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file") else if(ret_value == FALSE) { H5F_blk_aggr_t *aggr; /* Aggregator to use */ /* Check for test block able to extend aggregation block */ - aggr = (alloc_type == H5FD_MEM_DRAW) ? &(f->shared->sdata_aggr) : &(f->shared->meta_aggr); - if((ret_value = H5MF_aggr_try_extend(f, aggr, alloc_type, end, extra_requested)) < 0) + aggr = (map_type == H5FD_MEM_DRAW) ? &(f->shared->sdata_aggr) : &(f->shared->meta_aggr); + if((ret_value = H5MF_aggr_try_extend(f, aggr, map_type, end, extra_requested)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block") else if(ret_value == FALSE) { H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */ |