summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2020-08-16 20:34:18 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2020-08-16 20:34:18 (GMT)
commit24c23c79d85fd3df3cfbaad41af7d64bb14220ee (patch)
treec084db393afb98b17cac7670e63791135c79f052 /src/H5Dint.c
parentf02e0163724d6e6f611a36addc1cae7ef3800e05 (diff)
parent16349c5fddce8a74644e18d01d7ea8186aaaa255 (diff)
downloadhdf5-24c23c79d85fd3df3cfbaad41af7d64bb14220ee.zip
hdf5-24c23c79d85fd3df3cfbaad41af7d64bb14220ee.tar.gz
hdf5-24c23c79d85fd3df3cfbaad41af7d64bb14220ee.tar.bz2
Merge pull request #2771 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr:hdf5_bmr_HDFFV-10933 to develop
Fixed HDFFV-10933 * commit '16349c5fddce8a74644e18d01d7ea8186aaaa255': Fixed HDFFV-10933
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 079fef7..f99aabb 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1299,18 +1299,24 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
/* Check if the dataset has a non-default DCPL & get important values, if so */
if(new_dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
- H5O_layout_t *layout; /* Dataset's layout information */
- H5O_pline_t *pline; /* Dataset's I/O pipeline information */
- H5O_fill_t *fill; /* Dataset's fill value info */
- H5O_efl_t *efl; /* Dataset's external file list info */
+ H5O_layout_t *layout; /* Dataset's layout information */
+ H5O_pline_t *pline; /* Dataset's I/O pipeline information */
+ H5O_fill_t *fill; /* Dataset's fill value info */
+ H5O_efl_t *efl; /* Dataset's external file list info */
+ htri_t ignore_filters = FALSE; /* Ignore optional filters or not */
- /* Check if the filters in the DCPL can be applied to this dataset */
- if(H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset")
+ if((ignore_filters = H5Z_ignore_filters(new_dset->shared->dcpl_id, dt, space))<0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "H5Z_has_optional_filter() failed")
- /* Make the "set local" filter callbacks for this dataset */
- if(H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters")
+ if(FALSE == ignore_filters) {
+ /* Check if the filters in the DCPL can be applied to this dataset */
+ if(H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset")
+
+ /* Make the "set local" filter callbacks for this dataset */
+ if(H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters")
+ } /* ignore_filters */
/* Get new dataset's property list object */
if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id)))
@@ -1334,9 +1340,11 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve external file list")
efl_copied = TRUE;
- /* Check that chunked layout is used if filters are enabled */
- if(pline->nused > 0 && H5D_CHUNKED != layout->type)
- HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+ if(FALSE == ignore_filters) {
+ /* Check that chunked layout is used if filters are enabled */
+ if(pline->nused > 0 && H5D_CHUNKED != layout->type)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+ }
/* Check if the alloc_time is the default and error out */
if(fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)