summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-12-14 17:33:18 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-12-14 17:33:18 (GMT)
commitebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e (patch)
treef4d06a33ba454171d91874957def4cec18ea4924 /src/H5Ocopy.c
parentcec83436f2abbe52e15c76a53703d5a10b237470 (diff)
downloadhdf5-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/H5Ocopy.c')
-rw-r--r--src/H5Ocopy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index ceb6563..3a08d82 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -449,6 +449,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
oh_dst->attr_msgs_seen = oh_src->attr_msgs_seen;
oh_dst->sizeof_size = H5F_SIZEOF_SIZE(oloc_dst->file);
oh_dst->sizeof_addr = H5F_SIZEOF_ADDR(oloc_dst->file);
+ oh_dst->swmr_write = !!(H5F_INTENT(oloc_dst->file) & H5F_ACC_SWMR_WRITE);
/* Copy time fields */
oh_dst->atime = oh_src->atime;
@@ -460,6 +461,14 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
oh_dst->max_compact = oh_src->max_compact;
oh_dst->min_dense = oh_src->min_dense;
+ /* Create object header proxy if doing SWMR writes */
+ if(H5F_INTENT(oloc_dst->file) & H5F_ACC_SWMR_WRITE) {
+ if(H5O_proxy_create(oloc_dst->file, dxpl_id, oh_dst) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy")
+ } /* end if */
+ else
+ oh_dst->proxy_addr = HADDR_UNDEF;
+
/* Initialize size of chunk array. Start off with zero chunks so this field
* is consistent with the current state of the chunk array. This is
* important if an error occurs.