summaryrefslogtreecommitdiffstats
path: root/src/H5FScache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-09-09 06:33:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-09-09 06:33:03 (GMT)
commit26baf1a805b27e2ca34edf313a85f4a6d4081da1 (patch)
tree7404adc256ca658eb84b691bcf0a82e62589757d /src/H5FScache.c
parent2132f544596c2e12e86cebf4c1cc6b1d38ffa80d (diff)
downloadhdf5-26baf1a805b27e2ca34edf313a85f4a6d4081da1.zip
hdf5-26baf1a805b27e2ca34edf313a85f4a6d4081da1.tar.gz
hdf5-26baf1a805b27e2ca34edf313a85f4a6d4081da1.tar.bz2
[svn-r27710] Description:
Bring the "metadata rings" code from its branch (mdc_rings_v2) to the trunk. (This change will support the page buffering feature) Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5FScache.c')
-rw-r--r--src/H5FScache.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 9accfc4..455a96e 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -376,6 +376,8 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing,
unsigned *flags)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
+ H5P_genplist_t *dxpl = NULL; /* DXPL for setting ring */
+ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
@@ -391,6 +393,16 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing,
HDassert(flags);
if(fspace->sinfo) {
+ H5AC_ring_t ring;
+
+ /* Retrieve the ring type for the header */
+ if(H5AC_get_entry_ring(f, addr, &ring) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "unable to get property value");
+
+ /* Set the ring type for the section info in the DXPL */
+ if(H5AC_set_ring(dxpl_id, ring, &dxpl, &orig_ring) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTSET, FAIL, "unable to set ring value")
+
/* This implies that the header "owns" the section info.
*
* Unfortunately, the comments in the code are not clear as to
@@ -596,6 +608,10 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing,
*flags = 0;
done:
+ /* Reset the ring in the DXPL */
+ if(H5AC_reset_ring(dxpl, orig_ring) < 0)
+ HDONE_ERROR(H5E_FSPACE, H5E_CANTSET, FAIL, "unable to set property value")
+
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5FS__cache_hdr_pre_serialize() */