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     haddr_t     heap_addr;      
00339     size_t      heap_size;      
00340     H5AC_protect_t mode;        
00341     H5F_t      *f;              
00342     size_t      file_rc;        
00343     hbool_t     pending_delete; 
00344     uint8_t     sizeof_size;    
00345     uint8_t     sizeof_addr;    
00346     struct H5HF_indirect_t *root_iblock;    
00347     H5FS_t      *fspace;        
00348     H5HF_block_iter_t next_block;   
00349     H5B2_t      *huge_bt2;      
00350     hsize_t     huge_max_id;    
00351     uint8_t     huge_id_size;   
00352     hbool_t     huge_ids_direct; 
00353     size_t      tiny_max_len;   
00354     hbool_t     tiny_len_extended; 
00355     uint8_t     heap_off_size;  
00356     uint8_t     heap_len_size;  
00357     hbool_t     checked_filters; 
00358 } H5HF_hdr_t;
00359 
00360 
00361 
00362 typedef struct H5HF_indirect_ent_t {
00363     haddr_t     addr;           
00364 } H5HF_indirect_ent_t;
00365 
00366 
00367 
00368 typedef struct H5HF_indirect_filt_ent_t {
00369     size_t     size;            
00370     unsigned    filter_mask;    
00371 } H5HF_indirect_filt_ent_t;
00372 
00373 
00374 struct H5HF_indirect_t {
00375     
00376     H5AC_info_t cache_info;
00377 
00378     
00379     size_t      rc;             
00380     H5HF_hdr_t  *hdr;           
00381     struct H5HF_indirect_t *parent;     
00382     unsigned    par_entry;      
00383     haddr_t     addr;           
00384     size_t      size;           
00385     unsigned    nrows;          
00386     unsigned    max_rows;       
00387     unsigned    nchildren;      
00388     unsigned    max_child;      
00389     struct H5HF_indirect_t **child_iblocks; 
00390 
00391     
00392     hsize_t     block_off;      
00393     H5HF_indirect_ent_t *ents;  
00394     H5HF_indirect_filt_ent_t *filt_ents;    
00395 };
00396 
00397 
00398 typedef struct H5HF_direct_t {
00399     
00400     H5AC_info_t cache_info;
00401 
00402     
00403     H5HF_hdr_t  *hdr;           
00404     H5HF_indirect_t *parent;    
00405     unsigned    par_entry;      
00406     size_t      size;           
00407     hsize_t     file_size;      
00408     unsigned    blk_off_size;   
00409     uint8_t     *blk;           
00410 
00411     
00412     hsize_t     block_off;      
00413 } H5HF_direct_t;
00414 
00415 
00416 struct H5HF_t {
00417     H5HF_hdr_t  *hdr;           
00418     H5F_t      *f;              
00419 };
00420 
00421 
00422 typedef struct H5HF_parent_t {
00423     H5HF_hdr_t *hdr;                
00424     H5HF_indirect_t *iblock;    
00425     unsigned entry;             
00426 } H5HF_parent_t;
00427 
00428 
00429 typedef struct H5HF_huge_bt2_indir_rec_t {
00430     haddr_t addr;       
00431     hsize_t len;        
00432     hsize_t id;         
00433 } H5HF_huge_bt2_indir_rec_t;
00434 
00435 
00436 typedef struct H5HF_huge_bt2_filt_indir_rec_t {
00437     haddr_t addr;       
00438     hsize_t len;        
00439     unsigned filter_mask;   
00440     hsize_t obj_size;   
00441     hsize_t id;         
00442 } H5HF_huge_bt2_filt_indir_rec_t;
00443 
00444 
00445 typedef struct H5HF_huge_bt2_dir_rec_t {
00446     haddr_t addr;       
00447     hsize_t len;        
00448 } H5HF_huge_bt2_dir_rec_t;
00449 
00450 
00451 typedef struct H5HF_huge_bt2_filt_dir_rec_t {
00452     haddr_t addr;       
00453     hsize_t len;        
00454     unsigned filter_mask;   
00455     hsize_t obj_size;   
00456 } H5HF_huge_bt2_filt_dir_rec_t;
00457 
00458 
00459 typedef struct {
00460     H5HF_hdr_t *hdr;            
00461     hid_t dxpl_id;              
00462 } H5HF_sect_add_ud1_t;
00463 
00464 
00465 typedef struct {
00466     H5HF_hdr_t *hdr;            
00467     hid_t dxpl_id;              
00468     hsize_t obj_len;            
00469 } H5HF_huge_remove_ud1_t;
00470 
00471 
00472 
00473 
00474 
00475 
00476 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_HDR[1];
00477 
00478 
00479 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_IBLOCK[1];
00480 
00481 
00482 H5_DLLVAR const H5AC_class_t H5AC_FHEAP_DBLOCK[1];
00483 
00484 
00485 H5_DLLVAR const H5B2_class_t H5HF_HUGE_BT2_INDIR[1];
00486 
00487 
00488 H5_DLLVAR const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1];
00489 
00490 
00491 H5_DLLVAR const H5B2_class_t H5HF_HUGE_BT2_DIR[1];
00492 
00493 
00494 H5_DLLVAR const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1];
00495 
00496 
00497 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_SINGLE[1];
00498 
00499 
00500 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_FIRST_ROW[1];
00501 
00502 
00503 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_NORMAL_ROW[1];
00504 
00505 
00506 H5_DLLVAR H5FS_section_class_t H5HF_FSPACE_SECT_CLS_INDIRECT[1];
00507 
00508 
00509 H5FL_EXTERN(H5HF_indirect_t);
00510 
00511 
00512 H5FL_SEQ_EXTERN(H5HF_indirect_ent_t);
00513 
00514 
00515 H5FL_SEQ_EXTERN(H5HF_indirect_filt_ent_t);
00516 
00517 
00518 typedef H5HF_indirect_t *H5HF_indirect_ptr_t;
00519 H5FL_SEQ_EXTERN(H5HF_indirect_ptr_t);
00520 
00521 
00522 H5FL_EXTERN(H5HF_direct_t);
00523 
00524 
00525 H5FL_BLK_EXTERN(direct_block);
00526 
00527 
00528 
00529 
00530 
00531 
00532 
00533 H5_DLL herr_t H5HF_dtable_init(H5HF_dtable_t *dtable);
00534 H5_DLL herr_t H5HF_dtable_dest(H5HF_dtable_t *dtable);
00535 H5_DLL herr_t H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off,
00536     unsigned *row, unsigned *col);
00537 H5_DLL unsigned H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size);
00538 H5_DLL unsigned H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size);
00539 H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
00540     unsigned start_col, unsigned num_entries);
00541 
00542 
00543 H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f);
00544 H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam);
00545 H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
00546 H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
00547 H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);
00548 H5_DLL herr_t H5HF_hdr_incr(H5HF_hdr_t *hdr);
00549 H5_DLL herr_t H5HF_hdr_decr(H5HF_hdr_t *hdr);
00550 H5_DLL herr_t H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr);
00551 H5_DLL size_t H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr);
00552 H5_DLL herr_t H5HF_hdr_dirty(H5HF_hdr_t *hdr);
00553 H5_DLL herr_t H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
00554 H5_DLL herr_t H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
00555 H5_DLL herr_t H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
00556 H5_DLL herr_t H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry);
00557 H5_DLL herr_t H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id,
00558     H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
00559 H5_DLL herr_t H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size);
00560 H5_DLL herr_t H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
00561 H5_DLL herr_t H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id,
00562     haddr_t dblock_addr);
00563 H5_DLL herr_t H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
00564 H5_DLL herr_t H5HF_hdr_empty(H5HF_hdr_t *hdr);
00565 H5_DLL herr_t H5HF_hdr_free(H5HF_hdr_t *hdr);
00566 H5_DLL herr_t H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00567 
00568 
00569 H5_DLL herr_t H5HF_iblock_incr(H5HF_indirect_t *iblock);
00570 H5_DLL herr_t H5HF_iblock_decr(H5HF_indirect_t *iblock);
00571 H5_DLL herr_t H5HF_iblock_dirty(H5HF_indirect_t *iblock);
00572 H5_DLL herr_t H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
00573     size_t min_dblock_size);
00574 H5_DLL herr_t H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id,
00575     size_t min_dblock_size);
00576 H5_DLL herr_t H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
00577     H5HF_free_section_t **sec_node);
00578 H5_DLL herr_t H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id,
00579     H5HF_indirect_t *par_iblock, unsigned par_entry, unsigned nrows,
00580     unsigned max_rows, haddr_t *addr_p);
00581 H5_DLL H5HF_indirect_t *H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
00582     haddr_t iblock_addr, unsigned iblock_nrows,
00583     H5HF_indirect_t *par_iblock, unsigned par_entry, hbool_t must_protect,
00584     H5AC_protect_t rw, hbool_t *did_protect);
00585 H5_DLL herr_t H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
00586     unsigned cache_flags, hbool_t did_protect);
00587 H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
00588     haddr_t dblock_addr);
00589 H5_DLL herr_t H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry);
00590 H5_DLL herr_t H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry,
00591     haddr_t *child_addr);
00592 H5_DLL herr_t H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id,
00593     haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock,
00594     unsigned par_entry);
00595 H5_DLL herr_t H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr,
00596     haddr_t iblock_addr, unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size);
00597 
00598 
00599 H5_DLL herr_t H5HF_man_dblock_new(H5HF_hdr_t *fh, hid_t dxpl_id, size_t request,
00600     H5HF_free_section_t **ret_sec_node);
00601 H5_DLL herr_t H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr,
00602     H5HF_indirect_t *par_iblock, unsigned par_entry, haddr_t *addr_p,
00603     H5HF_free_section_t **ret_sec_node);
00604 H5_DLL herr_t H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id,
00605     H5HF_direct_t *dblock, haddr_t dblock_addr);
00606 H5_DLL H5HF_direct_t *H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id,
00607     haddr_t dblock_addr, size_t dblock_size,
00608     H5HF_indirect_t *par_iblock, unsigned par_entry,
00609     H5AC_protect_t rw);
00610 H5_DLL herr_t H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id,
00611     hsize_t obj_off, H5HF_indirect_t **par_iblock,
00612     unsigned *par_entry, hbool_t *par_did_protect, H5AC_protect_t rw);
00613 H5_DLL herr_t H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
00614     hsize_t dblock_size);
00615 
00616 
00617 H5_DLL herr_t H5HF_man_insert(H5HF_hdr_t *fh, hid_t dxpl_id, size_t obj_size,
00618     const void *obj, void *id);
00619 H5_DLL herr_t H5HF_man_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
00620     void *obj);
00621 H5_DLL herr_t H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00622     const void *obj);
00623 H5_DLL herr_t H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00624     H5HF_operator_t op, void *op_data);
00625 H5_DLL herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id);
00626 
00627 
00628 H5_DLL herr_t H5HF_huge_init(H5HF_hdr_t *hdr);
00629 H5_DLL herr_t H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size,
00630     void *obj, void *id);
00631 H5_DLL herr_t H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id,
00632     const uint8_t *id, size_t *obj_len_p);
00633 H5_DLL herr_t H5HF_huge_read(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id,
00634     void *obj);
00635 H5_DLL herr_t H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00636     const void *obj);
00637 H5_DLL herr_t H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
00638     H5HF_operator_t op, void *op_data);
00639 H5_DLL herr_t H5HF_huge_remove(H5HF_hdr_t *fh, hid_t dxpl_id, const uint8_t *id);
00640 H5_DLL herr_t H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id);
00641 H5_DLL herr_t H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00642 
00643 
00644 H5_DLL herr_t H5HF_huge_bt2_indir_found(const void *nrecord, void *op_data);
00645 H5_DLL herr_t H5HF_huge_bt2_indir_remove(const void *nrecord, void *op_data);
00646 H5_DLL herr_t H5HF_huge_bt2_filt_indir_found(const void *nrecord, void *op_data);
00647 H5_DLL herr_t H5HF_huge_bt2_filt_indir_remove(const void *nrecord, void *op_data);
00648 H5_DLL herr_t H5HF_huge_bt2_dir_remove(const void *nrecord, void *op_data);
00649 H5_DLL herr_t H5HF_huge_bt2_filt_dir_found(const void *nrecord, void *op_data);
00650 H5_DLL herr_t H5HF_huge_bt2_filt_dir_remove(const void *nrecord, void *op_data);
00651 
00652 
00653 H5_DLL herr_t H5HF_tiny_init(H5HF_hdr_t *hdr);
00654 H5_DLL herr_t H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj,
00655     void *id);
00656 H5_DLL herr_t H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
00657     size_t *obj_len_p);
00658 H5_DLL herr_t H5HF_tiny_read(H5HF_hdr_t *fh, const uint8_t *id, void *obj);
00659 H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id,
00660     H5HF_operator_t op, void *op_data);
00661 H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
00662 
00663 
00664 H5_DLL herr_t H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr);
00665 H5_DLL herr_t H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock);
00666 H5_DLL herr_t H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock);
00667 
00668 
00669 H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00670     FILE *stream, int indent, int fwidth);
00671 H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00672     FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec);
00673 H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
00674     FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows);
00675 
00676 
00677 H5_DLL herr_t H5HF_man_iter_init(H5HF_block_iter_t *biter);
00678 H5_DLL herr_t H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
00679     H5HF_block_iter_t *biter, hsize_t offset);
00680 H5_DLL herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00681     H5HF_indirect_t *iblock, unsigned start_entry);
00682 H5_DLL herr_t H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr,
00683     H5HF_block_iter_t *biter, unsigned entry);
00684 H5_DLL herr_t H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00685     unsigned nentries);
00686 H5_DLL herr_t H5HF_man_iter_up(H5HF_block_iter_t *biter);
00687 H5_DLL herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
00688 H5_DLL herr_t H5HF_man_iter_reset(H5HF_block_iter_t *biter);
00689 H5_DLL herr_t H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
00690     unsigned *entry, H5HF_indirect_t **block);
00691 H5_DLL herr_t H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
00692     hsize_t *offset);
00693 H5_DLL hbool_t H5HF_man_iter_ready(H5HF_block_iter_t *biter);
00694 
00695 
00696 H5_DLL herr_t H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create);
00697 H5_DLL herr_t H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
00698     H5HF_free_section_t *node, unsigned flags);
00699 H5_DLL htri_t H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request,
00700     H5HF_free_section_t **node);
00701 H5_DLL herr_t H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size);
00702 H5_DLL herr_t H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id,
00703     H5HF_free_section_t *node);
00704 H5_DLL herr_t H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id);
00705 H5_DLL herr_t H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id);
00706 H5_DLL herr_t H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id,
00707     H5HF_free_section_t *sect, unsigned new_class);
00708 
00709 
00710 H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off,
00711     size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry);
00712 H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
00713     H5HF_free_section_t *sect);
00714 H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
00715     H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size);
00716 H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
00717     H5HF_free_section_t *sect, size_t amt);
00718 H5_DLL herr_t H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
00719     H5HF_free_section_t *sect);
00720 H5_DLL herr_t H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
00721     H5HF_free_section_t *sect, unsigned *entry_p);
00722 H5_DLL H5HF_indirect_t *H5HF_sect_row_get_iblock(H5HF_free_section_t *sect);
00723 H5_DLL herr_t H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
00724     H5HF_indirect_t *iblock, unsigned start_entry, unsigned nentries);
00725 H5_DLL herr_t H5HF_sect_single_free(H5FS_section_info_t *sect);
00726 
00727 
00728 H5_DLL herr_t H5HF_op_read(const void *obj, size_t obj_len, void *op_data);
00729 H5_DLL herr_t H5HF_op_write(const void *obj, size_t obj_len, void *op_data);
00730 
00731 
00732 #ifdef H5HF_TESTING
00733 H5_DLL herr_t H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam);
00734 H5_DLL int H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2);
00735 H5_DLL unsigned H5HF_get_max_root_rows(const H5HF_t *fh);
00736 H5_DLL unsigned H5HF_get_dtable_width_test(const H5HF_t *fh);
00737 H5_DLL unsigned H5HF_get_dtable_max_drows_test(const H5HF_t *fh);
00738 H5_DLL unsigned H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos);
00739 H5_DLL hsize_t H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row);
00740 H5_DLL hsize_t H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row);
00741 H5_DLL herr_t H5HF_get_id_off_test(const H5HF_t *fh, const void *id, hsize_t *obj_off);
00742 H5_DLL herr_t H5HF_get_id_type_test(const void *id, unsigned char *obj_type);
00743 H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
00744     hbool_t *len_extended);
00745 H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id,
00746     hbool_t *ids_direct);
00747 #endif 
00748 
00749 #endif 
00750