diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-31 18:19:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-31 18:19:49 (GMT) |
commit | 2d74d46d3fe259ed51b2b996b56559563999e852 (patch) | |
tree | faff172323e140a2446f90e935589708f9bd0830 /src/H5EA.c | |
parent | 7191f26717255667e86c86559ffc316f73f4c1bd (diff) | |
download | hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.zip hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.tar.gz hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.tar.bz2 |
[svn-r16392] Description:
Bring r16367:16391 back from trunk into revise_chunks branch.
Tested on:
FreeBSD 6.3/32 (duty)
(h5committest not required on this branch)
Diffstat (limited to 'src/H5EA.c')
-rw-r--r-- | src/H5EA.c | 30 |
1 files changed, 5 insertions, 25 deletions
@@ -355,15 +355,9 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); HDfprintf(stderr, "%s: Index block address not defined!\n", FUNC, idx); #endif /* QAK */ /* Create the index block */ - hdr->idx_blk_addr = H5EA__iblock_create(hdr, dxpl_id); + hdr->idx_blk_addr = H5EA__iblock_create(hdr, dxpl_id, &hdr_dirty); if(!H5F_addr_defined(hdr->idx_blk_addr)) H5E_THROW(H5E_CANTCREATE, "unable to create index block") - - /* Increment count of elements "realized" */ - hdr->stats.nelmts += hdr->cparam.idx_blk_elmts; - - /* Mark the header dirty */ - hdr_dirty = TRUE; } /* end if */ #ifdef QAK HDfprintf(stderr, "%s: Index block address is: %a\n", FUNC, hdr->idx_blk_addr); @@ -415,18 +409,13 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i /* Create data block */ 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); + dblk_addr = H5EA__dblock_create(hdr, dxpl_id, &hdr_dirty, 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") /* Set data block address in index block */ iblock->dblk_addrs[dblk_idx] = dblk_addr; iblock_cache_flags |= H5AC__DIRTIED_FLAG; - - /* Increment count of elements "realized" and actual data blocks created */ - hdr->stats.ndata_blks++; - hdr->stats.nelmts += hdr->sblk_info[sblk_idx].dblk_nelmts; - hdr_dirty = TRUE; } /* end if */ /* Protect data block */ @@ -452,7 +441,7 @@ HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_i haddr_t sblk_addr; /* Address of data block created */ /* Create super block */ - sblk_addr = H5EA__sblock_create(hdr, dxpl_id, sblk_idx); + sblk_addr = H5EA__sblock_create(hdr, dxpl_id, &hdr_dirty, sblk_idx); #ifdef QAK HDfprintf(stderr, "%s: New super block address is: %a\n", FUNC, sblk_addr); #endif /* QAK */ @@ -462,10 +451,6 @@ HDfprintf(stderr, "%s: New super block address is: %a\n", FUNC, sblk_addr); /* Set super block address in index block */ iblock->sblk_addrs[sblk_off] = sblk_addr; iblock_cache_flags |= H5AC__DIRTIED_FLAG; - - /* Increment count of actual super blocks created */ - hdr->stats.nsuper_blks++; - hdr_dirty = TRUE; } /* end if */ /* Protect super block */ @@ -486,18 +471,13 @@ HDfprintf(stderr, "%s: dblk_idx = %u, sblock->ndblks = %Zu\n", FUNC, dblk_idx, s /* Create data block */ 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); + dblk_addr = H5EA__dblock_create(hdr, dxpl_id, &hdr_dirty, dblk_off, sblock->dblk_nelmts); if(!H5F_addr_defined(dblk_addr)) H5E_THROW(H5E_CANTCREATE, "unable to create extensible array data block") /* Set data block address in index block */ sblock->dblk_addrs[dblk_idx] = dblk_addr; sblock_cache_flags |= H5AC__DIRTIED_FLAG; - - /* Increment count of elements "realized" and actual data blocks created */ - hdr->stats.ndata_blks++; - hdr->stats.nelmts += hdr->sblk_info[sblk_idx].dblk_nelmts; - hdr_dirty = TRUE; } /* end if */ #ifdef QAK @@ -832,7 +812,7 @@ CATCH if(dblk_page && H5EA__dblk_page_unprotect(dblk_page, dxpl_id, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array data block page") -END_FUNC(PRIV) /* end H5EA_set() */ +END_FUNC(PRIV) /* end H5EA_get() */ /*------------------------------------------------------------------------- |