summaryrefslogtreecommitdiffstats
path: root/src/H5FDprivate.h
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-08-14 18:21:00 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-08-14 18:21:00 (GMT)
commit45be06a387c1294fa3c95cc71106afcc023ddb91 (patch)
tree3043133c78a523d02f2671710318046afe29d8b7 /src/H5FDprivate.h
parentce1e8162959b14b97d79b53ebf4bea77e2e871b2 (diff)
downloadhdf5-45be06a387c1294fa3c95cc71106afcc023ddb91.zip
hdf5-45be06a387c1294fa3c95cc71106afcc023ddb91.tar.gz
hdf5-45be06a387c1294fa3c95cc71106afcc023ddb91.tar.bz2
Preliminary checkins for implementation done so far:
1) Public routines: H5Pget/set_vfd_swmr_config 2) Public routine: H5Fvfd_swmr_end_tick 3) Initialization when opening a file with VFD SWMR writer 4) Tests in test/vfd_swmr.c for VFD SWMR 5) Fix a bug in src/H5Fint.c: when error is encountered after the root group is created Note the following: --This is WORK IN PROGRESS and will subject to change as implementation goes. --There is test failure form enc_dec_plist.c: I will fix this when changes to the property list are settled. --The branch is updated with the latest from develop as of 8/14/2018
Diffstat (limited to 'src/H5FDprivate.h')
-rw-r--r--src/H5FDprivate.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 0430064..1698d96 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -38,6 +38,45 @@
/* Length of filename buffer */
#define H5FD_MAX_FILENAME_LEN 1024
+/*
+ * VFD SWMR
+ */
+/* Metadata file header */
+#define H5FD_MD_HEADER_MAGIC "VHDR" /* Header magic */
+#define H5FD_SIZEOF_CHKSUM 4 /* Size of checksum */
+
+/* Size of the header in the metadata file */
+#define H5FD_MD_HEADER_SIZE \
+ ( \
+ H5_SIZEOF_MAGIC /* Signature */ \
+ + 4 /* Page size */ \
+ + 8 /* Tick number */ \
+ + 8 /* Index offset */ \
+ + 8 /* Index length number */ \
+ + H5FD_SIZEOF_CHKSUM /* Metadata header checksum */ \
+ )
+
+/* Size of an index entry in the metadata file */
+#define H5FD_MD_INDEX_ENTRY_SIZE \
+ ( \
+ 4 /* HDF5 file page offset */ \
+ + 4 /* Metadata file page offset */ \
+ + 4 /* Length */ \
+ )
+
+/* Metadata file index magic */
+#define H5FD_MD_INDEX_MAGIC "VIDX" /* Index magic */
+
+/* Size of the metadata file index */
+#define H5FD_MD_INDEX_SIZE(N) /* N is number of entries in index */ \
+ ( \
+ H5_SIZEOF_MAGIC /* Signature */ \
+ + 8 /* Tick num */ \
+ + 4 /* Number of entries */ \
+ + (N * H5FD_MD_INDEX_ENTRY_SIZE) /* Index entries */ \
+ + H5FD_SIZEOF_CHKSUM /* Metadata header checksum */ \
+ )
+
#ifdef H5_HAVE_PARALLEL
/* ======== Temporary data transfer properties ======== */
/* Definitions for memory MPI type property */
@@ -157,6 +196,10 @@ H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr);
H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged);
+/* Function prototypes for VFD SWMR */
+H5_DLL herr_t H5FD_writer_end_of_tick();
+H5_DLL herr_t H5FD_reader_end_of_tick();
+
/* Function prototypes for MPI based VFDs*/
#ifdef H5_HAVE_PARALLEL
/* General routines */