summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2017-03-08 22:27:02 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2017-03-08 22:27:02 (GMT)
commit83cd06479ce3e93653f287faacf00edf75e9f16d (patch)
treec1a90e5807b23d50d5ac8f411bab18bc8cf5ef52
parent86bc81b4fda4a4b7f06e522b1d4c87a71102174e (diff)
downloadhdf5-83cd06479ce3e93653f287faacf00edf75e9f16d.zip
hdf5-83cd06479ce3e93653f287faacf00edf75e9f16d.tar.gz
hdf5-83cd06479ce3e93653f287faacf00edf75e9f16d.tar.bz2
Modify plugin to open DAOS container in read only mode when the HDF5
file is opened read only.
-rw-r--r--src/H5VLdaosm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5VLdaosm.c b/src/H5VLdaosm.c
index 41223bc..9d64ccc 100644
--- a/src/H5VLdaosm.c
+++ b/src/H5VLdaosm.c
@@ -1040,7 +1040,7 @@ H5VL_daosm_file_open(const char *name, unsigned flags, hid_t fapl_id,
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't connect to pool: %d", ret)
/* Open the container */
- if(0 != (ret = daos_cont_open(file->poh, file->uuid, DAOS_COO_RW, &file->coh, NULL /*&file->co_info*/, NULL /*event*/)))
+ if(0 != (ret = daos_cont_open(file->poh, file->uuid, flags & H5F_ACC_RDWR ? DAOS_COO_RW : DAOS_COO_RO, &file->coh, NULL /*&file->co_info*/, NULL /*event*/)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open container: %d", ret)
/* If a snapshot was requested, use it as the epoch, otherwise query it