summaryrefslogtreecommitdiffstats
path: root/src/H5HFpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
commit5a7ef381b26985886a88ad88b2afda703b578d24 (patch)
tree55b1938c7711683b77c10dfd296c5e518437f4eb /src/H5HFpkg.h
parentc83c6dd945d44cdf9de44087c4063876ab378ac1 (diff)
downloadhdf5-5a7ef381b26985886a88ad88b2afda703b578d24.zip
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.gz
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.bz2
[svn-r12598] Description:
- Migrate "direct block location" routine from H5HFman.c to H5HFdblock.c, which is a more appropriate location - Optimize performance of heap code by taking advantage of pinned indirect blocks and use them without putting a metadata cache protect/unprotect pair around them. - Other minor compiler warning cleanups and optimizations... Tested On: FreeBSD/32 4.11 (sleipnir) Linux/64 2.4 (mir) Solaris/64 2.9 (shanti)
Diffstat (limited to 'src/H5HFpkg.h')
-rw-r--r--src/H5HFpkg.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index 947f3ad..bc9e23a 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -346,6 +346,7 @@ typedef struct H5HF_hdr_t {
H5F_t *f; /* Pointer to file for heap */
size_t sizeof_size; /* Size of file sizes */
size_t sizeof_addr; /* Size of file addresses */
+ struct H5HF_indirect_t *root_iblock; /* Pointer to pinned root indirect block */
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 */
hsize_t huge_max_id; /* Max. 'huge' heap ID before rolling 'huge' heap IDs over */
@@ -376,16 +377,17 @@ struct H5HF_indirect_t {
H5AC_info_t cache_info;
/* Internal heap information (not stored) */
- size_t rc; /* Reference count of child blocks */
+ size_t rc; /* Reference count of objects using this block */
H5HF_hdr_t *hdr; /* Shared heap header info */
struct H5HF_indirect_t *parent; /* Shared parent indirect block info */
unsigned par_entry; /* Entry in parent's table */
haddr_t addr; /* Address of this indirect block on disk */
+ size_t size; /* Size of indirect block on disk */
unsigned nrows; /* Total # of rows in indirect block */
unsigned max_rows; /* Max. # of rows in indirect block */
unsigned nchildren; /* Number of child blocks */
unsigned max_child; /* Max. offset used in child entries */
- size_t size; /* Size of indirect block on disk */
+ struct H5HF_indirect_t **child_iblocks; /* Array of pointers to pinned child indirect blocks */
/* Stored values */
hsize_t block_off; /* Offset of the block within the heap's address space */
@@ -521,6 +523,10 @@ H5FL_SEQ_EXTERN(H5HF_indirect_ent_t);
/* Declare a free list to manage the H5HF_indirect_filt_ent_t sequence information */
H5FL_SEQ_EXTERN(H5HF_indirect_filt_ent_t);
+/* Declare a free list to manage the H5HF_indirect_t * sequence information */
+typedef H5HF_indirect_t *H5HF_indirect_ptr_t;
+H5FL_SEQ_EXTERN(H5HF_indirect_ptr_t);
+
/******************************/
/* Package Private Prototypes */
@@ -575,8 +581,10 @@ H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned max_rows, haddr_t *addr_p);
H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
haddr_t iblock_addr, unsigned iblock_nrows,
- H5HF_indirect_t *par_iblock, unsigned par_entry,
- H5AC_protect_t rw);
+ H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
+ H5AC_protect_t rw, hbool_t *did_protect);
+H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
+ unsigned cache_flags, hbool_t did_protect);
H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
haddr_t dblock_addr);
H5_DLL herr_t H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry);
@@ -598,13 +606,13 @@ H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
haddr_t dblock_addr, size_t dblock_size,
H5HF_indirect_t *par_iblock, unsigned par_entry,
H5AC_protect_t rw);
+H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id,
+ hsize_t obj_off, H5HF_indirect_t **par_iblock,
+ unsigned *par_entry, hbool_t *par_did_protect, H5AC_protect_t rw);
H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
hsize_t dblock_size);
/* Managed object routines */
-H5_DLL herr_t H5HF_man_locate_block(H5HF_hdr_t *hdr, hid_t dxpl_id,
- hsize_t obj_off, hbool_t locate_indirect, H5HF_indirect_t **par_iblock,
- unsigned *par_entry, H5AC_protect_t rw);
H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
const void *obj, void *id);
H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,