diff options
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r-- | src/H5Opkg.h | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 3d0e627..4091944 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -253,7 +253,6 @@ struct H5O_mesg_t { }; typedef struct H5O_chunk_t { - hbool_t dirty; /*dirty flag */ haddr_t addr; /*chunk file address */ size_t size; /*chunk size */ size_t gap; /*space at end of chunk too small for null message */ @@ -268,9 +267,6 @@ struct H5O_t { size_t sizeof_size; /* Size of file sizes */ size_t sizeof_addr; /* Size of file addresses */ - /* Misc. information (not stored) */ - unsigned npins; /* Number of times the header is pinned */ - /* Debugging information (not stored) */ #ifdef H5O_ENABLE_BAD_MESG_COUNT hbool_t store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */ @@ -282,6 +278,12 @@ struct H5O_t { size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ #endif /* NDEBUG */ + /* Chunk management information (not stored) */ + size_t rc; /* Reference count of [continuation] chunks using this structure */ + size_t chunk0_size; /* Size of serialized first chunk */ + hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */ + hbool_t prefix_modified; /* Whether prefix was modified when the object header was deserialized */ + /* Object information (stored) */ hbool_t has_refcount_msg; /* Whether the object has a ref. count message */ unsigned nlink; /*link count */ @@ -332,10 +334,55 @@ typedef struct H5O_addr_map_t { hsize_t inc_ref_count; /* Number of deferred increments to reference count */ } H5O_addr_map_t; - -/* H5O inherits cache-like properties from H5AC */ +/* Stack of continuation messages to interpret */ +typedef struct H5O_cont_msgs_t { + size_t nmsgs; /* Number of continuation messages found so far */ + size_t alloc_nmsgs; /* Continuation messages allocated */ + H5O_cont_t *msgs; /* Array of continuation messages */ +} H5O_cont_msgs_t; + +/* Common callback information for loading object header prefix from disk */ +typedef struct H5O_common_cache_ud_t { + H5F_t *f; /* Pointer to file for object header/chunk */ + hid_t dxpl_id; /* DXPL for operation */ + unsigned file_intent; /* Read/write intent for file */ + unsigned merged_null_msgs; /* Number of null messages merged together */ + hbool_t mesgs_modified; /* Whether any messages were modified when the object header was deserialized */ + H5O_cont_msgs_t *cont_msg_info; /* Pointer to continuation messages to work on */ +} H5O_common_cache_ud_t; + +/* Callback information for loading object header prefix from disk */ +typedef struct H5O_cache_ud_t { + hbool_t made_attempt; /* Whether the deserialize routine was already attempted */ + unsigned v1_pfx_nmesgs; /* Number of messages from v1 prefix header */ + H5O_common_cache_ud_t common; /* Common object header cache callback info */ +} H5O_cache_ud_t; + +/* Structure representing each chunk in the cache */ +typedef struct H5O_chunk_proxy_t { + H5AC_info_t cache_info; /* Information for metadata cache functions, _must_ be */ + /* first field in structure */ + + H5O_t *oh; /* Object header for this chunk */ + unsigned chunkno; /* Chunk number for this chunk */ +} H5O_chunk_proxy_t; + +/* Callback information for loading object header chunk from disk */ +typedef struct H5O_chk_cache_ud_t { + hbool_t decoding; /* Whether the object header is being decoded */ + H5O_t *oh; /* Object header for this chunk */ + unsigned chunkno; /* Index of chunk being brought in (for re-loads) */ + size_t chunk_size; /* Chunk size */ + H5O_common_cache_ud_t common; /* Common object header cache callback info */ +} H5O_chk_cache_ud_t; + + +/* H5O object header inherits cache-like properties from H5AC */ H5_DLLVAR const H5AC_class_t H5AC_OHDR[1]; +/* H5O object header chunk inherits cache-like properties from H5AC */ +H5_DLLVAR const H5AC_class_t H5AC_OHDR_CHK[1]; + /* Header message ID to class mapping */ H5_DLLVAR const H5O_msg_class_t *const H5O_msg_class_g[H5O_MSG_TYPES]; @@ -476,6 +523,9 @@ H5_DLL herr_t H5O_flush_msgs(H5F_t *f, H5O_t *oh); H5_DLL hid_t H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref); H5_DLL herr_t H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_mesg_t *mesg); H5_DLL const H5O_obj_class_t *H5O_obj_class_real(H5O_t *oh); +H5_DLL int H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted); +H5_DLL herr_t H5O_inc_rc(H5O_t *oh); +H5_DLL herr_t H5O_dec_rc(H5O_t *oh); H5_DLL herr_t H5O_free(H5O_t *oh); /* Object header message routines */ @@ -498,6 +548,15 @@ H5_DLL void *H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, H5_DLL herr_t H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id); +/* Object header chunk routines */ +H5_DLL herr_t H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx); +H5_DLL H5O_chunk_proxy_t *H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, + unsigned idx); +H5_DLL herr_t H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, + H5O_chunk_proxy_t *chk_proxy, unsigned chk_flags); +H5_DLL herr_t H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx); +H5_DLL herr_t H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx); + /* Collect storage info for btree and heap */ H5_DLL herr_t H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info); @@ -544,6 +603,7 @@ H5_DLL htri_t H5O_is_attr_dense_test(hid_t oid); H5_DLL herr_t H5O_num_attrs_test(hid_t oid, hsize_t *nattrs); H5_DLL herr_t H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count); H5_DLL herr_t H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val); +H5_DLL herr_t H5O_expunge_chunks_test(const H5O_loc_t *oloc, hid_t dxpl_id); #endif /* H5O_TESTING */ /* Object header debugging routines */ |