diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-19 16:45:36 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-19 16:45:36 (GMT) |
commit | b1dcfc7a84e5e804c84426fc6fa10d323c7f3b24 (patch) | |
tree | 998dc51207112e849bca58e0770fc9731de6f2a6 /src/H5Dvirtual.c | |
parent | 6909d2033f0d7d87c9fc03dfc778ea3e9437032a (diff) | |
download | hdf5-b1dcfc7a84e5e804c84426fc6fa10d323c7f3b24.zip hdf5-b1dcfc7a84e5e804c84426fc6fa10d323c7f3b24.tar.gz hdf5-b1dcfc7a84e5e804c84426fc6fa10d323c7f3b24.tar.bz2 |
[svn-r27528] Modify printf implementation to not open source datasets that were previously
opened when calculating the VDS extent, instead assuming they still exist.
Tested: ummon
Diffstat (limited to 'src/H5Dvirtual.c')
-rw-r--r-- | src/H5Dvirtual.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 9a25494..46255dd 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -776,15 +776,23 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") /* Open the source dataset */ - if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) + if(NULL == (source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, vdset->shared->layout.storage.u.virt.source_dapl, dxpl_id))) { H5E_clear_stack(NULL); /* Quick hack until proper support for H5Dopen with missing file is implemented */ - else + + /* Dataset does not exist */ + source_dset->dset_exists = FALSE; + } /* end if */ + else { + /* Dataset exists */ + source_dset->dset_exists = TRUE; + /* Patch the source selection if necessary */ if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { if(H5S_extent_copy(virtual_ent->source_select, source_dset->dset->shared->space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; } /* end if */ + } /* end else */ } /* end if */ done: @@ -1434,8 +1442,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) } /* end else */ } /* end if */ - /* Check if the dataset is already open */ - if(storage->list[i].sub_dset[j].dset) + /* Check if the dataset was already opened */ + if(storage->list[i].sub_dset[j].dset_exists) first_missing = j + 1; else { /* Resolve file name */ |