summaryrefslogtreecommitdiffstats
path: root/src/H5Fpublic.h
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2022-04-21 18:56:59 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2022-04-21 18:56:59 (GMT)
commit3e990fed8edb25df58d79097f7cef9b908ef5a0d (patch)
tree62a45e418e2a5aebfc3004115b00aff63a248c7a /src/H5Fpublic.h
parentff8f512871b72e80c6d602d1539ae70072e18abb (diff)
downloadhdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.zip
hdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.tar.gz
hdf5-3e990fed8edb25df58d79097f7cef9b908ef5a0d.tar.bz2
Modifications to:
A) Allow automatic generation of metadata file names for VDS support B) Allow VFD SWMR reader to open an existing HDF5 file either before the VFD SWMR writer has opened it or after it has closed. C) Remove the usage of H5P_FILE_ACCESS_ANY_VFD. D) Add H5FD_FEAT_SUPPORTS_VFD_SWMR feature flag. E) Do not map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr IS enabled; map H5FD_MEM_GHEAP to H5FD_MEM_DRAW when vfd swmr is NOT enabled. For details regarding #A and #B above, see version 9 of the RFC.
Diffstat (limited to 'src/H5Fpublic.h')
-rw-r--r--src/H5Fpublic.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index e9d3340..76317fb 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -271,6 +271,20 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
* between the writer and the readers. This value must be at least 3,
* with 10 being the recommended minimum value.
*
+ * presume_posix_semantics
+ * A boolean flag that is only relevant to the reader.
+ * This flag should be set to TRUE if both of the following conditions hold:
+ * 1) Both the metadata file and HDF5 file are being written on a POSIX
+ * file system that is local to the reader.
+ * 2) The metadata file is being maintained directly by the VFD SWMR
+ * writer (i.e. without use of updater files and the auxiliary process.)
+ * If this flag is FALSE, the VFD SWMR reader must make the two adjustments:
+ * 1) Per legacy SWMR, the VFD that reads the HDF5 file proper must allow
+ * reads past EOF without error.
+ * 2) The VFD SWMR reader is not permitted to open an existing HDF5 file
+ * either before the VFD SWMR writer has opened it, or after it has
+ * closed it.
+ *
* writer:
* A boolean flag indicating whether the file opened with this FAPL entry
* will be opened R/W. (i.e. as a VFD SWMR writer)
@@ -333,9 +347,19 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
*
* md_file_path:
* If both the writer and maintain_metadata_file fields are TRUE, this
- * field contains the path of the metadata file.
- * If writer is FALSE, this field contains the path of the (possibly
- * local copy of the) metadata file.
+ * field contains the path but not the name of the metadata file.
+ * If writer is FALSE, this field contains the path (but not the name)
+ * of the (possibly local copy of the) metadata file.
+ *
+ * md_file_name:
+ * If both the writer and maintain_metadata_file fields are TRUE, this
+ * field is defined, and must contain the name (but not the path) of
+ * the metadata file, or NULL.
+ * If writer is FALSE, this field is defined, and must contain either
+ * the name (but not the path) of the metadata file, or NULL.
+ * If the field is defined but NULL, the metadata file name is
+ * generated by adding the ".md" suffix to the HDF5 file name.
+ * If the field is not NULL, the metadata file name is used as provided.
*
* updater_file_path:
* If generate_updater_files is TRUE, the contents of this field depends
@@ -353,6 +377,7 @@ typedef struct H5F_vfd_swmr_config_t {
int32_t version;
uint32_t tick_len;
uint32_t max_lag;
+ hbool_t presume_posix_semantics;
hbool_t writer;
hbool_t maintain_metadata_file;
hbool_t generate_updater_files;
@@ -360,6 +385,7 @@ typedef struct H5F_vfd_swmr_config_t {
uint32_t md_pages_reserved;
uint32_t pb_expansion_threshold;
char md_file_path[H5F__MAX_VFD_SWMR_FILE_NAME_LEN + 1];
+ char md_file_name[H5F__MAX_VFD_SWMR_FILE_NAME_LEN + 1];
char updater_file_path[H5F__MAX_VFD_SWMR_FILE_NAME_LEN + 1];
char log_file_path[H5F__MAX_VFD_SWMR_FILE_NAME_LEN + 1];
} H5F_vfd_swmr_config_t;