diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 13:39:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 13:39:56 (GMT) |
commit | 74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch) | |
tree | d0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /src/H5FSsection.c | |
parent | 4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff) | |
download | hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2 |
[svn-r18702] Description:
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/H5FSsection.c')
-rw-r--r-- | src/H5FSsection.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/H5FSsection.c b/src/H5FSsection.c index bd31b63..7c0ab72 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -206,6 +206,7 @@ done: static herr_t H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5AC_protect_t accmode) { + H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_lock) @@ -231,7 +232,10 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info") /* Re-protect the section info with read-write access */ - if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, H5AC_WRITE))) + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + cache_udata.fspace = fspace; + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC_WRITE))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") /* Switch the access mode we have */ @@ -250,7 +254,10 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", FUNC, fspace->sect_addr); #endif /* H5FS_SINFO_DEBUG */ /* Protect the free space sections */ - if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, accmode))) + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + cache_udata.fspace = fspace; + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, accmode))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") /* Remember that we protected the section info & the access mode */ @@ -558,7 +565,7 @@ H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, /* Increment amount of space required to serialize all sections */ #ifdef QAK -HDfprintf(stderr, "%s: sinfo->serial_size = %Zu\n", FUNC, sinfo->serial_size); +HDfprintf(stderr, "%s: sinfo->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size); HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size); #endif /* QAK */ fspace->sinfo->serial_size += cls->serial_size; @@ -620,7 +627,7 @@ H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls) /* Decrement amount of space required to serialize all sections */ #ifdef QAK -HDfprintf(stderr, "%s: fspace->serial_size = %Zu\n", FUNC, fspace->serial_size); +HDfprintf(stderr, "%s: fspace->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size); HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size); #endif /* QAK */ fspace->sinfo->serial_size -= cls->serial_size; |