diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2022-05-06 22:04:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 22:04:00 (GMT) |
commit | 11a88dbda39fc65bba92f5351d11e203fe2480eb (patch) | |
tree | d2d77c926de10b106f8108eff7bda525f0d5ae1f /src | |
parent | 702dd6910d45940533bad0ed9651c1de1af1cae2 (diff) | |
download | hdf5-11a88dbda39fc65bba92f5351d11e203fe2480eb.zip hdf5-11a88dbda39fc65bba92f5351d11e203fe2480eb.tar.gz hdf5-11a88dbda39fc65bba92f5351d11e203fe2480eb.tar.bz2 |
New vds feature vfd swmr (#1743)
* 1) Add feature flag H5FD_FEAT_SUPPORTS_VFD_SWMR to sec2, core and stdio drivers
2) Disable file locking for VFD SWMR reader in H5F_open()
3) Add checking of VFD SWMR feature flag in test/page_buffer.c and test/vfd_swmr.c.
Skip tests if the driver does not support VFD SWMR feature.
4) Add new tests + cleanups to test/vfd_swmr.c.
* Committing clang-format changes
* Fix failing check for Windows:
Add the VFD SWMR feature flag also to test_windows() (which is sec2) in test/vfd.c.
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDcore.c | 2 | ||||
-rw-r--r-- | src/H5FDsec2.c | 1 | ||||
-rw-r--r-- | src/H5FDstdio.c | 1 | ||||
-rw-r--r-- | src/H5Fint.c | 3 |
4 files changed, 7 insertions, 0 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 4022e82..a207e9e 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -1153,6 +1153,8 @@ H5FD__core_query(const H5FD_t *_file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */ *flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */ + *flags |= H5FD_FEAT_SUPPORTS_VFD_SWMR; /* VFD supports the VFD SWMR */ + /* These feature flags are only applicable if the backing store is enabled */ if(file && file->fd >= 0 && file->backing_store) { *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 384ca11..accacb6 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -545,6 +545,7 @@ H5FD__sec2_query(const H5FD_t *_file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ *flags |= H5FD_FEAT_SUPPORTS_SWMR_IO; /* VFD supports the single-writer/multiple-readers (SWMR) pattern */ + *flags |= H5FD_FEAT_SUPPORTS_VFD_SWMR; /* VFD supports the VFD SWMR */ *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 122379a..b59aae3 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -606,6 +606,7 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags) *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ + *flags |= H5FD_FEAT_SUPPORTS_VFD_SWMR; /* VFD supports the VFD SWMR */ } return 0; diff --git a/src/H5Fint.c b/src/H5Fint.c index 68c53f2..9880126 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1866,6 +1866,9 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Retrieve the private property for VFD SWMR testing */ if (H5P_get(a_plist, H5F_ACS_GENERATE_MD_CK_CB_NAME, &cb_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get generate_md_ck_cb info") + + if (!vfd_swmr_config_ptr->writer) + use_file_locking = FALSE; } /* |