From 83cd06479ce3e93653f287faacf00edf75e9f16d Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 8 Mar 2017 16:27:02 -0600 Subject: Modify plugin to open DAOS container in read only mode when the HDF5 file is opened read only. --- src/H5VLdaosm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12