summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-08 18:37:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-08 18:37:24 (GMT)
commit2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de (patch)
treed30f170a49ca3186bc8beddac7bf3523dfdb1ad3 /src/H5Dint.c
parent596f9b43271b088bf4f13783024f0a75ac05011c (diff)
downloadhdf5-2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de.zip
hdf5-2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de.tar.gz
hdf5-2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de.tar.bz2
[svn-r16283] Description:
Bring revisions 16218:16280 back from trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 9ccd7e0..37a4701 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -2284,6 +2284,20 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
if(0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
+ /* Check if we are allowed to modify the space; only datasets with chunked and external storage are allowed to be modified */
+ if( H5D_COMPACT == dset->shared->layout.type )
+ {
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact storage")
+ }
+ if( H5D_CONTIGUOUS == dset->shared->layout.type )
+ {
+ if( 0 == dset->shared->dcpl_cache.efl.nused)
+ {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage")
+ }
+
+ }
+
/* Check if the filters in the DCPL will need to encode, and if so, can they? */
if(H5D_check_filters(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters")