diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-12-14 17:33:18 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-12-14 17:33:18 (GMT) |
commit | ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e (patch) | |
tree | f4d06a33ba454171d91874957def4cec18ea4924 /src/H5Opkg.h | |
parent | cec83436f2abbe52e15c76a53703d5a10b237470 (diff) | |
download | hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.zip hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.tar.gz hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.tar.bz2 |
[svn-r23104] Purpose: Add object header flush dependencies
Description:
Added flush dependencies between object header chunks. Also added a new object
header proxy object, which is a child dependency of all object header chunks.
All objects which are child dependencies of an object header should set up a
flush dependency on the object header proxy, so the dependency applies to all
object header chunks.
Tested: ummon; jam (fails ph5diff -v, unrelated), koala, ostrich (h5committest)
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r-- | src/H5Opkg.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 3eb5afb..b9f074e 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -267,6 +267,7 @@ struct H5O_t { /* File-specific information (not stored) */ size_t sizeof_size; /* Size of file sizes */ size_t sizeof_addr; /* Size of file addresses */ + hbool_t swmr_write; /* Whether we are doing SWMR writes */ /* Debugging information (not stored) */ #ifdef H5O_ENABLE_BAD_MESG_COUNT @@ -312,6 +313,10 @@ struct H5O_t { size_t nchunks; /*number of chunks */ size_t alloc_nchunks; /*chunks allocated */ H5O_chunk_t *chunk; /*array of chunks */ + + /* Object header proxy information (not stored) */ + haddr_t proxy_addr; /* Temporary address of object header proxy */ + hbool_t proxy_present; /* Whether the proxy is present in cache (and we have to track dependencies) */ }; /* Class for types of objects in file */ @@ -368,8 +373,10 @@ typedef struct H5O_chunk_proxy_t { H5AC_info_t cache_info; /* Information for metadata cache functions, _must_ be */ /* first field in structure */ + H5F_t *f; /* Pointer to file for object header/chunk */ H5O_t *oh; /* Object header for this chunk */ unsigned chunkno; /* Chunk number for this chunk */ + unsigned cont_chunkno; /* Chunk number for the chunk containing the continuation message that points to this chunk */ } H5O_chunk_proxy_t; /* Callback information for loading object header chunk from disk */ @@ -381,6 +388,14 @@ typedef struct H5O_chk_cache_ud_t { H5O_common_cache_ud_t common; /* Common object header cache callback info */ } H5O_chk_cache_ud_t; +/* Metadata cache object header proxy type */ +struct H5O_proxy_t { + H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */ + /* first field in structure */ + H5F_t *f; /* Pointer to file for object header/chunk */ + H5O_t *oh; /* Object header */ +}; + /* H5O object header inherits cache-like properties from H5AC */ H5_DLLVAR const H5AC_class_t H5AC_OHDR[1]; @@ -559,7 +574,8 @@ H5_DLL herr_t H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *t 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 herr_t H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx, + unsigned cont_chunkno); 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, @@ -607,6 +623,16 @@ H5_DLL herr_t H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs); +/* Object header proxy operators */ +H5_DLL herr_t H5O_proxy_create(H5F_t *f, hid_t dxpl_id, H5O_t *oh); +H5_DLL H5O_proxy_t *H5O_proxy_pin(H5F_t *f, hid_t dxpl_id, + H5O_t *oh); +H5_DLL herr_t H5O_proxy_unpin(H5O_proxy_t *proxy); +H5_DLL herr_t H5O_proxy_depend(H5F_t *f, hid_t dxpl_id, H5O_t *oh, + void *parent); +H5_DLL herr_t H5O_proxy_undepend(H5F_t *f, hid_t dxpl_id, H5O_t *oh, + void *parent); + /* These functions operate on object locations */ H5_DLL H5O_loc_t *H5O_get_loc(hid_t id); |