HDF5  1.12.0
H5B2pkg.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
16  * Monday, January 31, 2005
17  *
18  * Purpose: This file contains declarations which are visible only within
19  * the H5B2 package. Source files outside the H5B2 package should
20  * include H5B2private.h instead.
21  */
22 #if !(defined H5B2_FRIEND || defined H5B2_MODULE)
23 #error "Do not include this file outside the H5B2 package!"
24 #endif
25 
26 #ifndef _H5B2pkg_H
27 #define _H5B2pkg_H
28 
29 /* Get package's private header */
30 #include "H5B2private.h"
31 
32 /* Other private headers needed by this file */
33 #include "H5ACprivate.h" /* Metadata cache */
34 #include "H5FLprivate.h" /* Free Lists */
35 
36 
37 /**************************/
38 /* Package Private Macros */
39 /**************************/
40 
41 /* Size of storage for number of records per node (on disk) */
42 #define H5B2_SIZEOF_RECORDS_PER_NODE (unsigned)2
43 
44 /* Size of a "tree pointer" (on disk) */
45 /* (essentially, the largest internal pointer allowed) */
46 #define H5B2_TREE_POINTER_SIZE(sizeof_addr, sizeof_size) ( \
47  (sizeof_addr) + \
48  H5B2_SIZEOF_RECORDS_PER_NODE + \
49  (sizeof_size) \
50  )
51 
52 /* Size of a internal node pointer (on disk) */
53 #define H5B2_INT_POINTER_SIZE(h, d) ( \
54  (unsigned)(h)->sizeof_addr /* Address of child node */ \
55  + (h)->max_nrec_size /* # of records in child node */ \
56  + (h)->node_info[(d) - 1].cum_max_nrec_size /* Total # of records in child & below */ \
57  )
58 
59 /* Size of checksum information (on disk) */
60 #define H5B2_SIZEOF_CHKSUM 4
61 
62 /* Format overhead for all v2 B-tree metadata in the file */
63 #define H5B2_METADATA_PREFIX_SIZE ( \
64  (unsigned)H5_SIZEOF_MAGIC /* Signature */ \
65  + (unsigned)1 /* Version */ \
66  + (unsigned)1 /* Tree type */ \
67  + (unsigned)H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \
68  )
69 
70 /* Size of the v2 B-tree header on disk */
71 #define H5B2_HEADER_SIZE(sizeof_addr, sizeof_size) ( \
72  /* General metadata fields */ \
73  H5B2_METADATA_PREFIX_SIZE \
74  \
75  /* Header specific fields */ \
76  + (unsigned)4 /* Node size, in bytes */ \
77  + (unsigned)2 /* Record size, in bytes */ \
78  + (unsigned)2 /* Depth of tree */ \
79  + (unsigned)1 /* Split % of full (as integer, ie. "98" means 98%) */ \
80  + (unsigned)1 /* Merge % of full (as integer, ie. "98" means 98%) */ \
81  + H5B2_TREE_POINTER_SIZE(sizeof_addr, sizeof_size) /* Node pointer to root node in tree */ \
82  )
83 
84 /* Size of the v2 B-tree header on disk (via file pointer) */
85 #define H5B2_HEADER_SIZE_FILE(f) ( \
86  H5B2_HEADER_SIZE(H5F_SIZEOF_ADDR(f), H5F_SIZEOF_SIZE(f)) \
87  )
88 
89 /* Size of the v2 B-tree header on disk (via v2 B-tree header) */
90 #define H5B2_HEADER_SIZE_HDR(h) ( \
91  H5B2_HEADER_SIZE((h)->sizeof_addr, (h)->sizeof_size) \
92  )
93 
94 /* Size of the v2 B-tree internal node prefix */
95 #define H5B2_INT_PREFIX_SIZE ( \
96  /* General metadata fields */ \
97  H5B2_METADATA_PREFIX_SIZE \
98  \
99  /* Header specific fields */ \
100  /* <none> */ \
101  )
102 
103 /* Size of the v2 B-tree leaf node prefix */
104 #define H5B2_LEAF_PREFIX_SIZE ( \
105  /* General metadata fields */ \
106  H5B2_METADATA_PREFIX_SIZE \
107  \
108  /* Header specific fields */ \
109  /* <none> */ \
110  )
111 
112 /* Macro to retrieve pointer to i'th native record for native record buffer */
113 #define H5B2_NAT_NREC(b, hdr, idx) ((b) + (hdr)->nat_off[(idx)])
114 
115 /* Macro to retrieve pointer to i'th native record for internal node */
116 #define H5B2_INT_NREC(i, hdr, idx) H5B2_NAT_NREC((i)->int_native, (hdr), (idx))
117 
118 /* Macro to retrieve pointer to i'th native record for leaf node */
119 #define H5B2_LEAF_NREC(l, hdr, idx) H5B2_NAT_NREC((l)->leaf_native, (hdr), (idx))
120 
121 /* Number of records that fit into internal node */
122 /* (accounts for extra node pointer by counting it in with the prefix bytes) */
123 #define H5B2_NUM_INT_REC(h, d) \
124  (((h)->node_size - (H5B2_INT_PREFIX_SIZE + H5B2_INT_POINTER_SIZE(h, d))) / ((h)->rrec_size + H5B2_INT_POINTER_SIZE(h, d)))
125 
126 /* Uncomment this macro to enable extra sanity checking */
127 /* #define H5B2_DEBUG */
128 
129 
130 /****************************/
131 /* Package Private Typedefs */
132 /****************************/
133 
134 /* A "node pointer" to another B-tree node */
135 typedef struct {
136  haddr_t addr; /* Address of other node */
137  uint16_t node_nrec; /* Number of records used in node pointed to */
138  hsize_t all_nrec; /* Number of records in node pointed to and all it's children */
140 
141 /* Information about a node at a given depth */
142 typedef struct {
143  unsigned max_nrec; /* Max. number of records in node */
144  unsigned split_nrec; /* Number of records to split node at */
145  unsigned merge_nrec; /* Number of records to merge node at */
146  hsize_t cum_max_nrec; /* Cumulative max. # of records below this node's depth */
147  uint8_t cum_max_nrec_size; /* Size to store cumulative max. # of records for this node (in bytes) */
148  H5FL_fac_head_t *nat_rec_fac; /* Factory for native record blocks */
149  H5FL_fac_head_t *node_ptr_fac; /* Factory for node pointer blocks */
151 
152 /* The B-tree header information */
153 typedef struct H5B2_hdr_t {
154  /* Information for H5AC cache functions, _must_ be first field in structure */
156 
157  /* Internal B-tree information (stored) */
158  H5B2_node_ptr_t root; /* Node pointer to root node in B-tree */
159 
160  /* Information set by user (stored) */
161  uint8_t split_percent; /* Percent full at which to split the node, when inserting */
162  uint8_t merge_percent; /* Percent full at which to merge the node, when deleting */
163  uint32_t node_size; /* Size of B-tree nodes, in bytes */
164  uint32_t rrec_size; /* Size of "raw" (on disk) record, in bytes */
165 
166  /* Dynamic information (stored) */
167  uint16_t depth; /* B-tree's overall depth */
168 
169  /* Derived information from user's information (not stored) */
170  uint8_t max_nrec_size; /* Size to store max. # of records in any node (in bytes) */
171 
172  /* Shared internal data structures (not stored) */
173  H5F_t *f; /* Pointer to the file that the B-tree is in */
174  haddr_t addr; /* Address of B-tree header in the file */
175  size_t hdr_size; /* Size of the B-tree header on disk */
176  size_t rc; /* Reference count of nodes using this header */
177  size_t file_rc; /* Reference count of files using this header */
178  hbool_t pending_delete; /* B-tree is pending deletion */
179  uint8_t sizeof_size; /* Size of file sizes */
180  uint8_t sizeof_addr; /* Size of file addresses */
181  H5B2_remove_t remove_op; /* Callback operator for deleting B-tree */
182  void *remove_op_data;/* B-tree deletion callback's context */
183  uint8_t *page; /* Common disk page for I/O */
184  size_t *nat_off; /* Array of offsets of native records */
185  H5B2_node_info_t *node_info; /* Table of node info structs for current depth of B-tree */
186  void *min_native_rec; /* Pointer to minimum native record */
187  void *max_native_rec; /* Pointer to maximum native record */
188 
189  /* SWMR / Flush dependency information (not stored) */
190  hbool_t swmr_write; /* Whether we are doing SWMR writes */
191  H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all B-tree entries */
192  void *parent; /* Pointer to 'top' proxy flush dependency
193  * parent, if it exists, otherwise NULL.
194  * If the v2 B-tree is being used to index a
195  * chunked dataset and the dataset metadata is
196  * modified by a SWMR writer, this field will
197  * be set equal to the object header proxy
198  * that is the flush dependency parent
199  * of the v2 B-tree header.
200  *
201  * The field is used to avoid duplicate setups
202  * of the flush dependency relationship, and to
203  * allow the v2 B-tree header to destroy the
204  * flush dependency on receipt of an eviction
205  * notification from the metadata cache.
206  */
207  uint64_t shadow_epoch; /* Epoch of header, for making shadow copies */
208 
209  /* Client information (not stored) */
210  const H5B2_class_t *cls; /* Class of B-tree client */
211  void *cb_ctx; /* Client callback context */
213 
214 /* B-tree leaf node information */
215 typedef struct H5B2_leaf_t {
216  /* Information for H5AC cache functions, _must_ be first field in structure */
218 
219  /* Internal B-tree information */
220  H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
221  uint8_t *leaf_native; /* Pointer to native records */
222  uint16_t nrec; /* Number of records in node */
223 
224  /* SWMR / Flush dependency information (not stored) */
225  H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all B-tree entries */
226  void *parent; /* Flush dependency parent for leaf */
227  uint64_t shadow_epoch; /* Epoch of node, for making shadow copies */
229 
230 /* B-tree internal node information */
231 typedef struct H5B2_internal_t {
232  /* Information for H5AC cache functions, _must_ be first field in structure */
234 
235  /* Internal B-tree information */
236  H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
237  uint8_t *int_native; /* Pointer to native records */
238  H5B2_node_ptr_t *node_ptrs; /* Pointer to node pointers */
239  uint16_t nrec; /* Number of records in node */
240  uint16_t depth; /* Depth of this node in the B-tree */
241 
242  /* SWMR / Flush dependency information (not stored) */
243  H5AC_proxy_entry_t *top_proxy; /* 'Top' proxy cache entry for all B-tree entries */
244  void *parent; /* Flush dependency parent for internal node */
245  uint64_t shadow_epoch; /* Epoch of node, for making shadow copies */
247 
248 /* v2 B-tree */
249 struct H5B2_t {
250  H5B2_hdr_t *hdr; /* Pointer to internal v2 B-tree header info */
251  H5F_t *f; /* Pointer to file for v2 B-tree */
252 };
253 
254 /* Node position, for min/max determination */
255 typedef enum H5B2_nodepos_t {
256  H5B2_POS_ROOT, /* Node is root (i.e. both right & left-most in tree) */
257  H5B2_POS_RIGHT, /* Node is right-most in tree, at a given depth */
258  H5B2_POS_LEFT, /* Node is left-most in tree, at a given depth */
259  H5B2_POS_MIDDLE /* Node is neither right or left-most in tree */
261 
262 /* Update status */
263 typedef enum H5B2_update_status_t {
264  H5B2_UPDATE_UNKNOWN, /* Unknown update status (initial state) */
265  H5B2_UPDATE_MODIFY_DONE, /* Update successfully modified existing record */
266  H5B2_UPDATE_SHADOW_DONE, /* Update modified existing record and modified node was shadowed */
267  H5B2_UPDATE_INSERT_DONE, /* Update inserted record successfully */
268  H5B2_UPDATE_INSERT_CHILD_FULL /* Update will insert record, but child is full */
270 
271 /* Callback info for loading a v2 B-tree header into the cache */
272 typedef struct H5B2_hdr_cache_ud_t {
273  H5F_t *f; /* File that v2 b-tree header is within */
274  haddr_t addr; /* Address of B-tree header in the file */
275  void *ctx_udata; /* User-data for protecting */
277 
278 /* Callback info for loading a v2 B-tree internal node into the cache */
279 typedef struct H5B2_internal_cache_ud_t {
280  H5F_t *f; /* File that v2 b-tree header is within */
281  H5B2_hdr_t *hdr; /* v2 B-tree header */
282  void *parent; /* Flush dependency parent */
283  uint16_t nrec; /* Number of records in node to load */
284  uint16_t depth; /* Depth of node to load */
286 
287 /* Callback info for loading a v2 B-tree leaf node into the cache */
288 typedef struct H5B2_leaf_cache_ud_t {
289  H5F_t *f; /* File that v2 b-tree header is within */
290  H5B2_hdr_t *hdr; /* v2 B-tree header */
291  void *parent; /* Flush dependency parent */
292  uint16_t nrec; /* Number of records in node to load */
294 
295 #ifdef H5B2_TESTING
296 /* Node information for testing */
297 typedef struct H5B2_node_info_test_t {
298  uint16_t depth; /* Depth of node */
299  uint16_t nrec; /* Number of records in node */
300 } H5B2_node_info_test_t;
301 #endif /* H5B2_TESTING */
302 
303 
304 /*****************************/
305 /* Package Private Variables */
306 /*****************************/
307 
308 /* Declare a free list to manage the H5B2_internal_t struct */
310 
311 /* Declare a free list to manage the H5B2_leaf_t struct */
313 
314 /* Internal v2 B-tree testing class */
315 #ifdef H5B2_TESTING
318 
319 /* B-tree record for testing H5B2_TEST2 class */
320 typedef struct H5B2_test_rec_t {
321  hsize_t key; /* Key for record */
322  hsize_t val; /* Value for record */
323 } H5B2_test_rec_t;
324 #endif /* H5B2_TESTING */
325 
326 /* Array of v2 B-tree client ID -> client class mappings */
328 
329 
330 /******************************/
331 /* Package Private Prototypes */
332 /******************************/
333 
334 /* Generic routines */
336  H5AC_info_t *child_entry);
338  const H5B2_node_ptr_t *node_ptr, void *old_parent, void *new_parent);
340  H5AC_info_t *child_entry);
341 
342 /* Internal node management routines */
344  unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
345  unsigned *internal_flags_ptr, unsigned idx);
347  H5B2_internal_t *internal, unsigned idx);
349  H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx);
351  unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
352  unsigned *internal_flags_ptr, unsigned idx);
354  unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal,
355  unsigned *internal_flags_ptr, unsigned idx);
356 
357 /* Routines for managing B-tree header info */
359 H5_DLL haddr_t H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata);
361  void *ctx_udata, uint16_t depth);
368  void *ctx_udata, unsigned flags);
371 
372 /* Routines for operating on leaf nodes */
374  H5B2_node_ptr_t *node_ptr, hbool_t shadow, unsigned flags);
376  unsigned *internal_flags_ptr, unsigned idx, void *swap_loc);
377 
378 /* Routines for operating on internal nodes */
380  H5B2_node_ptr_t *node_ptr, uint16_t depth, hbool_t shadow, unsigned flags);
381 
382 /* Routines for allocating nodes */
385  H5B2_node_ptr_t *node_ptr);
387  H5B2_node_ptr_t *node_ptr, uint16_t depth);
388 
389 /* Routines for releasing structures */
393 
394 /* Routines for inserting records */
395 H5_DLL herr_t H5B2__insert(H5B2_hdr_t *hdr, void *udata);
397  unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
398  H5B2_nodepos_t curr_pos, void *parent, void *udata);
400  H5B2_nodepos_t curr_pos, void *parent, void *udata);
401 
402 /* Routines for update records */
404  unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
405  H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent,
406  void *udata, H5B2_modify_t op, void *op_data);
408  H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent,
409  void *udata, H5B2_modify_t op, void *op_data);
410 
411 /* Routines for iterating over nodes/records */
413  const H5B2_node_ptr_t *curr_node, void *parent, H5B2_operator_t op, void *op_data);
415  const H5B2_node_ptr_t *curr_node, void *parent, hsize_t *op_data);
416 
417 /* Routines for locating records */
418 H5_DLL herr_t H5B2__locate_record(const H5B2_class_t *type, unsigned nrec,
419  size_t *rec_off, const uint8_t *native, const void *udata, unsigned *idx, int *result);
421  H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp,
422  void *parent, void *udata, H5B2_found_t op, void *op_data);
424  void *neighbor_loc, H5B2_compare_t comp, void *parent, void *udata,
425  H5B2_found_t op, void *op_data);
426 
427 /* Routines for removing records */
429  void *swap_loc, void *swap_parent, uint16_t depth, H5AC_info_t *parent_cache_info,
430  unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos,
431  H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op,
432  void *op_data);
434  H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op,
435  void *op_data);
437  hbool_t *depth_decreased, void *swap_loc, void *swap_parent, uint16_t depth,
438  H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
439  H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
440  H5B2_remove_t op, void *op_data);
442  H5B2_nodepos_t curr_pos, void *parent, unsigned idx, H5B2_remove_t op,
443  void *op_data);
444 
445 /* Routines for deleting nodes */
447  const H5B2_node_ptr_t *curr_node, void *parent, H5B2_remove_t op,
448  void *op_data);
449 
450 /* Debugging routines for dumping file structures */
452  int fwidth, const H5B2_class_t *type, haddr_t obj_addr);
454  int fwidth, const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth,
455  haddr_t obj_addr);
457  int fwidth, const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr);
458 
459 /* Sanity checking routines */
460 #ifdef H5B2_DEBUG
461 /* Don't label these with H5_ATTR_PURE or you'll get even more warnings... */
462 H5_DLL herr_t H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal);
463 H5_DLL herr_t H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2);
464 H5_DLL herr_t H5B2__assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf);
465 H5_DLL herr_t H5B2__assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_leaf_t *leaf2);
466 #endif /* H5B2_DEBUG */
467 
468 /* Testing routines */
469 #ifdef H5B2_TESTING
471 H5_DLL int H5B2__get_node_depth_test(H5B2_t *bt2, void *udata);
472 H5_DLL herr_t H5B2__get_node_info_test(H5B2_t *bt2, void *udata,
473  H5B2_node_info_test_t *ninfo);
474 #endif /* H5B2_TESTING */
475 
476 #endif /* _H5B2pkg_H */
477 
H5B2__int_debug
H5_DLL herr_t H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr)
H5B2_create_t
Definition: H5B2private.h:99
H5B2_internal_t::depth
uint16_t depth
Definition: H5B2pkg.h:240
H5B2_hdr_cache_ud_t::addr
haddr_t addr
Definition: H5B2pkg.h:274
H5B2_leaf_t
struct H5B2_leaf_t H5B2_leaf_t
H5B2_internal_t::int_native
uint8_t * int_native
Definition: H5B2pkg.h:237
H5FL_EXTERN
H5FL_EXTERN(H5B2_internal_t)
H5B2__hdr_incr
H5_DLL herr_t H5B2__hdr_incr(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:364
H5B2_hdr_t::file_rc
size_t file_rc
Definition: H5B2pkg.h:177
H5B2__split1
H5_DLL herr_t H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
Definition: H5B2int.c:150
H5B2_hdr_t::cls
const H5B2_class_t * cls
Definition: H5B2pkg.h:210
H5B2__get_node_info_test
herr_t H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
Definition: H5B2test.c:512
H5B2_hdr_t::split_percent
uint8_t split_percent
Definition: H5B2pkg.h:161
H5B2_nodepos_t
H5B2_nodepos_t
Definition: H5B2pkg.h:255
f
hdr f
Definition: H5EA.c:755
H5B2_leaf_cache_ud_t::nrec
uint16_t nrec
Definition: H5B2pkg.h:292
H5B2_hdr_t::hdr_size
size_t hdr_size
Definition: H5B2pkg.h:175
H5B2_remove_t
herr_t(* H5B2_remove_t)(const void *record, void *op_data)
Definition: H5B2private.h:69
H5B2_leaf_t
Definition: H5B2pkg.h:215
H5B2__hdr_unprotect
H5_DLL herr_t H5B2__hdr_unprotect(H5B2_hdr_t *hdr, unsigned cache_flags)
Definition: H5B2hdr.c:591
H5B2_hdr_cache_ud_t
Definition: H5B2pkg.h:272
H5B2_TEST
const H5B2_class_t H5B2_TEST[1]
Definition: H5B2test.c:86
H5B2_node_info_t::merge_nrec
unsigned merge_nrec
Definition: H5B2pkg.h:145
H5B2_t
Definition: H5B2pkg.h:249
H5B2__hdr_decr
H5_DLL herr_t H5B2__hdr_decr(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:400
H5B2_internal_t::cache_info
H5AC_info_t cache_info
Definition: H5B2pkg.h:233
H5B2_leaf_t::top_proxy
H5AC_proxy_entry_t * top_proxy
Definition: H5B2pkg.h:225
H5B2_POS_MIDDLE
@ H5B2_POS_MIDDLE
Definition: H5B2pkg.h:259
H5B2_hdr_t::root
H5B2_node_ptr_t root
Definition: H5B2pkg.h:158
H5B2__delete_node
H5_DLL herr_t H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent, H5B2_remove_t op, void *op_data)
Definition: H5B2int.c:1621
H5B2_hdr_cache_ud_t
struct H5B2_hdr_cache_ud_t H5B2_hdr_cache_ud_t
H5B2_node_info_t::nat_rec_fac
H5FL_fac_head_t * nat_rec_fac
Definition: H5B2pkg.h:148
H5B2__hdr_delete
H5_DLL herr_t H5B2__hdr_delete(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:700
H5B2_UPDATE_MODIFY_DONE
@ H5B2_UPDATE_MODIFY_DONE
Definition: H5B2pkg.h:265
H5B2_hdr_t
Definition: H5B2pkg.h:153
uint32_t
uint32_t
Definition: H5overflow.txt:38
H5B2_hdr_t::depth
uint16_t depth
Definition: H5B2pkg.h:167
H5B2__locate_record
H5_DLL herr_t H5B2__locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off, const uint8_t *native, const void *udata, unsigned *idx, int *result)
Definition: H5B2int.c:106
H5B2__hdr_protect
H5_DLL H5B2_hdr_t * H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, unsigned flags)
Definition: H5B2hdr.c:526
haddr_t
CATCH haddr_t
Definition: H5EAdblock.c:162
H5B2_node_info_t::node_ptr_fac
H5FL_fac_head_t * node_ptr_fac
Definition: H5B2pkg.h:149
indent
*s *s indent
Definition: H5HLdbg.c:111
H5B2_hdr_t::cache_info
H5AC_info_t cache_info
Definition: H5B2pkg.h:155
H5B2_internal_t::parent
void * parent
Definition: H5B2pkg.h:244
H5B2_node_info_t::split_nrec
unsigned split_nrec
Definition: H5B2pkg.h:144
H5B2_hdr_t::rrec_size
uint32_t rrec_size
Definition: H5B2pkg.h:164
H5B2_node_ptr_t::all_nrec
hsize_t all_nrec
Definition: H5B2pkg.h:138
result
Definition: H5Ztrans.c:67
H5B2_leaf_t::nrec
uint16_t nrec
Definition: H5B2pkg.h:222
H5B2__split_root
H5_DLL herr_t H5B2__split_root(H5B2_hdr_t *hdr)
Definition: H5B2int.c:345
H5B2_internal_t::shadow_epoch
uint64_t shadow_epoch
Definition: H5B2pkg.h:245
H5_DLLVAR
#define H5_DLLVAR
Definition: H5api_adpt.h:235
H5B2__hdr_alloc
H5_DLL H5B2_hdr_t * H5B2__hdr_alloc(H5F_t *f)
Definition: H5B2hdr.c:239
H5B2_internal_t
Definition: H5B2pkg.h:231
H5B2_hdr_t::min_native_rec
void * min_native_rec
Definition: H5B2pkg.h:186
H5B2__create_internal
H5_DLL herr_t H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, uint16_t depth)
Definition: H5B2internal.c:96
H5B2_leaf_cache_ud_t::parent
void * parent
Definition: H5B2pkg.h:291
H5B2__create_leaf
H5_DLL herr_t H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
Definition: H5B2leaf.c:97
H5B2_node_ptr_t
Definition: H5B2pkg.h:135
H5B2_hdr_t::f
H5F_t * f
Definition: H5B2pkg.h:173
H5B2_node_info_t::max_nrec
unsigned max_nrec
Definition: H5B2pkg.h:143
H5B2_hdr_t::remove_op_data
void * remove_op_data
Definition: H5B2pkg.h:182
H5B2_UPDATE_SHADOW_DONE
@ H5B2_UPDATE_SHADOW_DONE
Definition: H5B2pkg.h:266
H5B2_internal_cache_ud_t
struct H5B2_internal_cache_ud_t H5B2_internal_cache_ud_t
uint8_t
unsigned char uint8_t
Definition: H5private.h:429
H5B2_hdr_t::rc
size_t rc
Definition: H5B2pkg.h:176
H5B2_leaf_t::shadow_epoch
uint64_t shadow_epoch
Definition: H5B2pkg.h:227
hdr
hdr
Definition: H5EAhdr.c:821
H5B2__get_root_addr_test
herr_t H5B2__get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
Definition: H5B2test.c:484
H5AC_proxy_entry_t
Definition: H5ACprivate.h:203
H5B2_node_info_t::cum_max_nrec
hsize_t cum_max_nrec
Definition: H5B2pkg.h:146
H5FL_fac_head_t
Definition: H5FLprivate.h:354
H5B2__update_flush_depend
H5_DLL herr_t H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t *node_ptr, void *old_parent, void *new_parent)
Definition: H5B2int.c:1788
H5B2_hdr_t::top_proxy
H5AC_proxy_entry_t * top_proxy
Definition: H5B2pkg.h:191
H5B2_internal_cache_ud_t::hdr
H5B2_hdr_t * hdr
Definition: H5B2pkg.h:281
H5B2_hdr_t::swmr_write
hbool_t swmr_write
Definition: H5B2pkg.h:190
H5B2_t::hdr
H5B2_hdr_t * hdr
Definition: H5B2pkg.h:250
H5B2_client_class_g
const H5B2_class_t *const H5B2_client_class_g[H5B2_NUM_BTREE_ID]
Definition: H5B2.c:92
H5B2_leaf_t::cache_info
H5AC_info_t cache_info
Definition: H5B2pkg.h:217
H5B2_hdr_t::sizeof_addr
uint8_t sizeof_addr
Definition: H5B2pkg.h:180
H5B2__insert
H5_DLL herr_t H5B2__insert(H5B2_hdr_t *hdr, void *udata)
Definition: H5B2int.c:1446
H5B2__remove_leaf
H5_DLL herr_t H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op, void *op_data)
Definition: H5B2leaf.c:774
H5B2_hdr_t::page
uint8_t * page
Definition: H5B2pkg.h:183
H5B2_internal_cache_ud_t::nrec
uint16_t nrec
Definition: H5B2pkg.h:283
H5B2_leaf_cache_ud_t
struct H5B2_leaf_cache_ud_t H5B2_leaf_cache_ud_t
H5B2_hdr_t::node_info
H5B2_node_info_t * node_info
Definition: H5B2pkg.h:185
H5B2__protect_internal
H5_DLL H5B2_internal_t * H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, uint16_t depth, hbool_t shadow, unsigned flags)
Definition: H5B2internal.c:192
H5B2__remove_internal
H5_DLL herr_t H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, void *swap_parent, uint16_t depth, H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr, H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata, H5B2_remove_t op, void *op_data)
Definition: H5B2internal.c:791
H5B2_UPDATE_INSERT_CHILD_FULL
@ H5B2_UPDATE_INSERT_CHILD_FULL
Definition: H5B2pkg.h:268
uint16_t
uint16_t
Definition: H5overflow.txt:37
FILE
Invalid arguments to routine Resource unavailable Internal File accessibility Low level I O Function entry exit Object atom Object cache Links B Tree node Symbol table Heap Object header Datatype Dataspace Dataset Data storage Property lists Attribute Data filters External file list References Virtual File Layer Virtual Object Layer Ternary Search Trees Reference Counted Strings Error API Skip Lists Free Space Manager Shared Object Header Messages Extensible Array Fixed Array Plugin for dynamically loaded library Page Buffering API Context Map No error Argument errors Resource errors File accessibility errors FILE
Definition: H5err.txt:88
H5ACprivate.h
H5B2_hdr_t::merge_percent
uint8_t merge_percent
Definition: H5B2pkg.h:162
H5B2__redistribute3
H5_DLL herr_t H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
Definition: H5B2int.c:667
H5B2_hdr_t::max_native_rec
void * max_native_rec
Definition: H5B2pkg.h:187
H5B2__leaf_debug
H5_DLL herr_t H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr)
H5B2_internal_t::nrec
uint16_t nrec
Definition: H5B2pkg.h:239
H5B2_hdr_t::cb_ctx
void * cb_ctx
Definition: H5B2pkg.h:211
H5B2_TEST2
const H5B2_class_t H5B2_TEST2[1]
Definition: H5B2test.c:100
H5B2_found_t
herr_t(* H5B2_found_t)(const void *record, void *op_data)
Definition: H5B2private.h:63
H5B2__hdr_init
H5_DLL herr_t H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, uint16_t depth)
Definition: H5B2hdr.c:110
H5B2_POS_LEFT
@ H5B2_POS_LEFT
Definition: H5B2pkg.h:258
H5B2_internal_t::hdr
H5B2_hdr_t * hdr
Definition: H5B2pkg.h:236
H5B2_internal_cache_ud_t::f
H5F_t * f
Definition: H5B2pkg.h:280
H5B2_node_info_t::cum_max_nrec_size
uint8_t cum_max_nrec_size
Definition: H5B2pkg.h:147
uint64_t
uint64_t
Definition: H5overflow.txt:39
fwidth
*s *s fwidth
Definition: H5HLdbg.c:111
H5B2__get_node_depth_test
int H5B2__get_node_depth_test(H5B2_t *bt2, void *udata)
Definition: H5B2test.c:665
H5B2_hdr_t::nat_off
size_t * nat_off
Definition: H5B2pkg.h:184
H5B2_hdr_t::pending_delete
hbool_t pending_delete
Definition: H5B2pkg.h:178
H5B2_leaf_t::leaf_native
uint8_t * leaf_native
Definition: H5B2pkg.h:221
H5B2_hdr_t::remove_op
H5B2_remove_t remove_op
Definition: H5B2pkg.h:181
H5B2__merge3
H5_DLL herr_t H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
Definition: H5B2int.c:1204
H5B2_leaf_t::parent
void * parent
Definition: H5B2pkg.h:226
H5B2_internal_cache_ud_t::parent
void * parent
Definition: H5B2pkg.h:282
H5B2__update_internal
H5_DLL herr_t H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_modify_t op, void *op_data)
Definition: H5B2internal.c:522
H5B2_UPDATE_INSERT_DONE
@ H5B2_UPDATE_INSERT_DONE
Definition: H5B2pkg.h:267
H5B2__hdr_dirty
H5_DLL herr_t H5B2__hdr_dirty(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:494
H5B2__node_size
H5_DLL herr_t H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent, hsize_t *op_data)
Definition: H5B2int.c:1701
H5B2_hdr_t::shadow_epoch
uint64_t shadow_epoch
Definition: H5B2pkg.h:207
H5B2__redistribute2
H5_DLL herr_t H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned idx)
Definition: H5B2int.c:423
H5B2__hdr_fuse_decr
H5_DLL size_t H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:465
H5B2_leaf_cache_ud_t::hdr
H5B2_hdr_t * hdr
Definition: H5B2pkg.h:290
H5B2_node_ptr_t::addr
haddr_t addr
Definition: H5B2pkg.h:136
H5B2_POS_ROOT
@ H5B2_POS_ROOT
Definition: H5B2pkg.h:256
H5B2_internal_cache_ud_t
Definition: H5B2pkg.h:279
H5B2_NUM_BTREE_ID
@ H5B2_NUM_BTREE_ID
Definition: H5B2private.h:56
H5B2__remove_leaf_by_idx
H5_DLL herr_t H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, unsigned idx, H5B2_remove_t op, void *op_data)
Definition: H5B2leaf.c:883
H5B2__hdr_fuse_incr
H5_DLL herr_t H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:437
H5B2_POS_RIGHT
@ H5B2_POS_RIGHT
Definition: H5B2pkg.h:257
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5B2_internal_t::node_ptrs
H5B2_node_ptr_t * node_ptrs
Definition: H5B2pkg.h:238
H5B2_compare_t
H5B2_compare_t
Definition: H5B2private.h:72
H5B2__protect_leaf
H5_DLL H5B2_leaf_t * H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, hbool_t shadow, unsigned flags)
Definition: H5B2leaf.c:183
H5B2_hdr_t::addr
haddr_t addr
Definition: H5B2pkg.h:174
H5B2_node_ptr_t::node_nrec
uint16_t node_nrec
Definition: H5B2pkg.h:137
H5B2__create_flush_depend
H5_DLL herr_t H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
Definition: H5B2int.c:1755
H5B2__internal_free
H5_DLL herr_t H5B2__internal_free(H5B2_internal_t *i)
Definition: H5B2internal.c:1309
H5B2__leaf_free
H5_DLL herr_t H5B2__leaf_free(H5B2_leaf_t *l)
Definition: H5B2leaf.c:985
H5F_t
Definition: H5Fpkg.h:374
cache_flags
cache_flags
Definition: H5EAhdr.c:749
H5B2_update_status_t
H5B2_update_status_t
Definition: H5B2pkg.h:263
H5B2__merge2
H5_DLL herr_t H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx)
Definition: H5B2int.c:1041
H5B2_UPDATE_UNKNOWN
@ H5B2_UPDATE_UNKNOWN
Definition: H5B2pkg.h:264
n
*s *s n
Definition: H5HLdbg.c:111
H5B2_operator_t
int(* H5B2_operator_t)(const void *record, void *op_data)
Definition: H5B2private.h:60
H5B2__hdr_debug
H5_DLL herr_t H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t obj_addr)
H5B2__insert_leaf
H5_DLL herr_t H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, void *udata)
Definition: H5B2leaf.c:349
H5FLprivate.h
H5B2__destroy_flush_depend
H5_DLL herr_t H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
Definition: H5B2int.c:1927
H5B2_internal_cache_ud_t::depth
uint16_t depth
Definition: H5B2pkg.h:284
H5B2__neighbor_internal
H5_DLL herr_t H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp, void *parent, void *udata, H5B2_found_t op, void *op_data)
Definition: H5B2internal.c:286
herr_t
int herr_t
Definition: H5public.h:128
H5B2_internal_t
struct H5B2_internal_t H5B2_internal_t
H5B2__hdr_free
H5_DLL herr_t H5B2__hdr_free(H5B2_hdr_t *hdr)
Definition: H5B2hdr.c:623
H5B2_node_info_t
Definition: H5B2pkg.h:142
H5B2_hdr_t::sizeof_size
uint8_t sizeof_size
Definition: H5B2pkg.h:179
H5B2_leaf_cache_ud_t
Definition: H5B2pkg.h:288
H5B2_internal_t::top_proxy
H5AC_proxy_entry_t * top_proxy
Definition: H5B2pkg.h:243
H5B2_hdr_cache_ud_t::ctx_udata
void * ctx_udata
Definition: H5B2pkg.h:275
H5B2_hdr_t::parent
void * parent
Definition: H5B2pkg.h:192
H5B2_hdr_t
struct H5B2_hdr_t H5B2_hdr_t
hbool_t
bool hbool_t
Definition: H5public.h:159
H5B2__iterate_node
H5_DLL herr_t H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent, H5B2_operator_t op, void *op_data)
Definition: H5B2int.c:1506
H5B2__swap_leaf
H5_DLL herr_t H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx, void *swap_loc)
Definition: H5B2leaf.c:617
H5B2__neighbor_leaf
H5_DLL herr_t H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc, H5B2_compare_t comp, void *parent, void *udata, H5B2_found_t op, void *op_data)
Definition: H5B2leaf.c:275
H5C_cache_entry_t
Definition: H5Cprivate.h:1597
H5B2_hdr_cache_ud_t::f
H5F_t * f
Definition: H5B2pkg.h:273
H5B2__update_leaf
H5_DLL herr_t H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_modify_t op, void *op_data)
Definition: H5B2leaf.c:462
H5B2__remove_internal_by_idx
H5_DLL herr_t H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, void *swap_parent, uint16_t depth, H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n, H5B2_remove_t op, void *op_data)
Definition: H5B2internal.c:1024
hsize_t
hsize_t
Definition: H5overflow.txt:44
H5B2_class_t
Definition: H5B2private.h:82
H5B2__hdr_create
H5_DLL haddr_t H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
Definition: H5B2hdr.c:285
H5B2_leaf_t::hdr
H5B2_hdr_t * hdr
Definition: H5B2pkg.h:220
H5B2_leaf_cache_ud_t::f
H5F_t * f
Definition: H5B2pkg.h:289
H5B2_hdr_t::max_nrec_size
uint8_t max_nrec_size
Definition: H5B2pkg.h:170
H5B2_hdr_t::node_size
uint32_t node_size
Definition: H5B2pkg.h:163
H5B2_t::f
H5F_t * f
Definition: H5B2pkg.h:251
H5B2private.h
H5B2__insert_internal
H5_DLL herr_t H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, void *udata)
Definition: H5B2internal.c:359
H5B2_modify_t
herr_t(* H5B2_modify_t)(void *record, void *op_data, hbool_t *changed)
Definition: H5B2private.h:66