summaryrefslogtreecommitdiffstats
path: root/src/H5FS.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 14:45:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 14:45:57 (GMT)
commit3f3a900177d9464376ea7baf5f989cbfa0e86b0a (patch)
tree38ed174516c0c65bcbbe4c543c54119bb83d5452 /src/H5FS.c
parentf2190dd264fb97dfb699888d20c4ab6c112e45aa (diff)
downloadhdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.zip
hdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.tar.gz
hdf5-3f3a900177d9464376ea7baf5f989cbfa0e86b0a.tar.bz2
[svn-r18704] Description:
Bring r18702 from trunk to 1.8 branch: Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5FS.c')
-rw-r--r--src/H5FS.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/H5FS.c b/src/H5FS.c
index a09cb67..48e2920 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -33,6 +33,7 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
#include "H5FSpkg.h" /* File free space */
#include "H5MFprivate.h" /* File memory management */
@@ -55,6 +56,8 @@
/********************/
/* Local Prototypes */
/********************/
+
+/* Section info routines */
static herr_t H5FS_sinfo_free_sect_cb(void *item, void *key, void *op_data);
static herr_t H5FS_sinfo_free_node_cb(void *item, void *key, void *op_data);
@@ -192,7 +195,7 @@ H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, size_t nclasses,
const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment, hsize_t threshold)
{
H5FS_t *fspace = NULL; /* New free space structure */
- H5FS_prot_t fs_prot; /* Information for protecting free space manager */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
H5FS_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FS_open, NULL)
@@ -206,12 +209,13 @@ HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\
HDassert(classes);
/* Initialize user data for protecting the free space manager */
- fs_prot.nclasses = nclasses;
- fs_prot.classes = classes;
- fs_prot.cls_init_udata = cls_init_udata;
+ cache_udata.f = f;
+ cache_udata.nclasses = nclasses;
+ cache_udata.classes = classes;
+ cache_udata.cls_init_udata = cls_init_udata;
/* Protect the free space header */
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &fs_prot, NULL, H5AC_READ)))
+ if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header")
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: fspace->sect_addr = %a\n", FUNC, fspace->sect_addr);
@@ -259,7 +263,7 @@ herr_t
H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr)
{
H5FS_t *fspace = NULL; /* Free space header loaded from file */
- H5FS_prot_t fs_prot; /* Temporary information for protecting free space header */
+ H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FS_delete, FAIL)
@@ -273,12 +277,13 @@ HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_ad
/* Initialize user data for protecting the free space manager */
/* (no class information necessary for delete) */
- fs_prot.nclasses = 0;
- fs_prot.classes = NULL;
- fs_prot.cls_init_udata = NULL;
+ cache_udata.f = f;
+ cache_udata.nclasses = 0;
+ cache_udata.classes = NULL;
+ cache_udata.cls_init_udata = NULL;
/* Protect the free space header */
- if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &fs_prot, NULL, H5AC_WRITE)))
+ if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header")
/* Sanity check */