diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 14:47:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 14:47:26 (GMT) |
commit | 661734d541d076c26901190be44e687ad87ef576 (patch) | |
tree | d4aa2ac60e7c3af1ca29b5c20eb9c4202fc31030 /src/H5Pdcpl.c | |
parent | 92f5db9daf63a4533db475745782f8898b53c489 (diff) | |
download | hdf5-661734d541d076c26901190be44e687ad87ef576.zip hdf5-661734d541d076c26901190be44e687ad87ef576.tar.gz hdf5-661734d541d076c26901190be44e687ad87ef576.tar.bz2 |
[svn-r16356] Description:
Bring r16354 back from trunk:
Refactor internal layout information, making it easier to add another
type of chunk index.
Tested on:
FreeBSD/32 (duty)
(other configurations tested with original change)
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r-- | src/H5Pdcpl.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index d84997a..43696fc 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -50,7 +50,7 @@ /* Define default layout information */ #define H5D_DEF_LAYOUT_COMPACT_INIT {(hbool_t)FALSE, (size_t)0, NULL} #define H5D_DEF_LAYOUT_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0} -#define H5D_DEF_LAYOUT_CHUNK_INIT {HADDR_UNDEF, (unsigned)1, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, (uint32_t)0, NULL, NULL} +#define H5D_DEF_LAYOUT_CHUNK_INIT {H5D_CHUNK_BTREE, (unsigned)1, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, (uint32_t)0, NULL, {{HADDR_UNDEF, NULL}}} #ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, { .compact = H5D_DEF_LAYOUT_COMPACT_INIT }} #define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, { .contig = H5D_DEF_LAYOUT_CONTIG_INIT }} @@ -222,9 +222,6 @@ done: * Programmer: Raymond Lu * Tuesday, October 2, 2001 * - * Modifications: pvn, April 02, 2007 - * Reset external file list slots name_offset to a state when created - * *------------------------------------------------------------------------- */ /* ARGSUSED */ @@ -277,9 +274,15 @@ H5P_dcrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data) break; case H5D_CHUNKED: - dst_layout.u.chunk.addr = HADDR_UNDEF; + /* Reset chunk size */ dst_layout.u.chunk.size = 0; - dst_layout.u.chunk.btree_shared = NULL; + + /* Reset index info, if the chunk ops are set */ + if(dst_layout.u.chunk.ops) + if(H5D_chunk_idx_reset(&dst_layout) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to reset chunked storage index in dest") + + /* Reset chunk index ops */ dst_layout.u.chunk.ops = NULL; break; |