diff options
Diffstat (limited to 'src/H5FScache.c')
-rw-r--r-- | src/H5FScache.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c index 5af26b2..923f3fb 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -424,6 +424,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) @@ -439,6 +441,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 @@ -644,6 +656,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() */ |