summaryrefslogtreecommitdiffstats
path: root/src/H5EA.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-10-01 19:24:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-10-01 19:24:32 (GMT)
commitf75d42241064d6a0b7a0e1ad017e15b5c64b9ca6 (patch)
treee142f11effb7070056ab8d7220535d1ff3a9ea22 /src/H5EA.c
parentd9f91a3a6005cbdee81e2f353f6591cb41bf94ea (diff)
downloadhdf5-f75d42241064d6a0b7a0e1ad017e15b5c64b9ca6.zip
hdf5-f75d42241064d6a0b7a0e1ad017e15b5c64b9ca6.tar.gz
hdf5-f75d42241064d6a0b7a0e1ad017e15b5c64b9ca6.tar.bz2
[svn-r15746] Description:
Add support for extensible array "super block". 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 (kagiso) 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.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/H5EA.c b/src/H5EA.c
index 6f28238..00e1917 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -409,7 +409,7 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i
haddr_t dblk_addr; /* Address of data block created */
/* Create data block */
- dblk_addr = H5EA__dblock_create(iblock, dxpl_id, hdr->sblk_info[sblk_idx].dblk_nelmts);
+ dblk_addr = H5EA__dblock_create(hdr, dxpl_id, hdr->sblk_info[sblk_idx].dblk_nelmts);
if(!H5F_addr_defined(dblk_addr))
H5E_THROW(H5E_CANTCREATE, "unable to create extensible array data block")
@@ -435,7 +435,25 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i
dblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
else {
-HDfprintf(stderr, "%s: Super block index %Hu not supported yet!\n", FUNC, sblk_idx);
+ /* Check if the super block has been allocated on disk yet */
+ if(!H5F_addr_defined(iblock->sblk_addrs[sblk_idx - iblock->nsblks])) {
+ haddr_t sblk_addr; /* Address of data block created */
+
+ /* Create super block */
+ sblk_addr = H5EA__sblock_create(hdr, dxpl_id, sblk_idx);
+ if(!H5F_addr_defined(sblk_addr))
+ H5E_THROW(H5E_CANTCREATE, "unable to create extensible array super block")
+
+ /* Set super block address in index block */
+ iblock->sblk_addrs[sblk_idx - iblock->nsblks] = sblk_addr;
+ iblock_cache_flags |= H5AC__DIRTIED_FLAG;
+
+ /* Increment count of actual super blocks created */
+ hdr->stats.nsuper_blks++;
+ hdr_dirty = TRUE;
+ } /* end if */
+
+HDfprintf(stderr, "%s: Super block index %u not supported yet!\n", FUNC, sblk_idx);
HDassert(0 && "Super block index location not supported!");
} /* end else */
} /* end else */