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/H5HFdblock.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/H5HFdblock.c')
-rw-r--r-- | src/H5HFdblock.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index e00dbf3..a68cc75 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -437,8 +437,8 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, size_t dblock_size, H5HF_indirect_t *par_iblock, unsigned par_entry, H5AC_protect_t rw) { - H5HF_parent_t par_info; /* Parent info for loading block */ H5HF_direct_t *dblock; /* Direct block from cache */ + H5HF_dblock_cache_ud_t udata; /* parent and other infor for deserializing direct block */ H5HF_direct_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_protect) @@ -451,12 +451,36 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr, HDassert(dblock_size > 0); /* Set up parent info */ - par_info.hdr = hdr; - par_info.iblock = par_iblock; - par_info.entry = par_entry; + udata.par_info.hdr = hdr; + udata.par_info.iblock = par_iblock; + udata.par_info.entry = par_entry; + + /* set up the file pointer in the user data */ + udata.f = hdr->f; + + /* set up the direct block size */ + udata.dblock_size = dblock_size; + + /* compute the on disk image size -- observe that odi_size and + * dblock_size will be identical if there is no filtering. + */ + if(hdr->filter_len > 0) { + if(par_iblock == NULL) { + udata.filter_mask = hdr->pline_root_direct_filter_mask; + } /* end if */ + else { + /* Sanity check */ + HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr)); + + /* Set up parameters to read filtered direct block */ + udata.filter_mask = par_iblock->filt_ents[par_entry].filter_mask; + } /* end else */ + } /* end if */ + else + udata.filter_mask = 0; /* Protect the direct block */ - if(NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &dblock_size, &par_info, rw))) + if(NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, rw))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap direct block") /* Set the return value */ |