mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[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
This commit is contained in:
parent
6909d2033f
commit
b1dcfc7a84
@ -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")
|
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group")
|
||||||
|
|
||||||
/* Open the source dataset */
|
/* 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 */
|
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 */
|
/* Patch the source selection if necessary */
|
||||||
if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) {
|
if(virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) {
|
||||||
if(H5S_extent_copy(virtual_ent->source_select, source_dset->dset->shared->space) < 0)
|
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")
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent")
|
||||||
virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT;
|
virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT;
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
} /* end else */
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -1434,8 +1442,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id)
|
|||||||
} /* end else */
|
} /* end else */
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
/* Check if the dataset is already open */
|
/* Check if the dataset was already opened */
|
||||||
if(storage->list[i].sub_dset[j].dset)
|
if(storage->list[i].sub_dset[j].dset_exists)
|
||||||
first_missing = j + 1;
|
first_missing = j + 1;
|
||||||
else {
|
else {
|
||||||
/* Resolve file name */
|
/* Resolve file name */
|
||||||
|
@ -426,6 +426,7 @@ typedef struct H5O_storage_virtual_srcdset_t {
|
|||||||
struct H5S_t *clipped_source_select; /* Clipped version of source_select */
|
struct H5S_t *clipped_source_select; /* Clipped version of source_select */
|
||||||
struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */
|
struct H5S_t *clipped_virtual_select; /* Clipped version of virtual_select */
|
||||||
struct H5D_t *dset; /* Source dataset */
|
struct H5D_t *dset; /* Source dataset */
|
||||||
|
hbool_t dset_exists; /* Whether the dataset exists (was opened successfully) */
|
||||||
|
|
||||||
/* Temporary - only used during I/O operation, NULL at all other times */
|
/* Temporary - only used during I/O operation, NULL at all other times */
|
||||||
struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */
|
struct H5S_t *projected_mem_space; /* Selection within mem_space for this mapping */
|
||||||
|
Loading…
Reference in New Issue
Block a user