summaryrefslogtreecommitdiffstats
path: root/src/H5Pfapl.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-09-12 19:16:49 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-09-12 19:16:49 (GMT)
commit1f4dd5692d16a9638e8be3d208eb05ccaedd3c62 (patch)
treeb38a67a5ce8c21bcd3232e9fc12c31301f2f3b89 /src/H5Pfapl.c
parent0a81436fab1692ed394f83b6d595ad9a32cbc285 (diff)
downloadhdf5-1f4dd5692d16a9638e8be3d208eb05ccaedd3c62.zip
hdf5-1f4dd5692d16a9638e8be3d208eb05ccaedd3c62.tar.gz
hdf5-1f4dd5692d16a9638e8be3d208eb05ccaedd3c62.tar.bz2
Use h5_retry_init/_next to retry loading the SWMR shadow file.
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r--src/H5Pfapl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 71ab475..1f1f67b 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5113,6 +5113,11 @@ H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr)
else if(name_len > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_file_path is too long")
+ if (config_ptr->md_open_tries == 0)
+ config_ptr->md_open_tries = H5FD_VFD_SWMR_MD_FILE_RETRY_MAX;
+ else if (config_ptr->md_open_tries > H5FD_VFD_SWMR_MD_FILE_RETRY_MAX)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_open_tries is too long")
+
/* Set the modified config */
if(H5P_set(plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, config_ptr) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache initial config")