summaryrefslogtreecommitdiffstats
path: root/src/H5EA.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5EA.c')
-rw-r--r--src/H5EA.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5EA.c b/src/H5EA.c
index 060ee7a..427eb48 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -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")