diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2021-09-29 18:28:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 18:28:12 (GMT) |
commit | 3da0802c40d58759995916bf9d0880e19f0af44d (patch) | |
tree | 809ada78cec1cbaaf6ec2ace5b4429a56d0f6574 /src/H5Fint.c | |
parent | 0fa5836cc5f037dd9f2cdd7f9a1051ddcc1c9ad0 (diff) | |
download | hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.zip hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.gz hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.bz2 |
VFD plugins (#602)
* Implement support for loading of Virtual File Drivers as plugins
Fix plugin caching for VOL connector and VFD plugins
Fix plugin iteration to skip paths that can't be opened
* Enable dynamic loading of VFDs with HDF5_DRIVER environment variable
* Temporarily disable error reporting during H5F_open double file open
* Default to using HDstat in h5_get_file_size for unknown VFDs
* Use macros for some environment variables that HDF5 interprets
* Update "null" and "ctl testing" VFDs
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r-- | src/H5Fint.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index c2d3e77..d772088 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -277,7 +277,7 @@ H5F__parse_file_lock_env_var(htri_t *use_locks) FUNC_ENTER_PACKAGE_NOERR /* Check the file locking environment variable */ - lock_env_var = HDgetenv("HDF5_USE_FILE_LOCKING"); + lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && (!HDstrcmp(lock_env_var, "FALSE") || !HDstrcmp(lock_env_var, "0"))) *use_locks = FALSE; /* Override: Never use locks */ else if (lock_env_var && (!HDstrcmp(lock_env_var, "TRUE") || !HDstrcmp(lock_env_var, "BEST_EFFORT") || @@ -454,9 +454,10 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set initial metadata cache resize config.") /* Prepare the driver property */ - driver_prop.driver_id = f->shared->lf->driver_id; - driver_prop.driver_info = H5FD_fapl_get(f->shared->lf); - driver_prop_copied = TRUE; + driver_prop.driver_id = f->shared->lf->driver_id; + driver_prop.driver_info = H5FD_fapl_get(f->shared->lf); + driver_prop.driver_config_str = H5P_peek_driver_config_str(old_plist); + driver_prop_copied = TRUE; /* Set the driver property */ if (H5P_set(new_plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) @@ -1828,7 +1829,13 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) else tent_flags = flags; - if (NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) { + H5E_BEGIN_TRY + { + lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF); + } + H5E_END_TRY; + + if (NULL == lf) { if (tent_flags == flags) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) |