From 026e4e531a088888ed70d1656e13c3317736dc66 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 29 Jun 2006 13:06:16 -0500 Subject: [svn-r12445] Purpose: Bug #281 Description: The previous fix for bug #281 was not safe. Files got corrupted in some cases. Needs a more comprehensive fix for it. Undo the unsafe fix for now. Platforms tested: h5committested. --- src/H5D.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/H5D.c b/src/H5D.c index 0fc4168..bc17e49 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -2918,7 +2918,7 @@ H5D_extend (H5D_t *dataset, const hsize_t *size, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices") /* Allocate space for the new parts of the dataset, if appropriate */ - if(dataset->shared->alloc_time == H5D_ALLOC_TIME_EARLY || IS_H5FD_MPI(dataset->oloc.file)) + if(dataset->shared->alloc_time == H5D_ALLOC_TIME_EARLY) if(H5D_alloc_storage(dataset->oloc.file, dxpl_id, dataset, H5D_ALLOC_EXTEND, TRUE, FALSE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value") } /* end if */ @@ -3092,13 +3092,11 @@ H5D_alloc_storage (H5F_t *f, hid_t dxpl_id, H5D_t *dset/*in,out*/, H5D_time_allo init_space=1; } /* end if */ - /* If (space allocation is set to 'early' or file is opened - * by parallel mode) and we are extending the dataset, - * indicate that space should be allocated, so the - * B-tree gets expanded. -QAK + /* If space allocation is set to 'early' and we are extending + * the dataset, indicate that space should be allocated, so the + * B-tree gets expanded. -QAK */ - if((dset->shared->alloc_time == H5D_ALLOC_TIME_EARLY || - IS_H5FD_MPI(dset->oloc.file)) && + if(dset->shared->alloc_time == H5D_ALLOC_TIME_EARLY && time_alloc == H5D_ALLOC_EXTEND) { init_space=1; -- cgit v0.12