diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-01 23:53:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-01 23:53:17 (GMT) |
commit | 42306f8ed4ade51a8629b9c5a159d1afac5f617f (patch) | |
tree | a503b4e463f3888709d893eae564898d899135bb /src/H5HFpkg.h | |
parent | 982f1ff8ff1687cc62e310c991c0d56929b271fd (diff) | |
download | hdf5-42306f8ed4ade51a8629b9c5a159d1afac5f617f.zip hdf5-42306f8ed4ade51a8629b9c5a159d1afac5f617f.tar.gz hdf5-42306f8ed4ade51a8629b9c5a159d1afac5f617f.tar.bz2 |
[svn-r22233] Description:
Correct several errors in fractal heap code: root indirect block was
getting pinned/protected more than once, "single" free space sections weren't
getting "re-parented" correctly when the heap transitioned between having a
root indirect block and a root direct block, and several related issues. Also
cleaned up some warnings in library/tests.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Mac OSX/64 10.7.3 (amazon) w/debug
Diffstat (limited to 'src/H5HFpkg.h')
-rw-r--r-- | src/H5HFpkg.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 2746302..498c45e 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -174,6 +174,11 @@ #define H5HF_OP_MODIFY 0x0001 /* Operation will modify object */ #define H5HF_OP_FLAGS (H5HF_OP_MODIFY) /* Bit-wise OR of all op flags */ +/* Flags for 'root_iblock_flags' field in header */ +#define H5HF_ROOT_IBLOCK_PINNED 0x01 +#define H5HF_ROOT_IBLOCK_PROTECTED 0x02 + + /****************************/ /* Package Private Typedefs */ /****************************/ @@ -342,7 +347,8 @@ typedef struct H5HF_hdr_t { hbool_t pending_delete; /* Heap is pending deletion */ uint8_t sizeof_size; /* Size of file sizes */ uint8_t sizeof_addr; /* Size of file addresses */ - struct H5HF_indirect_t *root_iblock; /* Pointer to pinned root indirect block */ + struct H5HF_indirect_t *root_iblock; /* Pointer to root indirect block */ + unsigned root_iblock_flags; /* Flags to indicate whether root indirect block is pinned/protected */ H5FS_t *fspace; /* Free space list for objects in heap */ H5HF_block_iter_t next_block; /* Block iterator for searching for next block with space */ H5B2_t *huge_bt2; /* v2 B-tree handle for huge objects */ @@ -457,14 +463,14 @@ typedef struct H5HF_huge_bt2_filt_dir_rec_t { typedef struct { H5HF_hdr_t *hdr; /* Fractal heap header */ hid_t dxpl_id; /* DXPL ID for operation */ -} H5HF_sect_add_ud1_t; +} H5HF_sect_add_ud_t; /* User data for v2 B-tree 'remove' callback on 'huge' objects */ typedef struct { H5HF_hdr_t *hdr; /* Fractal heap header (in) */ hid_t dxpl_id; /* DXPL ID for operation (in) */ hsize_t obj_len; /* Length of object removed (out) */ -} H5HF_huge_remove_ud1_t; +} H5HF_huge_remove_ud_t; /* User data for fractal heap header cache client callback */ typedef struct H5HF_hdr_cache_ud_t { @@ -701,10 +707,14 @@ H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id); /* Debugging routines for dumping file structures */ +H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hid_t dxpl_id, + hbool_t dump_internal, FILE *stream, int indent, int fwidth); H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth); H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec); +H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, + FILE *stream, int indent, int fwidth); H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows); @@ -733,6 +743,9 @@ H5_DLL herr_t H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node, unsigned flags); H5_DLL htri_t H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request, H5HF_free_section_t **node); +H5_DLL herr_t H5HF_space_revert_root(const H5HF_hdr_t *hdr, hid_t dxpl_id); +H5_DLL herr_t H5HF_space_create_root(const H5HF_hdr_t *hdr, hid_t dxpl_id, + H5HF_indirect_t *root_iblock); H5_DLL herr_t H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size); H5_DLL herr_t H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node); |