00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef H5HF_PACKAGE
00025 #error "Do not include this file outside the H5HF package!"
00026 #endif
00027
00028 #ifndef _H5HFpkg_H
00029 #define _H5HFpkg_H
00030
00031
00032 #include "H5HFprivate.h"
00033
00034
00035 #include "H5ACprivate.h"
00036 #include "H5B2private.h"
00037 #include "H5FLprivate.h"
00038 #include "H5FSprivate.h"
00039 #include "H5SLprivate.h"
00040
00041
00042
00043
00044
00045
00046 #define H5HF_SIZEOF_CHKSUM 4
00047
00048
00049 #define H5HF_METADATA_PREFIX_SIZE(c) ( \
00050 H5_SIZEOF_MAGIC \
00051 + 1 \
00052 + ((c) ? H5HF_SIZEOF_CHKSUM : 0) \
00053 )
00054
00055
00056 #define H5HF_DTABLE_INFO_SIZE(h) ( \
00057 2 \
00058 + (h)->sizeof_size \
00059 + (h)->sizeof_size \
00060 + 2 \
00061 + 2 \
00062 + (h)->sizeof_addr \
00063 + 2 \
00064 )
00065
00066
00067 #define H5HF_HDR_FLAGS_HUGE_ID_WRAPPED 0x01
00068 #define H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS 0x02
00069
00070
00071
00072
00073
00074 #define H5HF_HEADER_SIZE(h) ( \
00075 \
00076 H5HF_METADATA_PREFIX_SIZE(TRUE) \
00077 \
00078 \
00079 \
00080 \
00081 + 2 \
00082 + 2 \
00083 + 1 \
00084 \
00085 \
00086 + 4 \
00087 + (h)->sizeof_size \
00088 + (h)->sizeof_addr \
00089 \
00090 \
00091 + (h)->sizeof_size \
00092 + (h)->sizeof_addr \
00093 \
00094 \
00095 + (h)->sizeof_size \
00096 + (h)->sizeof_size \
00097 + (h)->sizeof_size \
00098 + (h)->sizeof_size \
00099 + (h)->sizeof_size \
00100 + (h)->sizeof_size \
00101 + (h)->sizeof_size \
00102 + (h)->sizeof_size \
00103 \
00104 \
00105 + H5HF_DTABLE_INFO_SIZE(h) \
00106 )
00107
00108
00109 #define H5HF_MAN_ABS_DIRECT_OVERHEAD(h) ( \
00110 \
00111 H5HF_METADATA_PREFIX_SIZE(h->checksum_dblocks) \
00112 \
00113 \
00114 + (h)->sizeof_addr \
00115 + (h)->heap_off_size \
00116 )
00117
00118
00119 #define H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h) ( \
00120 ((h)->filter_len > 0 ? \
00121 ((h)->sizeof_addr + (h)->sizeof_size + 4) : \
00122 (h)->sizeof_addr) \
00123 )
00124
00125
00126 #define H5HF_MAN_INDIRECT_SIZE(h, i) ( \
00127 \
00128 H5HF_METADATA_PREFIX_SIZE(TRUE) \
00129 \
00130 \
00131 + (h)->sizeof_addr \
00132 + (h)->heap_off_size \
00133 + (MIN((i)->nrows, (h)->man_dtable.max_direct_rows) * (h)->man_dtable.cparam.width * H5HF_MAN_INDIRECT_CHILD_DIR_ENTRY_SIZE(h)) \
00134 + ((((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) \
00135 )
00136
00137
00138
00139 #define H5HF_SIZEOF_OFFSET_BITS(b) (((b) + 7) / 8)
00140 #define H5HF_SIZEOF_OFFSET_LEN(l) H5HF_SIZEOF_OFFSET_BITS(H5V_log2_of2((unsigned)(l)))
00141
00142
00143
00144 #define H5HF_ID_VERS_CURR 0x00
00145 #define H5HF_ID_VERS_MASK 0xC0
00146
00147 #define H5HF_ID_TYPE_MAN 0x00
00148 #define H5HF_ID_TYPE_HUGE 0x10
00149 #define H5HF_ID_TYPE_TINY 0x20
00150 #define H5HF_ID_TYPE_RESERVED 0x30
00151 #define H5HF_ID_TYPE_MASK 0x30
00152
00153
00154
00155 #define H5HF_MAN_ID_ENCODE(i, h, o, l) \
00156 *(i) = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_MAN; \
00157 (i)++; \
00158 UINT64ENCODE_VAR((i), (o), (h)->heap_off_size); \
00159 UINT64ENCODE_VAR((i), (l), (h)->heap_len_size)
00160
00161
00162 #define H5HF_MAN_ID_DECODE(i, h, f, o, l) \
00163 f = *(uint8_t *)i++; \
00164 UINT64DECODE_VAR((i), (o), (h)->heap_off_size); \
00165 UINT64DECODE_VAR((i), (l), (h)->heap_len_size)
00166
00167
00168
00169 #define H5HF_FSPACE_SECT_SINGLE 0
00170 #define H5HF_FSPACE_SECT_FIRST_ROW 1
00171 #define H5HF_FSPACE_SECT_NORMAL_ROW 2
00172 #define H5HF_FSPACE_SECT_INDIRECT 3
00173
00174
00175 #define H5HF_OP_MODIFY 0x0001
00176 #define H5HF_OP_FLAGS (H5HF_OP_MODIFY)
00177
00178
00179
00180
00181
00182
00183 typedef struct H5HF_dtable_t {
00184
00185 H5HF_dtable_cparam_t cparam;
00186
00187
00188 haddr_t table_addr;
00189
00190 unsigned curr_root_rows;
00191
00192
00193
00194
00195
00196
00197 unsigned max_root_rows;
00198 unsigned max_direct_rows;
00199 unsigned start_bits;
00200 unsigned max_direct_bits;
00201 unsigned max_dir_blk_off_size;
00202 unsigned first_row_bits;
00203 hsize_t num_id_first_row;
00204 hsize_t *row_block_size;
00205 hsize_t *row_block_off;
00206 hsize_t *row_tot_dblock_free;
00207
00208
00209
00210
00211 size_t *row_max_dblock_free;
00212
00213
00214
00215
00216 } H5HF_dtable_t;
00217
00218
00219 typedef struct H5HF_freelist_t H5HF_freelist_t;
00220
00221
00222 typedef struct H5HF_indirect_t H5HF_indirect_t;
00223
00224
00225 typedef struct H5HF_block_loc_t {
00226
00227 unsigned row;
00228 unsigned col;
00229
00230
00231 unsigned entry;
00232
00233
00234 H5HF_indirect_t *context;
00235 struct H5HF_block_loc_t *up;
00236 } H5HF_block_loc_t;
00237
00238
00239 typedef struct H5HF_block_iter_t {
00240 hbool_t ready;
00241 H5HF_block_loc_t *curr;
00242 } H5HF_block_iter_t;
00243
00244
00245 typedef struct H5HF_free_section_t {
00246 H5FS_section_info_t sect_info;
00247 union {
00248 struct {
00249 H5HF_indirect_t *parent;
00250 unsigned par_entry;
00251 } single;
00252 struct {
00253 struct H5HF_free_section_t *under;
00254 unsigned row;
00255 unsigned col;
00256 unsigned num_entries;
00257
00258
00259 hbool_t checked_out;
00260 } row;
00261 struct {
00262
00263
00264
00265
00266
00267
00268 union {
00269 H5HF_indirect_t *iblock;
00270 hsize_t iblock_off;
00271 } u;
00272 unsigned row;
00273 unsigned col;
00274 unsigned num_entries;
00275
00276
00277 struct H5HF_free_section_t *parent;
00278 unsigned par_entry;
00279 hsize_t span_size;
00280 unsigned iblock_entries;
00281 unsigned rc;
00282 unsigned dir_nrows;
00283 struct H5HF_free_section_t **dir_rows;
00284 unsigned indir_nents;
00285 struct H5HF_free_section_t **indir_ents;
00286 } indirect;
00287 } u;
00288 } H5HF_free_section_t;
00289
00290
00291
00292
00293
00294 typedef struct H5HF_hdr_t {
00295
00296 H5AC_info_t cache_info;
00297
00298
00299 unsigned id_len;
00300 unsigned filter_len;
00301
00302
00303 hbool_t debug_objs;
00304 hbool_t write_once;
00305 hbool_t huge_ids_wrapped;
00306 hbool_t checksum_dblocks;
00307
00308
00309
00310 H5HF_dtable_t man_dtable;
00311
00312
00313 hsize_t total_man_free;
00314 haddr_t fs_addr;
00315
00316
00317 uint32_t max_man_size;
00318 hsize_t huge_next_id;
00319 haddr_t huge_bt2_addr;
00320
00321
00322 H5O_pline_t pline;
00323 size_t pline_root_direct_size;
00324 unsigned pline_root_direct_filter_mask;
00325
00326
00327 hsize_t man_size;
00328 hsize_t man_alloc_size;
00329 hsize_t man_iter_off;
00330 hsize_t man_nobjs;
00331 hsize_t huge_size;
00332 hsize_t huge_nobjs;
00333 hsize_t tiny_size;
00334 hsize_t tiny_nobjs;
00335
00336
00337 size_t rc;
00338 hbool_t dirty;
00339 haddr_t heap_addr;
00340 size_t heap_size;
00341 H5AC_protect_t mode;
00342 H5F_t *f;
00343 size_t file_rc;
00344 hbool_t pending_delete;
00345 size_t sizeof_size;
00346 size_t sizeof_addr;
00347 struct H5HF_indirect_t *root_iblock;
00348 H5FS_t *fspace;
00349 H5HF_block_iter_t next_block;
00350 hsize_t huge_max_id;
00351 hbool_t huge_ids_direct;
00352 size_t tiny_max_len;
00353 hbool_t tiny_len_extended;
00354 unsigned char huge_id_size;
00355 unsigned char heap_off_size;
00356 unsigned char heap_len_size;
00357 } H5HF_hdr_t;
00358
00359
00360
00361 typedef struct H5HF_indirect_ent_t {
00362 haddr_t addr;
00363 } H5HF_indirect_ent_t;
00364
00365
00366
00367 typedef struct H5HF_indirect_filt_ent_t {
00368 size_t size;
00369 unsigned filter_mask;
00370 } H5HF_indirect_filt_ent_t;
00371
00372
00373 struct H5HF_indirect_t {
00374
00375 H5AC_info_t cache_info;
00376
00377
00378 size_t rc;
00379 H5HF_hdr_t *hdr;
00380 struct H5HF_indirect_t *parent;
00381 unsigned par_entry;
00382 haddr_t addr;
00383 size_t size;
00384 unsigned nrows;
00385 unsigned max_rows;
00386 unsigned nchildren;
00387 unsigned max_child;
00388 struct H5HF_indirect_t **child_iblocks;
00389
00390
00391 hsize_t block_off;
00392 H5HF_indirect_ent_t *ents;
00393 H5HF_indirect_filt_ent_t *filt_ents;
00394 };
00395
00396
00397 typedef struct H5HF_direct_t {
00398
00399 H5AC_info_t cache_info;
00400
00401
00402 H5HF_hdr_t *hdr;
00403 H5HF_indirect_t *parent;
00404 unsigned par_entry;
00405 size_t size;
00406 hsize_t file_size;
00407 unsigned blk_off_size;
00408 uint8_t *blk;
00409
00410
00411 hsize_t block_off;
00412 } H5HF_direct_t;
00413
00414
00415 struct H5HF_t {
00416 H5HF_hdr_t *hdr;
00417 H5F_t *f;
00418 };
00419
00420
00421 typedef struct H5HF_parent_t {
00422 H5HF_hdr_t *hdr;
00423 H5HF_indirect_t *iblock;
00424 unsigned entry;
00425 } H5HF_parent_t;
00426
00427
00428 typedef struct H5HF_huge_bt2_indir_rec_t {
00429 haddr_t addr;
00430 hsize_t len;
00431 hsize_t id;
00432 } H5HF_huge_bt2_indir_rec_t;
00433
00434
00435 typedef struct H5HF_huge_bt2_filt_indir_rec_t {
00436 haddr_t addr;
00437 hsize_t len;
00438 unsigned filter_mask;
00439 hsize_t obj_size;
00440 hsize_t id;
00441 } H5HF_huge_bt2_filt_indir_rec_t;
00442
00443
00444 typedef struct H5HF_huge_bt2_dir_rec_t {
00445 haddr_t addr;
00446 hsize_t len;
00447 } H5HF_huge_bt2_dir_rec_t;
00448
00449
00450 typedef struct H5HF_huge_bt2_filt_dir_rec_t {
00451 haddr_t addr;
00452 hsize_t len;
00453 unsigned filter_mask;
00454 hsize_t obj_size;
00455 } H5HF_huge_bt2_filt_dir_rec_t;
00456
00457
00458 typedef struct {
00459 H5HF_hdr_t *hdr;
00460 hid_t dxpl_id;
00461 } H5HF_sect_add_ud1_t;
00462
00463
00464 typedef struct {
00465 H5HF_hdr_t *hdr;
00466 hid_t dxpl_id;
00467 hsize_t obj_len;
00468 } H5HF_huge_remove_ud1_t;
00469
00470
00471
00472
00473
00474
00475 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_HDR[1];
00476
00477
00478 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_IBLOCK[1];
00479
00480
00481 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_DBLOCK[1];
00482
00483
00484 H5_DLLVAR const H5B2_class_t H5HF_BT2_INDIR[1];
00485
00486
00487 H5_DLLVAR const H5B2_class_t H5HF_BT2_FILT_INDIR[1];
00488
00489
00490 H5_DLLVAR const H5B2_class_t H5HF_BT2_DIR[1];
00491
00492
00493 H5_DLLVAR const H5B2_class_t H5HF_BT2_FILT_DIR[1];
00494
00495
00496 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_SINGLE[1];
00497
00498
00499 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_FIRST_ROW[1];
00500
00501
00502 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_NORMAL_ROW[1];
00503
00504
00505 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_INDIRECT[1];
00506
00507
00508 H5FL_EXTERN(H5HF_hdr_t);
00509
00510
00511 H5FL_EXTERN(H5HF_indirect_t);
00512
00513
00514 H5FL_SEQ_EXTERN(H5HF_indirect_ent_t);
00515
00516
00517 H5FL_SEQ_EXTERN(H5HF_indirect_filt_ent_t);
00518
00519
00520 typedef H5HF_indirect_t *H5HF_indirect_ptr_t;
00521 H5FL_SEQ_EXTERN(H5HF_indirect_ptr_t);
00522
00523
00524 H5FL_EXTERN(H5HF_direct_t);
00525
00526
00527 H5FL_BLK_EXTERN(direct_block);
00528
00529
00530
00531
00532
00533
00534
00535 H5_DLL herr_t H5HF_dtable_init(H5HF_dtable_t *dtable);
00536 H5_DLL herr_t H5HF_dtable_dest(H5HF_dtable_t *dtable);
00537 H5_DLL herr_t H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off,
00538 unsigned *row, unsigned *col);
00539 H5_DLL unsigned H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size);
00540 H5_DLL unsigned H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size);
00541 H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
00542 unsigned start_col, unsigned num_entries);
00543
00544
00545 H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f);
00546 H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
00547 H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
00548 H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
00549 H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);
00550 H5_DLL herr_t H5HF_hdr_incr(H5HF_hdr_t *hdr);
00551 H5_DLL herr_t H5HF_hdr_decr(H5HF_hdr_t *hdr);
00552 H5_DLL herr_t H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr);
00553 H5_DLL size_t H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr);
00554 H5_DLL herr_t H5HF_hdr_dirty(H5HF_hdr_t *hdr);
00555 H5_DLL herr_t H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
00556 H5_DLL herr_t H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
00557 H5_DLL herr_t H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
00558 H5_DLL herr_t H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry);
00559 H5_DLL herr_t H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id,
00560 H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
00561 H5_DLL herr_t H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
00562 H5_DLL herr_t H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
00563 H5_DLL herr_t H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id,
00564 haddr_t dblock_addr);
00565 H5_DLL herr_t H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
00566 H5_DLL herr_t H5HF_hdr_empty(H5HF_hdr_t *hdr);
00567 H5_DLL herr_t H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00568
00569
00570 H5_DLL herr_t H5HF_iblock_incr(H5HF_indirect_t *iblock);
00571 H5_DLL herr_t H5HF_iblock_decr(H5HF_indirect_t *iblock);
00572 H5_DLL herr_t H5HF_iblock_dirty(H5HF_indirect_t *iblock);
00573 H5_DLL herr_t H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
00574 size_t min_dblock_size);
00575 H5_DLL herr_t H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id,
00576 size_t min_dblock_size);
00577 H5_DLL herr_t H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
00578 H5HF_free_section_t **sec_node);
00579 H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
00580 H5HF_indirect_t *par_iblock, unsigned par_entry, unsigned nrows,
00581 unsigned max_rows, haddr_t *addr_p);
00582 H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
00583 haddr_t iblock_addr, unsigned iblock_nrows,
00584 H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
00585 H5AC_protect_t rw, hbool_t *did_protect);
00586 H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
00587 unsigned cache_flags, hbool_t did_protect);
00588 H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
00589 haddr_t dblock_addr);
00590 H5_DLL herr_t H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry);
00591 H5_DLL herr_t H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry,
00592 haddr_t *child_addr);
00593 H5_DLL herr_t H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id,
00594 haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock,
00595 unsigned par_entry);
00596 H5_DLL herr_t H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr,
00597 haddr_t iblock_addr, unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size);
00598
00599
00600 H5_DLL herr_t H5HF_man_dblock_new(H5HF_hdr_t *fh, hid_t dxpl_id, size_t request,
00601 H5HF_free_section_t **ret_sec_node);
00602 H5_DLL herr_t H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr,
00603 H5HF_indirect_t *par_iblock, unsigned par_entry, haddr_t *addr_p,
00604 H5HF_free_section_t **ret_sec_node);
00605 H5_DLL herr_t H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id,
00606 H5HF_direct_t *dblock, haddr_t dblock_addr);
00607 H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
00608 haddr_t dblock_addr, size_t dblock_size,
00609 H5HF_indirect_t *par_iblock, unsigned par_entry,
00610 H5AC_protect_t rw);
00611 H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id,
00612 hsize_t obj_off, H5HF_indirect_t **par_iblock,
00613 unsigned *par_entry, hbool_t *par_did_protect, H5AC_protect_t rw);
00614 H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
00615 hsize_t dblock_size);
00616
00617
00618 H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
00619 const void *obj, void *id);
00620 H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
00621 void *obj);
00622 H5_DLL herr_t H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00623 const void *obj);
00624 H5_DLL herr_t H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00625 H5HF_operator_t op, void *op_data);
00626 H5_DLL herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id);
00627
00628
00629 H5_DLL herr_t H5HF_huge_init(H5HF_hdr_t *hdr);
00630 H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size,
00631 void *obj, void *id);
00632 H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id,
00633 const uint8_t *id, size_t *obj_len_p);
00634 H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
00635 void *obj);
00636 H5_DLL herr_t H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00637 const void *obj);
00638 H5_DLL herr_t H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00639 H5HF_operator_t op, void *op_data);
00640 H5_DLL herr_t H5HF_huge_remove(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id);
00641 H5_DLL herr_t H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id);
00642 H5_DLL herr_t H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00643
00644
00645 H5_DLL herr_t H5HF_tiny_init(H5HF_hdr_t *hdr);
00646 H5_DLL herr_t H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj,
00647 void *id);
00648 H5_DLL herr_t H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
00649 size_t *obj_len_p);
00650 H5_DLL herr_t H5HF_tiny_read(H5HF_hdr_t *fh, const uint8_t *id, void *obj);
00651 H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id,
00652 H5HF_operator_t op, void *op_data);
00653 H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
00654
00655
00656 H5_DLL herr_t H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr);
00657 H5_DLL herr_t H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock);
00658 H5_DLL herr_t H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock);
00659
00660
00661 H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00662 FILE *stream, int indent, int fwidth);
00663 H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00664 FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec);
00665 H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00666 FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows);
00667
00668
00669 H5_DLL herr_t H5HF_man_iter_init(H5HF_block_iter_t *biter);
00670 H5_DLL herr_t H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
00671 H5HF_block_iter_t *biter, hsize_t offset);
00672 H5_DLL herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00673 H5HF_indirect_t *iblock, unsigned start_entry);
00674 H5_DLL herr_t H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr,
00675 H5HF_block_iter_t *biter, unsigned entry);
00676 H5_DLL herr_t H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00677 unsigned nentries);
00678 H5_DLL herr_t H5HF_man_iter_up(H5HF_block_iter_t *biter);
00679 H5_DLL herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
00680 H5_DLL herr_t H5HF_man_iter_reset(H5HF_block_iter_t *biter);
00681 H5_DLL herr_t H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
00682 unsigned *entry, H5HF_indirect_t **block);
00683 H5_DLL herr_t H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00684 hsize_t *offset);
00685 H5_DLL hbool_t H5HF_man_iter_ready(H5HF_block_iter_t *biter);
00686
00687
00688 H5_DLL herr_t H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create);
00689 H5_DLL herr_t H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
00690 H5HF_free_section_t *node, unsigned flags);
00691 H5_DLL htri_t H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request,
00692 H5HF_free_section_t **node);
00693 H5_DLL herr_t H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size);
00694 H5_DLL herr_t H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id,
00695 H5HF_free_section_t *node);
00696 H5_DLL herr_t H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id);
00697 H5_DLL herr_t H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00698 H5_DLL herr_t H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id,
00699 H5HF_free_section_t *sect, unsigned new_class);
00700
00701
00702 H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off,
00703 size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry);
00704 H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
00705 H5HF_free_section_t *sect);
00706 H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
00707 H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size);
00708 H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
00709 H5HF_free_section_t *sect, size_t amt);
00710 H5_DLL herr_t H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
00711 H5HF_free_section_t *sect);
00712 H5_DLL herr_t H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
00713 H5HF_free_section_t *sect, unsigned *entry_p);
00714 H5_DLL H5HF_indirect_t *H5HF_sect_row_get_iblock(H5HF_free_section_t *sect);
00715 H5_DLL herr_t H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
00716 H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
00717
00718
00719 H5_DLL herr_t H5HF_op_read(const void *obj, size_t obj_len, void *op_data);
00720 H5_DLL herr_t H5HF_op_write(const void *obj, size_t obj_len, void *op_data);
00721
00722
00723 #ifdef H5HF_TESTING
00724 H5_DLL herr_t H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam);
00725 H5_DLL int H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2);
00726 H5_DLL unsigned H5HF_get_max_root_rows(const H5HF_t *fh);
00727 H5_DLL unsigned H5HF_get_dtable_width_test(const H5HF_t *fh);
00728 H5_DLL unsigned H5HF_get_dtable_max_drows_test(const H5HF_t *fh);
00729 H5_DLL unsigned H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos);
00730 H5_DLL hsize_t H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row);
00731 H5_DLL hsize_t H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row);
00732 H5_DLL herr_t H5HF_get_id_off_test(const H5HF_t *fh, const void *id, hsize_t *obj_off);
00733 H5_DLL herr_t H5HF_get_id_type_test(const void *id, unsigned char *obj_type);
00734 H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
00735 hbool_t *len_extended);
00736 H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id,
00737 hbool_t *ids_direct);
00738 #endif
00739
00740 #endif
00741