diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-02 18:21:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-02 18:21:05 (GMT) |
commit | 177cbf2b9bf6e0083f78e8493be88918ab9c3504 (patch) | |
tree | 9e5dab5482f5cebf188f7b740629193f89a0f46f /src/H5HFpkg.h | |
parent | bb455ebd6f14901e6888586b8209abc277cf128d (diff) | |
download | hdf5-177cbf2b9bf6e0083f78e8493be88918ab9c3504.zip hdf5-177cbf2b9bf6e0083f78e8493be88918ab9c3504.tar.gz hdf5-177cbf2b9bf6e0083f78e8493be88918ab9c3504.tar.bz2 |
[svn-r22239] Description:
Bring r22233 from trunk to 1.8 branch:
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 d98cbd1..becec94 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 */ @@ -458,14 +464,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 { @@ -702,10 +708,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); @@ -734,6 +744,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); |