summaryrefslogtreecommitdiffstats
path: root/src/H5HFstat.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2008-03-04 20:02:57 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2008-03-04 20:02:57 (GMT)
commit4de5549f92e354900b47585d2a76c213984504b3 (patch)
tree061b58573d2ff0b5ddc1eb1ae00588644002d622 /src/H5HFstat.c
parent52378f9e944ae7810ff12b4b9d8075f5744f38a2 (diff)
downloadhdf5-4de5549f92e354900b47585d2a76c213984504b3.zip
hdf5-4de5549f92e354900b47585d2a76c213984504b3.tar.gz
hdf5-4de5549f92e354900b47585d2a76c213984504b3.tar.bz2
[svn-r14702] 1. H5HFiblock.c: fixed problem for uninitialized "u" for bug #1072 in H5HF_man_iblock_size().
2. H5HFstat.c: Since H5HF_space_size() zeroed out fs_size, add "meta_size" to store free-space size before adding to "heap_size". 3. h5stat_gentest.c: increase # of groups to get "h5stat_newgrat.h5" that contains indirect block entries in fractal heap. This is for testing the recursive part of the code in H5HF_man_iblock_size(). 4. h5stat_newgrat.h5: the new .h5 file generated by h5stat_gentest.c. 5. h5stat_newgrat.ddl: expected output from new "h5stat_newgrat.h5".
Diffstat (limited to 'src/H5HFstat.c')
-rw-r--r--src/H5HFstat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 2e3e189..015bd42 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -128,6 +128,7 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
{
H5HF_hdr_t *hdr; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t meta_size = 0; /* free space storage size */
FUNC_ENTER_NOAPI(H5HF_size, FAIL)
@@ -172,9 +173,11 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
} /* end if */
/* Get storage for free-space tracking info */
- if(H5F_addr_defined(hdr->fs_addr))
- if(H5HF_space_size(hdr, dxpl_id, heap_size) < 0)
+ if(H5F_addr_defined(hdr->fs_addr)) {
+ if(H5HF_space_size(hdr, dxpl_id, &meta_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info")
+ *heap_size += meta_size;
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)