summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-12-29 04:03:05 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-12-29 04:03:05 (GMT)
commit100404db91e2ba56a8e03da266750e6624bb88be (patch)
tree074714d471158981ae727d2cfece4d95a29557ab /src
parent5bacc9705539eba07f1fe54d509742fd09903ab7 (diff)
downloadhdf5-100404db91e2ba56a8e03da266750e6624bb88be.zip
hdf5-100404db91e2ba56a8e03da266750e6624bb88be.tar.gz
hdf5-100404db91e2ba56a8e03da266750e6624bb88be.tar.bz2
[svn-r28735] Fix for incorrect chunk size setup with array types in new
chunk indices (extensible and fixed arrays, v2 B-trees) which was reported by ITER (JIRA issue SWMR-99). Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 Autotools serial, parallel (MPICH 3.1.4)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c71
-rw-r--r--src/H5Dlayout.c112
-rw-r--r--src/H5Dpkg.h1
-rw-r--r--src/H5Olayout.c116
4 files changed, 166 insertions, 134 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 7b5df07..1a44901 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -525,6 +525,52 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D__chunk_set_sizes
+ *
+ * Purpose: Sets chunk and type sizes.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Dana Robinson
+ * December 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5D__chunk_set_sizes(H5D_t *dset)
+{
+ uint64_t chunk_size; /* Size of chunk in bytes */
+ unsigned u; /* Iterator */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(dset);
+
+ /* Increment # of chunk dimensions, to account for datatype size as last element */
+ dset->shared->layout.u.chunk.ndims++;
+
+ /* Set the last dimension of the chunk size to the size of the datatype */
+ dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = (uint32_t)H5T_GET_SIZE(dset->shared->type);
+
+ /* Compute and store the total size of a chunk */
+ /* (Use 64-bit value to ensure that we can detect >4GB chunks) */
+ for(u = 1, chunk_size = (uint64_t)dset->shared->layout.u.chunk.dim[0]; u < dset->shared->layout.u.chunk.ndims; u++)
+ chunk_size *= (uint64_t)dset->shared->layout.u.chunk.dim[u];
+
+ /* Check for chunk larger than can be represented in 32-bits */
+ /* (Chunk size is encoded in 32-bit value in v1 B-tree records) */
+ if(chunk_size > (uint64_t)0xffffffff)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be < 4GB")
+
+ H5_CHECKED_ASSIGN(dset->shared->layout.u.chunk.size, uint32_t, chunk_size, uint64_t);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__chunk_set_sizes */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__chunk_construct
*
* Purpose: Constructs new chunked layout information for dataset
@@ -539,8 +585,6 @@ done:
static herr_t
H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
{
- const H5T_t *type = dset->shared->type; /* Convenience pointer to dataset's datatype */
- uint64_t chunk_size; /* Size of chunk in bytes */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -553,22 +597,18 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
/* Check for invalid chunk dimension rank */
if(0 == dset->shared->layout.u.chunk.ndims)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "no chunk information set?")
-
- /* Set up layout information */
if(dset->shared->layout.u.chunk.ndims != dset->shared->ndims)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimensionality of chunks doesn't match the dataspace")
- /* Increment # of chunk dimensions, to account for datatype size as last element */
- dset->shared->layout.u.chunk.ndims++;
+ /* Set chunk sizes */
+ if(H5D__chunk_set_sizes(dset) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes")
HDassert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
/* Chunked storage is not compatible with external storage (currently) */
if(dset->shared->dcpl_cache.efl.nused > 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "external storage not supported with chunked layout")
- /* Set the last dimension of the chunk size to the size of the datatype */
- dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = (uint32_t)H5T_GET_SIZE(type);
-
/* Sanity check dimensions */
for(u = 0; u < dset->shared->layout.u.chunk.ndims - 1; u++) {
/* Don't allow zero-sized chunk dimensions */
@@ -584,19 +624,6 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be <= maximum dimension size for fixed-sized dimensions")
} /* end for */
- /* Compute the total size of a chunk */
- /* (Use 64-bit value to ensure that we can detect >4GB chunks) */
- for(u = 1, chunk_size = (uint64_t)dset->shared->layout.u.chunk.dim[0]; u < dset->shared->layout.u.chunk.ndims; u++)
- chunk_size *= (uint64_t)dset->shared->layout.u.chunk.dim[u];
-
- /* Check for chunk larger than can be represented in 32-bits */
- /* (Chunk size is encoded in 32-bit value in v1 B-tree records) */
- if(chunk_size > (uint64_t)0xffffffff)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be < 4GB")
-
- /* Retain computed chunk size */
- H5_CHECKED_ASSIGN(dset->shared->layout.u.chunk.size, uint32_t, chunk_size, uint64_t);
-
/* Reset address and pointer of the array struct for the chunked storage index */
if(H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index")
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 37cf2cc..293ee42 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -23,10 +23,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLprivate.h" /* Local heaps */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLprivate.h" /* Local heaps */
/****************/
@@ -61,15 +61,15 @@
/*-------------------------------------------------------------------------
- * Function: H5D__layout_set_io_ops
+ * Function: H5D__layout_set_io_ops
*
- * Purpose: Set the I/O operation function pointers for a dataset,
+ * Purpose: Set the I/O operation function pointers for a dataset,
* according to the dataset's layout
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, March 20, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, March 20, 2008
*
*-------------------------------------------------------------------------
*/
@@ -105,7 +105,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
dataset->shared->layout.storage.u.chunk.ops = H5D_COPS_NONE;
break;
- case H5D_CHUNK_IDX_SINGLE:
+ case H5D_CHUNK_IDX_SINGLE:
dataset->shared->layout.storage.u.chunk.ops = H5D_COPS_SINGLE;
break;
@@ -226,16 +226,16 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, 0, "v1 B-tree index type found for layout message >v3")
case H5D_CHUNK_IDX_NONE:
- /* nothing */
+ /* nothing */
break;
- case H5D_CHUNK_IDX_SINGLE:
- /* Possible filter information */
- if(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
- ret_value += H5F_SIZEOF_SIZE(f); /* Size of chunk (in file) */
- ret_value += 4; /* Filter mask for chunk */
- } /* end if */
- break;
+ case H5D_CHUNK_IDX_SINGLE:
+ /* Possible filter information */
+ if(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
+ ret_value += H5F_SIZEOF_SIZE(f); /* Size of chunk (in file) */
+ ret_value += 4; /* Filter mask for chunk */
+ } /* end if */
+ break;
case H5D_CHUNK_IDX_FARRAY:
/* Fixed array creation parameters */
@@ -247,7 +247,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
ret_value += H5D_EARRAY_CREATE_PARAM_SIZE;
break;
- case H5D_CHUNK_IDX_BT2:
+ case H5D_CHUNK_IDX_BT2:
/* v2 B-tree creation parameters */
ret_value += H5D_BT2_CREATE_PARAM_SIZE;
break;
@@ -282,10 +282,10 @@ done:
* Function: H5D__layout_set_latest_version
*
* Purpose: Set the encoding for a layout to the latest version.
- * Part of the coding in this routine is moved to
- * H5D__layout_set_latest_indexing().
+ * Part of the coding in this routine is moved to
+ * H5D__layout_set_latest_indexing().
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Thursday, January 15, 2009
@@ -321,9 +321,9 @@ done:
* Function: H5D__layout_set_latest_indexing
*
* Purpose: Set the latest indexing type for a layout message
- * This is moved from H5D_layout_set_latest_version().
+ * This is moved from H5D_layout_set_latest_version().
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Thursday, January 15, 2009
@@ -353,25 +353,25 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "invalid dataspace rank")
ndims = (unsigned)sndims;
- /* Avoid scalar/null dataspace */
- if(ndims > 0) {
- hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
- hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
- unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
- hbool_t single = TRUE; /* Fulfill single chunk indexing */
- unsigned u; /* Local index variable */
-
- /* Query the dataspace's dimensions */
- if(H5S_get_simple_extent_dims(space, cur_dims, max_dims) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace max. dimensions")
-
- /* Spin through the max. dimensions, looking for unlimited dimensions */
- for(u = 0; u < ndims; u++) {
- if(max_dims[u] == H5S_UNLIMITED)
- unlim_count++;
- if(cur_dims[u] != max_dims[u] || cur_dims[u] != layout->u.chunk.dim[u])
- single = FALSE;
- } /* end for */
+ /* Avoid scalar/null dataspace */
+ if(ndims > 0) {
+ hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
+ hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
+ unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
+ hbool_t single = TRUE; /* Fulfill single chunk indexing */
+ unsigned u; /* Local index variable */
+
+ /* Query the dataspace's dimensions */
+ if(H5S_get_simple_extent_dims(space, cur_dims, max_dims) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace max. dimensions")
+
+ /* Spin through the max. dimensions, looking for unlimited dimensions */
+ for(u = 0; u < ndims; u++) {
+ if(max_dims[u] == H5S_UNLIMITED)
+ unlim_count++;
+ if(cur_dims[u] != max_dims[u] || cur_dims[u] != layout->u.chunk.dim[u])
+ single = FALSE;
+ } /* end for */
/* Chunked datasets with unlimited dimension(s) */
if(unlim_count) { /* dataset with unlimited dimension(s) must be chunked */
@@ -407,7 +407,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
} /* end else */
} /* end if */
else { /* Chunked dataset with fixed dimensions */
- /* Check for correct condition for using "single chunk" chunk index */
+ /* Check for correct condition for using "single chunk" chunk index */
if(single) {
layout->u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE;
layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE;
@@ -443,15 +443,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D__layout_oh_create
+ * Function: H5D__layout_oh_create
*
- * Purpose: Create layout/pline/efl information for dataset
+ * Purpose: Create layout/pline/efl information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
@@ -460,7 +460,7 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
hid_t dapl_id)
{
H5O_layout_t *layout; /* Dataset's layout information */
- const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
+ const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
unsigned layout_mesg_flags; /* Flags for inserting layout message */
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
@@ -589,6 +589,8 @@ herr_t
H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist)
{
htri_t msg_exists; /* Whether a particular type of message exists */
+ uint64_t chunk_size; /* Size of chunk in bytes */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -645,12 +647,14 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
/* Adjust chunk dimensions to omit datatype size (in last dimension) for creation property */
if(H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims--;
+
/* Copy layout to the DCPL */
if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &dataset->shared->layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout")
- /* Adjust chunk dimensions back again (*sigh*) */
- if(H5D_CHUNKED == dataset->shared->layout.type)
- dataset->shared->layout.u.chunk.ndims++;
+
+ /* Set chunk sizes */
+ if(H5D__chunk_set_sizes(dataset) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index fe38dd4..da6b61e 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -697,6 +697,7 @@ H5_DLL herr_t H5D__chunk_update_old_edge_chunks(H5D_t *dset, hid_t dxpl_id,
hsize_t old_dim[]);
H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id,
const hsize_t *old_dim);
+H5_DLL herr_t H5D__chunk_set_sizes(H5D_t *dset);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[]);
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index ca56255..5963094 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -19,19 +19,19 @@
* Purpose: Messages related to data layout.
*/
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Sprivate.h" /* Dataspaces */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Sprivate.h" /* Dataspaces */
/* Local macros */
@@ -53,31 +53,31 @@ static herr_t H5O__layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
static void *H5O__layout_copy_file(H5F_t *file_src, void *mesg_src,
H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O__layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O__layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
+ FILE * stream, int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_LAYOUT[1] = {{
- H5O_LAYOUT_ID, /*message id number */
- "layout", /*message name for debugging */
- sizeof(H5O_layout_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__layout_decode, /*decode message */
- H5O__layout_encode, /*encode message */
- H5O__layout_copy, /*copy the native value */
- H5O__layout_size, /*size of message on disk */
- H5O__layout_reset, /*reset method */
- H5O__layout_free, /*free the struct */
- H5O__layout_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O__layout_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__layout_debug /*debug the message */
+ H5O_LAYOUT_ID, /* message id number */
+ "layout", /* message name for debugging */
+ sizeof(H5O_layout_t), /* native message size */
+ 0, /* messages are sharable? */
+ H5O__layout_decode, /* decode message */
+ H5O__layout_encode, /* encode message */
+ H5O__layout_copy, /* copy the native value */
+ H5O__layout_size, /* size of message on disk */
+ H5O__layout_reset, /* reset method */
+ H5O__layout_free, /* free the struct */
+ H5O__layout_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /* set share method */
+ NULL, /* can share method */
+ NULL, /* pre copy native value to file */
+ H5O__layout_copy_file, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__layout_debug /* debug the message */
}};
@@ -125,7 +125,7 @@ H5O__layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for layout message")
if(mesg->version < H5O_LAYOUT_VERSION_3) {
- unsigned ndims; /* Num dimensions in chunk */
+ unsigned ndims; /* Num dimensions in chunk */
/* Dimensionality */
ndims = *p++;
@@ -297,21 +297,21 @@ H5O__layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED
switch(mesg->u.chunk.idx_type) {
case H5D_CHUNK_IDX_BTREE:
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "v1 B-tree index type should never be in a v4 layout message")
- break;
+ break;
- case H5D_CHUNK_IDX_NONE: /* Implicit Index */
+ case H5D_CHUNK_IDX_NONE: /* Implicit Index */
mesg->storage.u.chunk.ops = H5D_COPS_NONE;
- break;
+ break;
- case H5D_CHUNK_IDX_SINGLE: /* Single Chunk Index */
- if(mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
+ case H5D_CHUNK_IDX_SINGLE: /* Single Chunk Index */
+ if(mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
H5F_DECODE_LENGTH(f, p, mesg->storage.u.chunk.u.single.nbytes);
UINT32DECODE(p, mesg->storage.u.chunk.u.single.filter_mask);
} /* end if */
/* Set the chunk operations */
mesg->storage.u.chunk.ops = H5D_COPS_SINGLE;
- break;
+ break;
case H5D_CHUNK_IDX_FARRAY:
/* Fixed array creation parameters */
@@ -345,8 +345,8 @@ H5O__layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED
mesg->storage.u.chunk.ops = H5D_COPS_EARRAY;
break;
- case H5D_CHUNK_IDX_BT2: /* v2 B-tree index */
- UINT32DECODE(p, mesg->u.chunk.u.btree2.cparam.node_size);
+ case H5D_CHUNK_IDX_BT2: /* v2 B-tree index */
+ UINT32DECODE(p, mesg->u.chunk.u.btree2.cparam.node_size);
mesg->u.chunk.u.btree2.cparam.split_percent = *p++;
mesg->u.chunk.u.btree2.cparam.merge_percent = *p++;
@@ -633,15 +633,15 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "v1 B-tree index type should never be in a v4 layout message")
break;
- case H5D_CHUNK_IDX_NONE: /* Implicit */
+ case H5D_CHUNK_IDX_NONE: /* Implicit */
break;
- case H5D_CHUNK_IDX_SINGLE: /* Single Chunk */
- /* Filter information */
- if(mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
- H5F_ENCODE_LENGTH(f, p, mesg->storage.u.chunk.u.single.nbytes);
- UINT32ENCODE(p, mesg->storage.u.chunk.u.single.filter_mask);
- } /* end if */
+ case H5D_CHUNK_IDX_SINGLE: /* Single Chunk */
+ /* Filter information */
+ if(mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
+ H5F_ENCODE_LENGTH(f, p, mesg->storage.u.chunk.u.single.nbytes);
+ UINT32ENCODE(p, mesg->storage.u.chunk.u.single.filter_mask);
+ } /* end if */
break;
case H5D_CHUNK_IDX_FARRAY:
@@ -658,8 +658,8 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
*p++ = mesg->u.chunk.u.earray.cparam.max_dblk_page_nelmts_bits;
break;
- case H5D_CHUNK_IDX_BT2: /* v2 B-tree index */
- UINT32ENCODE(p, mesg->u.chunk.u.btree2.cparam.node_size);
+ case H5D_CHUNK_IDX_BT2: /* v2 B-tree index */
+ UINT32ENCODE(p, mesg->u.chunk.u.btree2.cparam.node_size);
*p++ = mesg->u.chunk.u.btree2.cparam.split_percent;
*p++ = mesg->u.chunk.u.btree2.cparam.merge_percent;
break;
@@ -669,7 +669,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid chunk index type")
} /* end switch */
- /*
+ /*
* Implicit index: Address of the chunks
* Single chunk index: address of the single chunk
* Other indexes: chunk index address
@@ -918,14 +918,14 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
/*-------------------------------------------------------------------------
- * Function: H5O__layout_reset
+ * Function: H5O__layout_reset
*
- * Purpose: Frees resources within a data type message, but doesn't free
- * the message itself.
+ * Purpose: Frees resources within a data type message, but doesn't free
+ * the message itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, September 13, 2002
*
*-------------------------------------------------------------------------
@@ -1205,7 +1205,7 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const v
"Index Type:", "Implicit");
break;
- case H5D_CHUNK_IDX_SINGLE:
+ case H5D_CHUNK_IDX_SINGLE:
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Index Type:", "Single Chunk");
break;
@@ -1222,7 +1222,7 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const v
/* (Should print the extensible array creation parameters) */
break;
- case H5D_CHUNK_IDX_BT2:
+ case H5D_CHUNK_IDX_BT2:
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Index Type:", "v2 B-tree");
/* (Should print the v2-Btree creation parameters) */