summaryrefslogtreecommitdiffstats
path: root/src/H5Dlayout.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2020-05-01 22:59:57 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2020-05-01 22:59:57 (GMT)
commitac069841f3e4fd415750ebfa08c9011cfa688418 (patch)
tree3040ba3f71ff5c61dbbe245726a8e6fdfb7d4bd6 /src/H5Dlayout.c
parenta1435404b5ff7cfccbaaa75534fc35a6776b17eb (diff)
downloadhdf5-ac069841f3e4fd415750ebfa08c9011cfa688418.zip
hdf5-ac069841f3e4fd415750ebfa08c9011cfa688418.tar.gz
hdf5-ac069841f3e4fd415750ebfa08c9011cfa688418.tar.bz2
Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
Diffstat (limited to 'src/H5Dlayout.c')
-rw-r--r--src/H5Dlayout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index b882578..e257140 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -559,10 +559,12 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
} /* end if */
/* Create layout message */
- /* (Don't make layout message constant unless allocation time is early and non-filtered, since space may not be allocated) */
+ /* (Don't make layout message constant unless allocation time is early and
+ * non-filtered and has >0 elements, since space may not be allocated -QAK) */
/* (Note: this is relying on H5D__alloc_storage not calling H5O_msg_write during dataset creation) */
if(fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type
- && !dset->shared->dcpl_cache.pline.nused)
+ && !dset->shared->dcpl_cache.pline.nused
+ && (0 != H5S_GET_EXTENT_NPOINTS(dset->shared->space)))
layout_mesg_flags = H5O_MSG_FLAG_CONSTANT;
else
layout_mesg_flags = 0;