summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-27 14:00:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-27 14:00:07 (GMT)
commit5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71 (patch)
tree8087d74d2e1862e4127bd92cf66ee543d0807b90 /src/H5Pdcpl.c
parent85a1c5c27377a12f1b7dca29ad90b7484d7fcfed (diff)
downloadhdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.zip
hdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.tar.gz
hdf5-5cd054dd5c1270a4f6e344ffdb99e8e6e4e1eb71.tar.bz2
[svn-r16354] Description:
Bring r16353 back from revise_chunks branch: Refactor internal layout information, making it easier to add another type of chunk index. Tested on: FreeBSD/32 6.3 (duty) (other platforms tested with original patch)
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c15
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;