summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper_cache.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/H5Fsuper_cache.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/H5Fsuper_cache.c')
-rw-r--r--src/H5Fsuper_cache.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index ac1f840..477f58f 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -515,6 +515,8 @@ H5F__cache_superblock_pre_serialize(const H5F_t *f, hid_t dxpl_id,
size_t H5_ATTR_UNUSED *new_len, size_t H5_ATTR_UNUSED *new_compressed_len,
unsigned H5_ATTR_UNUSED *flags)
{
+ H5P_genplist_t *dxpl = NULL; /* DXPL for setting ring */
+ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the super block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -562,6 +564,10 @@ H5F__cache_superblock_pre_serialize(const H5F_t *f, hid_t dxpl_id,
if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
+ /* Set the ring type in the DXPL */
+ if(H5AC_set_ring(dxpl_id, H5AC_RING_SBE, &dxpl, &orig_ring) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set ring value")
+
/* Write driver info information to the superblock extension */
drvinfo.len = driver_size;
drvinfo.buf = dbuf;
@@ -577,6 +583,10 @@ H5F__cache_superblock_pre_serialize(const H5F_t *f, hid_t dxpl_id,
} /* end if */
done:
+ /* Reset the ring in the DXPL */
+ if(H5AC_reset_ring(dxpl, orig_ring) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set property value")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_cache_superblock_pre_serialize() */