diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-11-11 23:30:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-11-11 23:30:37 (GMT) |
commit | 164a8426ea4d10ba2bca71d0a91dacec72cd79e9 (patch) | |
tree | 707ee57516158c4d821bb1f78e365c95069371a3 /src/H5EA.c | |
parent | 05e559c9ec89fc50e7b6b03b5109c22adeb2bfc9 (diff) | |
download | hdf5-164a8426ea4d10ba2bca71d0a91dacec72cd79e9.zip hdf5-164a8426ea4d10ba2bca71d0a91dacec72cd79e9.tar.gz hdf5-164a8426ea4d10ba2bca71d0a91dacec72cd79e9.tar.bz2 |
[svn-r16061] Description:
Store extra information about each block in the metadata for the block,
in the hope that a corrupted file will be easier to recover. (Similar to the
information stored for fractal heaps)
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
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/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) 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-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5EA.c')
-rw-r--r-- | src/H5EA.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -408,9 +408,11 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i /* Check if the data block has been allocated on disk yet */ if(!H5F_addr_defined(iblock->dblk_addrs[dblk_idx])) { haddr_t dblk_addr; /* Address of data block created */ + hsize_t dblk_off; /* Offset of data block in array */ /* Create data block */ - dblk_addr = H5EA__dblock_create(hdr, dxpl_id, hdr->sblk_info[sblk_idx].dblk_nelmts); + dblk_off = hdr->sblk_info[sblk_idx].start_idx + (dblk_idx * hdr->sblk_info[sblk_idx].dblk_nelmts); + dblk_addr = H5EA__dblock_create(hdr, dxpl_id, dblk_off, hdr->sblk_info[sblk_idx].dblk_nelmts); if(!H5F_addr_defined(dblk_addr)) H5E_THROW(H5E_CANTCREATE, "unable to create extensible array data block") @@ -476,9 +478,11 @@ HDfprintf(stderr, "%s: dblk_idx = %u, sblock->ndblks = %Zu\n", FUNC, dblk_idx, s /* Check if the data block has been allocated on disk yet */ if(!H5F_addr_defined(sblock->dblk_addrs[dblk_idx])) { haddr_t dblk_addr; /* Address of data block created */ + hsize_t dblk_off; /* Offset of data block in array */ /* Create data block */ - dblk_addr = H5EA__dblock_create(hdr, dxpl_id, sblock->dblk_nelmts); + dblk_off = hdr->sblk_info[sblk_idx].start_idx + (dblk_idx * hdr->sblk_info[sblk_idx].dblk_nelmts); + dblk_addr = H5EA__dblock_create(hdr, dxpl_id, dblk_off, sblock->dblk_nelmts); if(!H5F_addr_defined(dblk_addr)) H5E_THROW(H5E_CANTCREATE, "unable to create extensible array data block") |