From 23e237e728e4961d0cb7cbea10d5f82a9731bf8c Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Tue, 25 Oct 2022 10:51:08 -0500
Subject: Port VOL User Guide to doxygen (#2165)
* Port VOL User Guide to doxygen
* Fix spelling
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
---
doxygen/dox/UsersGuide.dox | 38 ++-
doxygen/examples/tables/volAPIs.dox | 637 ++++++++++++++++++++++++++++++++++++
src/H5VLmodule.h | 537 +++++++++++++++++++++++++++++-
3 files changed, 1200 insertions(+), 12 deletions(-)
create mode 100644 doxygen/examples/tables/volAPIs.dox
diff --git a/doxygen/dox/UsersGuide.dox b/doxygen/dox/UsersGuide.dox
index dbb6053..10b4ba1 100644
--- a/doxygen/dox/UsersGuide.dox
+++ b/doxygen/dox/UsersGuide.dox
@@ -270,8 +270,44 @@ HDF5 Release 1.14
\ref sec_vol
\li \ref subsec_vol_intro
\li \ref subsec_vol_abstract_layer
+\li \ref subsec_vol_quickstart
+
+List of Native VOL Optional Operation Values By Subclass
+
+Subclass |
+API Reference |
+Definition |
+
+
+H5VL_SUBCLS_ATTR |
+#H5Aiterate (deprecated routine) |
+#H5VL_NATIVE_ATTR_ITERATE_OLD |
+
+
+H5VL_SUBCLS_DATASET |
+H5Dformat_convert (internal) |
+#H5VL_NATIVE_DATASET_FORMAT_CONVERT |
+
+
+H5Dget_chunk_index_type (internal) |
+#H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE |
+
+
+#H5Dget_chunk_storage_size |
+#H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE |
+
+
+#H5Dget_num_chunks |
+#H5VL_NATIVE_DATASET_GET_NUM_CHUNKS |
+
+
+#H5Dget_chunk_info |
+#H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX |
+
+
+#H5Dget_chunk_info_by_coord |
+#H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD |
+
+
+#H5Dread_chunk |
+#H5VL_NATIVE_DATASET_CHUNK_READ |
+
+
+#H5Dwrite_chunk |
+#H5VL_NATIVE_DATASET_CHUNK_WRITE |
+
+
+#H5Dvlen_get_buf_size |
+#H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE |
+
+
+#H5Dget_offset |
+#H5VL_NATIVE_DATASET_GET_OFFSET |
+
+
+#H5Dget_offset |
+#H5VL_NATIVE_DATASET_CHUNK_ITER |
+
+
+H5VL_SUBCLS_FILE |
+#H5Fclear_elink_file_cache |
+#H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE |
+
+
+#H5Fget_file_image |
+#H5VL_NATIVE_FILE_GET_FILE_IMAGE |
+
+
+#H5Fget_free_sections |
+#H5VL_NATIVE_FILE_GET_FREE_SECTIONS |
+
+
+#H5Fget_freespace |
+#H5VL_NATIVE_FILE_GET_FREE_SPACE |
+
+
+#H5Fget_info1 / #H5Fget_info2 |
+#H5VL_NATIVE_FILE_GET_INFO |
+
+
+#H5Fget_mdc_config |
+#H5VL_NATIVE_FILE_GET_MDC_CONF |
+
+
+#H5Fget_mdc_hit_rate |
+#H5VL_NATIVE_FILE_GET_MDC_HR |
+
+
+#H5Fget_mdc_size |
+#H5VL_NATIVE_FILE_GET_MDC_SIZE |
+
+
+#H5Fget_filesize |
+#H5VL_NATIVE_FILE_GET_SIZE |
+
+
+#H5Fget_vfd_handle |
+#H5VL_NATIVE_FILE_GET_VFD_HANDLE |
+
+
+#H5Freset_mdc_hit_rate_stats |
+#H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE |
+
+
+#H5Fset_mdc_config |
+#H5VL_NATIVE_FILE_SET_MDC_CONFIG |
+
+
+#H5Fget_metadata_read_retry_info |
+#H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO |
+
+
+#H5Fstart_swmr_write |
+#H5VL_NATIVE_FILE_START_SWMR_WRITE |
+
+
+#H5Fstart_mdc_logging |
+#H5VL_NATIVE_FILE_START_MDC_LOGGING |
+
+
+#H5Fstop_mdc_logging |
+#H5VL_NATIVE_FILE_STOP_MDC_LOGGING |
+
+
+#H5Fget_mdc_logging_status |
+#H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS |
+
+
+H5Fformat_convert (internal) |
+#H5VL_NATIVE_FILE_FORMAT_CONVERT |
+
+
+#H5Freset_page_buffering_stats |
+#H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS |
+
+
+#H5Fget_page_buffering_stats |
+#H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS |
+
+
+#H5Fget_mdc_image_info |
+#H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO |
+
+
+#H5Fget_eoa |
+#H5VL_NATIVE_FILE_GET_EOA |
+
+
+#H5Fincrement_filesize |
+#H5VL_NATIVE_FILE_INCR_FILESIZE |
+
+
+#H5Fset_latest_format/#H5Fset_libver_bounds |
+#H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS |
+
+
+#H5Fget_dset_no_attrs_hint |
+#H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG |
+
+
+#H5Fset_dset_no_attrs_hint |
+#H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG |
+
+
+#H5Fget_mpi_atomicity |
+#H5VL_NATIVE_FILE_GET_MPI_ATOMICITY |
+
+
+#H5Fset_mpi_atomicity |
+#H5VL_NATIVE_FILE_SET_MPI_ATOMICITY |
+
+
+Adjust file after open, with wrapping context |
+#H5VL_NATIVE_FILE_POST_OPEN |
+
+
+H5VL_SUBCLS_GROUP |
+#H5Giterate (deprecated routine) |
+#H5VL_NATIVE_GROUP_ITERATE_OLD |
+
+
+#H5Gget_objinfo (deprecated routine) |
+#H5VL_NATIVE_GROUP_GET_OBJINFO |
+
+
+H5VL_SUBCLS_OBJECT |
+#H5Gget_comment, #H5Oget_comment, #H5Oget_comment_by_name |
+#H5VL_NATIVE_OBJECT_GET_COMMENT |
+
+
+#H5Gset_comment, #H5Oset_comment, #H5Oset_comment_by_name |
+#H5VL_NATIVE_OBJECT_SET_COMMENT |
+
+
+#H5Odisable_mdc_flushes |
+#H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES |
+
+
+#H5Oenable_mdc_flushes |
+#H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES |
+
+
+#H5Oare_mdc_flushes_disabled |
+#H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED |
+
+
+#H5Oget_native_info, #H5Oget_native_info_by_idx, #H5Oget_native_info_by_name |
+#H5VL_NATIVE_OBJECT_GET_NATIVE_INFO/td>
+ |
+
+//! [vol_optional_table]
+ *
+ */
diff --git a/src/H5VLmodule.h b/src/H5VLmodule.h
index 5e2e1b3..495bdb7 100644
--- a/src/H5VLmodule.h
+++ b/src/H5VLmodule.h
@@ -26,18 +26,18 @@
#define H5_MY_PKG H5VL
#define H5_MY_PKG_ERR H5E_VOL
-/** \page H5VL_UG The HDF5 VOL plugin
+/** \page H5VL_UG The HDF5 Virtual Object Layer (VOL)
*
- * \section sec_vol The HDF5 VOL plugin
+ * \section sec_vol The HDF5 Virtual Object Layer (VOL)
*
- * \section subsec_vol_intro Introduction
+ * \subsection subsec_vol_intro Introduction
* The virtual object layer is an abstraction layer in the HDF5 library that intercepts all API calls
- * that could potentially access objects in an HDF5 container and forwards those calls to a VOL connector,
- * which implements the storage. The user or application gets the benefit of using the familiar and
- * widely-used HDF5 data model and API, but can map the physical storage of the HDF5 file and objects
- * to storage that better meets the application's data needs.
+ * that could potentially access objects in an HDF5 container and forwards those calls to a VOL
+ * connector, which implements the storage. The user or application gets the benefit of using the
+ * familiar and widely-used HDF5 data model and API, but can map the physical storage of the HDF5 file
+ * and objects to storage that better meets the application’s data needs.
*
- * \section subsec_vol_abstract_layer The VOL Abstraction Layer
+ * \subsection subsec_vol_abstract_layer The VOL Abstraction Layer
* The VOL lies just under the public API. When a storage-oriented public APIcall is made, the library
* performs a few sanity checks on the input parameters and then immediately invokes a VOL callback,
* which resolves to an implementation in the VOL connector that was selected when opening or creating
@@ -73,11 +73,11 @@
* For more information about which calls go through the VOL and the mechanism by which this is implemented,
* see the connector author and library internals documentation.
*
- * \section subsec_vol_connect VOL Connectors
+ * \subsection subsec_vol_connect VOL Connectors
* A VOL connector can be implemented in several ways:
* \li as a shared or static library linked to an application
* \li as a dynamically loaded plugin, implemented as a shared library
- * \li and even as an internal connector, built into the HDF5 libraryitself
+ * \li and even as an internal connector, built into the HDF5 library itself
*
* This section mostly focuses on external connectors, both libraries and plugins, as those are expected
* to be much more common than internal implementations.
@@ -109,7 +109,522 @@
* It has not been completely abstracted from the HDF5 library, though, and is treated as a special case.
* For example, it cannot be unloaded and is always present.
*
- * \section subsec_vol_use Connector Use
+ * \subsection subsec_vol_quickstart Quickstart
+ * The following steps summarize how one would go about using a VOL connector
+ * with an application. More information on particular steps can be found later
+ * on in this document.
+ *
+ * \subsubsection subsubsec_vol_quick_read Read The Documentation For The New VOL Connector
+ * Many VOL connectors will require specific setup and configuration of both the application and the
+ * storage. Specific permissions may have to be set, configuration files constructed, and
+ * connector-specific setup calls may need to be invoked in the application. In many cases, converting
+ * software to use a new VOL connector will be more than just a straightforward drop-in replacement done by
+ * specifying a name in the VOL plugin environment variable.
+ *
+ * \subsubsection subsubsec_vol_quick_use Use A VOL-Enabled HDF5 Library
+ * The virtual object layer was introduced in HDF5 1.12.0, however that version of the VOL is deprecated.
+ * VOL users should target HDF5 1.13.X, which is currently under development. The 1.13.X releases are
+ * considered ”unstable” in the sense that API calls, interfaces, and the file format may change in the
+ * 1.13.X release branches and we do not guarantee binary compatibility (”unstable” does NOT mean buggy).
+ * The next stable version of the library will be HDF5 1.14.0 which will release in 2023. The particular
+ * configuration of the library (serial vs parallel, thread-safe, debug vs production/release) does not
+ * matter. The VOL is a fundamental part of the library and cannot be disabled, so any build will do.
+ *
+ * On Windows, it’s probably best to use the same debug vs release configuration for the application and
+ * all libraries in order to avoid C runtime (CRT) issues. Pre-2015 versions of Visual Studio are not
+ * supported.
+ *
+ * When working with a debug HDF5 library, it’s probably also wise to build with the ”memory sanity checking”
+ * feature disabled to avoid accidentally clobbering our memory tracking infrastructure when dealing with
+ * buffers obtained from the HDF5 library. This feature should be disabled by default in HDF5 1.13.X.
+ *
+ * \subsubsection subsubsec_vol_quick_set Determine How You Will Set The VOL Connector
+ * Fundamentally, setting a VOL connector involves modifying the file access property list (fapl) that will
+ * be used to open or create the file.
+ *
+ * There are essentially three ways to do this:
+ * \li Direct use of \ref H5Pset_vol()
+ * \li Library-specific API calls that call \ref H5Pset_vol() for you
+ * \li Use the VOL environment variable, which will also call \ref H5Pset_vol() for you
+ *
+ * Exactly how you go about setting a VOL connector in a fapl, will depend on
+ * the complexity of the VOL connector and how much control you have over the
+ * application’s source code. Note that the environment variable method, though
+ * convenient, has some limitations in its implementation, which are discussed
+ * below.
+ *
+ * \subsubsection subsubsec_vol_quick_update If Needed: Update Your Code To Load And Use A VOL Connector
+ * There are two concerns when modifying the application:
+ *