summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-07-31 21:12:27 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-31 21:12:27 (GMT)
commit6caa0c5ac5f998c30ed59e5b0722de39257aeb05 (patch)
treef167a7ca8fb2c7da76f853ce07a6a84f710d3997
parent7321d0e813eb2371725ba3c5d207899ff759a0a1 (diff)
downloadhdf5-6caa0c5ac5f998c30ed59e5b0722de39257aeb05.zip
hdf5-6caa0c5ac5f998c30ed59e5b0722de39257aeb05.tar.gz
hdf5-6caa0c5ac5f998c30ed59e5b0722de39257aeb05.tar.bz2
Let us use virtual datasets with multiple source files that are open with VFD
SWMR mode: pass H5P_FILE_ACCESS_ANY_VFD so that the discrepancy between VFD SWMR file-access properties and default file-access properties is ignored.
-rw-r--r--src/H5Dvirtual.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 52f83a2..ae60efa 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -925,7 +925,14 @@ H5D__virtual_open_source_dset(const H5D_t *vdset,
intent = H5F_INTENT(vdset->oloc.file);
/* Try opening the file */
- src_file = H5F_prefix_open_file(vdset->oloc.file, H5F_PREFIX_VDS, vdset->shared->vds_prefix, source_dset->file_name, intent, vdset->shared->layout.storage.u.virt.source_fapl);
+ /* XXX Pass the special file-access property list ID,
+ * H5P_FILE_ACCESS_ANY_VFD, so that if the file is already open in
+ * VFD SWMR mode, the library just creates a new H5F_t for the file
+ * instead of returning an error because of the discrepancy between
+ * the default file-access properties and the already-open file's
+ * VFD SWMR properties.
+ */
+ src_file = H5F_prefix_open_file(vdset->oloc.file, H5F_PREFIX_VDS, vdset->shared->vds_prefix, source_dset->file_name, intent, H5P_FILE_ACCESS_ANY_VFD);
/* If we opened the source file here, we should close it when leaving */
if(src_file)