summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-06 13:00:09 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-06 13:00:09 (GMT)
commitb2b24be710cd37cabe4648f017869cd4ec0f2420 (patch)
tree3144df5bd4dc88baa442ca5e86f95b0c6e6dfe77
parentf810a4278c9d736723963b0d2aa8f11ad4e82e68 (diff)
downloadhdf5-b2b24be710cd37cabe4648f017869cd4ec0f2420.zip
hdf5-b2b24be710cd37cabe4648f017869cd4ec0f2420.tar.gz
hdf5-b2b24be710cd37cabe4648f017869cd4ec0f2420.tar.bz2
[svn-r24691] avoid consuming a transaction at file_close when file is opened read only.
-rw-r--r--src/H5VLiod.c7
-rw-r--r--src/H5VLiod_file.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index 45bca63..58f3de6 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -2100,7 +2100,7 @@ H5VL_iod_file_close(void *_file, hid_t UNUSED dxpl_id, void **req)
/* determine the max indexes for the KV, Array, and BLOB IDs used
up by all the processes */
- {
+ if(file->flags != H5F_ACC_RDONLY) {
uint64_t input_indexes[3] = {file->remote_file.kv_oid_index,
file->remote_file.array_oid_index,
file->remote_file.blob_oid_index};
@@ -2121,6 +2121,11 @@ H5VL_iod_file_close(void *_file, hid_t UNUSED dxpl_id, void **req)
input.max_blob_index = 0;
}
}
+ else {
+ input.max_kv_index = 0;
+ input.max_array_index = 0;
+ input.max_blob_index = 0;
+ }
input.coh = file->remote_file.coh;
input.root_oh = file->remote_file.root_oh;
diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c
index 08417b2..0ed1804 100644
--- a/src/H5VLiod_file.c
+++ b/src/H5VLiod_file.c
@@ -331,6 +331,11 @@ H5VL_iod_server_file_open_cb(AXE_engine_t UNUSED axe_engine,
else
HGOTO_ERROR2(H5E_FILE, H5E_CANTINIT, FAIL, "invalid mode");
+ /* MSC - can't open file read only since IOD will fail when object
+ are opened for write */
+ if(mode == IOD_CONT_R)
+ mode = IOD_CONT_RW;
+
if(H5Pget_metadata_integrity_scope(input->fapl_id, &cs_scope) < 0)
HGOTO_ERROR2(H5E_PLIST, H5E_CANTGET, FAIL, "can't get scope for data integrity checks");