summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper_cache.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-10-01 16:12:02 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-10-01 16:12:02 (GMT)
commit8d131aca15bca2d042ef175af5cf5a642d4c1152 (patch)
tree50a5b1c6dbfd137a0795ca47dc7ee84a6e903101 /src/H5Fsuper_cache.c
parenta31524e4aee50324ccbc6707584b1758279f984e (diff)
parent4dc2218ab5622f81c3dd9d68020ac7357f413c50 (diff)
downloadhdf5-8d131aca15bca2d042ef175af5cf5a642d4c1152.zip
hdf5-8d131aca15bca2d042ef175af5cf5a642d4c1152.tar.gz
hdf5-8d131aca15bca2d042ef175af5cf5a642d4c1152.tar.bz2
[svn-r27929] merge from trunk.
Diffstat (limited to 'src/H5Fsuper_cache.c')
-rw-r--r--src/H5Fsuper_cache.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index ac1f840..c2c7bc9 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -28,8 +28,8 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#include "H5Fmodule.h" /* This source code file is part of the H5F module */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
/***********/
@@ -199,7 +199,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
unsigned super_vers; /* Superblock version */
uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */
uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */
- H5F_super_t *ret_value; /* Return value */
+ H5F_super_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -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() */
@@ -814,7 +824,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata,
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
char drv_name[9]; /* Name of driver */
unsigned drv_vers; /* Version of driver info block */
- H5O_drvinfo_t *ret_value; /* Return value */
+ H5O_drvinfo_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC