summaryrefslogtreecommitdiffstats
path: root/src/H5HFpkg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HFpkg.h')
-rw-r--r--src/H5HFpkg.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index f862fe0..2746302 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -123,18 +123,17 @@
)
/* Size of managed indirect block */
-#define H5HF_MAN_INDIRECT_SIZE(h, i) ( \
+#define H5HF_MAN_INDIRECT_SIZE(h, r) ( \
/* General metadata fields */ \
H5HF_METADATA_PREFIX_SIZE(TRUE) \
\
/* Fractal heap managed, absolutely mapped indirect block specific fields */ \
+ (h)->sizeof_addr /* File address of heap owning the block */ \
+ (h)->heap_off_size /* Offset of the block in the heap */ \
- + (MIN((i)->nrows, (h)->man_dtable.max_direct_rows) * (h)->man_dtable.cparam.width * H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h)) /* Size of entries for direct blocks */ \
- + ((((i)->nrows > (h)->man_dtable.max_direct_rows) ? ((i)->nrows - (h)->man_dtable.max_direct_rows) : 0) * (h)->man_dtable.cparam.width * (h)->sizeof_addr) /* Size of entries for indirect blocks */ \
+ + (MIN(r, (h)->man_dtable.max_direct_rows) * (h)->man_dtable.cparam.width * H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h)) /* Size of entries for direct blocks */ \
+ + (((r > (h)->man_dtable.max_direct_rows) ? (r - (h)->man_dtable.max_direct_rows) : 0) * (h)->man_dtable.cparam.width * (h)->sizeof_addr) /* Size of entries for indirect blocks */ \
)
-
/* Compute the # of bytes required to store an offset into a given buffer size */
#define H5HF_SIZEOF_OFFSET_BITS(b) (((b) + 7) / 8)
#define H5HF_SIZEOF_OFFSET_LEN(l) H5HF_SIZEOF_OFFSET_BITS(H5V_log2_of2((unsigned)(l)))
@@ -484,6 +483,13 @@ typedef struct H5HF_iblock_cache_ud_t {
typedef struct H5HF_dblock_cache_ud_t {
H5HF_parent_t par_info; /* Parent info */
H5F_t * f; /* File pointer */
+ size_t odi_size; /* On disk image size of the direct block.
+ * Note that there is no necessary relation
+ * between this value, and the actual
+ * direct block size, as conpression may
+ * reduce the size of the on disk image,
+ * and check sums may increase it.
+ */
size_t dblock_size; /* size of the direct block, which bears
* no necessary relation to the block
* odi_size -- the size of the on disk
@@ -571,6 +577,8 @@ H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start
/* Heap header routines */
H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f);
H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
+H5_DLL H5HF_hdr_t *H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+ H5AC_protect_t rw);
H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);