summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/conclude.am33
-rw-r--r--src/H5A.c4
-rw-r--r--src/H5Adeprec.c1
-rw-r--r--src/H5Apublic.h34
-rw-r--r--src/H5D.c1
-rw-r--r--src/H5Dio.c1
-rw-r--r--src/H5Dpublic.h33
-rw-r--r--src/H5F.c9
-rw-r--r--src/H5FDcore.c148
-rw-r--r--src/H5FDdirect.c3
-rw-r--r--src/H5FDlog.c2
-rw-r--r--src/H5FDmpio.c1
-rw-r--r--src/H5FDmulti.c3
-rw-r--r--src/H5Fdeprec.c3
-rw-r--r--src/H5Fint.c3
-rw-r--r--src/H5Fmount.c4
-rw-r--r--src/H5Fprivate.h2
-rw-r--r--src/H5Fpublic.h36
-rw-r--r--src/H5Gdeprec.c1
-rw-r--r--src/H5Gpublic.h23
-rw-r--r--src/H5L.c2
-rw-r--r--src/H5O.c5
-rw-r--r--src/H5Odeprec.c5
-rw-r--r--src/H5Opublic.h12
-rw-r--r--src/H5Pfapl.c107
-rw-r--r--src/H5R.c8
-rw-r--r--src/H5Rdeprec.c2
-rw-r--r--src/H5VLint.c2
-rw-r--r--src/H5VLnative.c68
-rw-r--r--src/H5VLnative.h57
-rw-r--r--src/H5VLpassthru.c4
-rw-r--r--test/enc_dec_plist.c2
-rw-r--r--test/h5test.c33
-rw-r--r--test/testfiles/plist_files/def_fapl_32bebin1711 -> 1652 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_32lebin1711 -> 1652 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64bebin1711 -> 1652 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64lebin1711 -> 1652 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32bebin1713 -> 1654 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32lebin1713 -> 1654 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64bebin1713 -> 1654 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64lebin1713 -> 1654 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32bebin1816 -> 1757 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32lebin1816 -> 1757 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64bebin1816 -> 1757 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64lebin1816 -> 1757 bytes
45 files changed, 324 insertions, 328 deletions
diff --git a/config/conclude.am b/config/conclude.am
index 4655565..d0dbf3a 100644
--- a/config/conclude.am
+++ b/config/conclude.am
@@ -131,28 +131,43 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_VOL_CONNECTOR)"; then \
+ echo "VOL connector: $(HDF5_VOL_CONNECTOR)" | tee -a $${log}; \
+ fi; \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_VOL_CONNECTOR)"; then \
+ echo "VOL connector: $(HDF5_VOL_CONNECTOR)" >> $${log}; \
+ fi; \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/src/H5A.c b/src/H5A.c
index 74b0148..8ebd2b3 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1360,7 +1360,7 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Iterate over attributes */
- if((ret_value = H5VL_attr_specific(vol_obj, &loc_params, H5VL_ATTR_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, idx, op, op_data)) < 0)
+ if((ret_value = H5VL_attr_specific(vol_obj, &loc_params, H5VL_ATTR_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, idx, op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
done:
@@ -1448,7 +1448,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Iterate over attributes */
- if((ret_value = H5VL_attr_specific(vol_obj, &loc_params, H5VL_ATTR_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, idx, op, op_data)) < 0)
+ if((ret_value = H5VL_attr_specific(vol_obj, &loc_params, H5VL_ATTR_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, idx, op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed");
done:
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index d4eac6a..0a92ec8 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -44,6 +44,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Opkg.h" /* Object headers */
#include "H5VLprivate.h" /* Virtual object layer */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 726f51b..7162f6e 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -22,10 +22,6 @@
#include "H5Opublic.h" /* Object Headers */
#include "H5Tpublic.h" /* Datatypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
typedef struct {
hbool_t corder_valid; /* Indicate if creation order is valid */
@@ -38,23 +34,19 @@ typedef struct {
typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
-/* Enumeration for native VOL connector attribute optional VOL operations */
-typedef enum H5VL_native_attr_optional_t {
- H5VL_NATIVE_ATTR_ITERATE_OLD /* H5Aiterate (deprecated routine) */
- /* (This enum value should have an
- * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
- * around it, but the compiler
- * complains about an empty enum
- * when deprecated symbols are
- * disabled currently. When
- * another enum value is added,
- * please put the #ifdef around
- * this symbol. QAK - 2018/12/06
- */
-} H5VL_native_attr_optional_t;
-
-
-/* Public function prototypes */
+
+/********************/
+/* Public Variables */
+/********************/
+
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
hid_t space_id, hid_t acpl_id, hid_t aapl_id);
H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
diff --git a/src/H5D.c b/src/H5D.c
index db70847..b4880f0 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -28,6 +28,7 @@
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 037d443..026f64e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -29,6 +29,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Sprivate.h" /* Dataspace */
+#include "H5VLnative.h" /* Native VOL connector */
#ifdef H5_HAVE_PARALLEL
/* Remove this if H5R_DATASET_REGION is no longer used in this file */
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 921974d..63f1a24 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -104,27 +104,6 @@ typedef enum H5D_vds_view_t {
/* Callback for H5Pset_append_flush() in a dataset access property list */
typedef herr_t (*H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *op_data);
-/* Enumeration for native VOL connector dataset optional VOL operations */
-typedef enum H5VL_native_dataset_optional_t {
- H5VL_NATIVE_DATASET_FORMAT_CONVERT, /* H5Dformat_convert (internal) */
- H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE, /* H5Dget_chunk_index_type */
- H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE, /* H5Dget_chunk_storage_size */
- H5VL_NATIVE_DATASET_CHUNK_READ, /* H5Dchunk_read */
- H5VL_NATIVE_DATASET_CHUNK_WRITE, /* H5Dchunk_write */
-} H5VL_native_dataset_optional_t;
-
-
-/********************/
-/* Public Variables */
-/********************/
-
-/*********************/
-/* Public Prototypes */
-/*********************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Define the operator function pointer for H5Diterate() */
typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim,
const hsize_t *point, void *operator_data);
@@ -138,6 +117,18 @@ typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/,
typedef herr_t (*H5D_gather_func_t)(const void *dst_buf,
size_t dst_buf_bytes_used, void *op_data);
+
+/********************/
+/* Public Variables */
+/********************/
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id,
hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id);
H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id,
diff --git a/src/H5F.c b/src/H5F.c
index cd13f08..008b053 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -37,6 +37,7 @@
#include "H5Pprivate.h" /* Property lists */
#include "H5Tprivate.h" /* Datatypes */
#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
@@ -778,7 +779,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Flush the object */
- if(H5VL_file_specific(vol_obj, H5VL_FILE_FLUSH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_type, scope) < 0)
+ if(H5VL_file_specific(vol_obj, H5VL_FILE_FLUSH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)obj_type, (int)scope) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file")
done:
@@ -1260,7 +1261,7 @@ H5Fget_name(hid_t obj_id, char *name/*out*/, size_t size)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
/* Get the filename via the VOL */
- if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, type, size, name, &ret_value) < 0)
+ if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)type, size, name, &ret_value) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file name")
done:
@@ -1305,7 +1306,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Get the file information */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, type, finfo) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, (int)type, finfo) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info")
done:
@@ -1380,7 +1381,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "nsects must be > 0")
/* Get the free-space section information in the file */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, type, nsects) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, (int)type, nsects) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free sections")
done:
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 2ab04dc..ec6b2a7 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -54,6 +54,7 @@ typedef struct H5FD_core_t {
haddr_t eof; /* current allocated size */
size_t increment; /* multiples for mem allocation */
hbool_t backing_store; /* write to file name on flush */
+ hbool_t write_tracking; /* Whether to track writes */
size_t bstore_page_size; /* backing store page size */
int fd; /* backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
@@ -93,10 +94,14 @@ typedef struct H5FD_core_t {
typedef struct H5FD_core_fapl_t {
size_t increment; /* how much to grow memory */
hbool_t backing_store; /* write to file name on flush */
+ hbool_t write_tracking; /* Whether to track writes */
+ size_t page_size; /* Page size for tracked writes */
} H5FD_core_fapl_t;
/* Allocate memory in multiples of this size by default */
-#define H5FD_CORE_INCREMENT 8192
+#define H5FD_CORE_INCREMENT 8192
+#define H5FD_CORE_WRITE_TRACKING_FLAG FALSE
+#define H5FD_CORE_WRITE_TRACKING_PAGE_SIZE 524288
/* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
@@ -466,6 +471,100 @@ H5FD__core_term(void)
/*-------------------------------------------------------------------------
+ * Function: H5Pset_core_write_tracking
+ *
+ * Purpose: Enables/disables core VFD write tracking and page
+ * aggregation size.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Dana Robinson
+ * Tuesday, April 8, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ H5FD_core_fapl_t fa; /* Core VFD info */
+ const H5FD_core_fapl_t *old_fa; /* Old core VFD info */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("e", "ibz", plist_id, is_enabled, page_size);
+
+ /* The page size cannot be zero */
+ if(page_size == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero")
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADATOM, FAIL, "can't find object for ID")
+ if(H5FD_CORE != H5P_peek_driver(plist))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
+ if(NULL == (old_fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
+
+ /* Set VFD info values */
+ HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ fa.increment = old_fa->increment;
+ fa.backing_store = old_fa->backing_store;
+ fa.write_tracking = is_enabled;
+ fa.page_size = page_size;
+
+ /* Set the property values & the driver for the FAPL */
+ if(H5P_set_driver(plist, H5FD_CORE, &fa) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pset_core_write_tracking() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_core_write_tracking
+ *
+ * Purpose: Gets information about core VFD write tracking and page
+ * aggregation size.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Dana Robinson
+ * Tuesday, April 8, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled, size_t *page_size)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ const H5FD_core_fapl_t *fa; /* Core VFD info */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("e", "i*b*z", plist_id, is_enabled, page_size);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADATOM, FAIL, "can't find object for ID")
+ if(H5FD_CORE != H5P_peek_driver(plist))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
+ if(NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
+
+ /* Get values */
+ if(is_enabled)
+ *is_enabled = fa->write_tracking;
+ if(page_size)
+ *page_size = fa->page_size;
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_core_write_tracking() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_core
*
* Purpose: Modify the file access property list to use the H5FD_CORE
@@ -482,9 +581,9 @@ H5FD__core_term(void)
herr_t
H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
{
- H5FD_core_fapl_t fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5P_genplist_t *plist; /* Property list pointer */
+ H5FD_core_fapl_t fa; /* Core VFD info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "izb", fapl_id, increment, backing_store);
@@ -493,10 +592,16 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ /* Set VFD info values */
+ HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = increment;
fa.backing_store = backing_store;
+ fa.write_tracking = H5FD_CORE_WRITE_TRACKING_FLAG;
+ fa.page_size = H5FD_CORE_WRITE_TRACKING_PAGE_SIZE;
- ret_value = H5P_set_driver(plist, H5FD_CORE, &fa);
+ /* Set the property values & the driver for the FAPL */
+ if(H5P_set_driver(plist, H5FD_CORE, &fa) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver")
done:
FUNC_LEAVE_API(ret_value)
@@ -518,9 +623,9 @@ done:
herr_t
H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/)
{
- H5P_genplist_t *plist; /* Property list pointer */
- const H5FD_core_fapl_t *fa;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* Property list pointer */
+ const H5FD_core_fapl_t *fa; /* Core VFD info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, increment, backing_store);
@@ -559,7 +664,7 @@ static void *
H5FD__core_fapl_get(H5FD_t *_file)
{
H5FD_core_t *file = (H5FD_core_t*)_file;
- H5FD_core_fapl_t *fa;
+ H5FD_core_fapl_t *fa; /* Core VFD info */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -569,6 +674,8 @@ H5FD__core_fapl_get(H5FD_t *_file)
fa->increment = file->increment;
fa->backing_store = (hbool_t)(file->fd >= 0);
+ fa->write_tracking = file->write_tracking;
+ fa->page_size = file->bstore_page_size;
/* Set return value */
ret_value = fa;
@@ -776,35 +883,28 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
} /* end if */
} /* end if */
+ /* Get the write tracking & page size */
+ file->write_tracking = fa->write_tracking;
+ file->bstore_page_size = fa->page_size;
+
/* Set up write tracking if the backing store is on */
file->dirty_list = NULL;
if(fa->backing_store) {
- hbool_t write_tracking_flag = FALSE; /* what the user asked for */
hbool_t use_write_tracking = FALSE; /* what we're actually doing */
- /* Get the write tracking flag */
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &write_tracking_flag) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking flag");
-
- /* Get the page size */
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &(file->bstore_page_size)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get core VFD write tracking page size");
-
/* default is to have write tracking OFF for create (hence the check to see
* if the user explicitly set a page size) and ON with the default page size
* on open (when not read-only).
*/
/* Only use write tracking if the file is open for writing */
- use_write_tracking =
- TRUE == write_tracking_flag /* user asked for write tracking */
- && !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
- && file->bstore_page_size != 0; /* page size is not zero */
+ use_write_tracking = (TRUE == fa->write_tracking) /* user asked for write tracking */
+ && !(o_flags & O_RDONLY) /* file is open for writing (i.e. not read-only) */
+ && (file->bstore_page_size != 0); /* page size is not zero */
/* initialize the dirty list */
- if(use_write_tracking) {
+ if(use_write_tracking)
if(NULL == (file->dirty_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, NULL, "can't create core vfd dirty region list");
- } /* end if */
} /* end if */
/* Set return value */
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 906ec28..958f53c 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -291,6 +291,7 @@ H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbu
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ HDmemset(&fa, 0, sizeof(H5FD_direct_fapl_t));
if(boundary != 0)
fa.mboundary = boundary;
else
@@ -417,7 +418,7 @@ static void *
H5FD_direct_fapl_copy(const void *_old_fa)
{
const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t*)_old_fa;
- H5FD_direct_fapl_t *new_fa = H5MM_malloc(sizeof(H5FD_direct_fapl_t));
+ H5FD_direct_fapl_t *new_fa = H5MM_calloc(1, sizeof(H5FD_direct_fapl_t));
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 3dcd7f5..cd9ab0e 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -329,6 +329,8 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ HDmemset(&fa, 0, sizeof(H5FD_log_fapl_t));
+
/* This shallow copy is correct! The string will be properly
* copied deep down in the H5P code.
*/
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 87f8b6a..c04906e 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -319,6 +319,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
+ HDmemset(&fa, 0, sizeof(H5FD_mpio_fapl_t));
fa.comm = comm;
fa.info = info;
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index aa1b118..e8dde50 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -497,6 +497,7 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
* Initialize driver specific information. No need to copy it into the FA
* struct since all members will be copied by H5Pset_driver().
*/
+ memset(&fa, 0, sizeof(H5FD_multi_fapl_t));
memcpy(fa.memb_map, memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
memcpy(fa.memb_fapl, memb_fapl, H5FD_MEM_NTYPES*sizeof(hid_t));
memcpy(fa.memb_name, memb_name, H5FD_MEM_NTYPES*sizeof(char*));
@@ -892,7 +893,7 @@ static void *
H5FD_multi_fapl_copy(const void *_old_fa)
{
const H5FD_multi_fapl_t *old_fa = (const H5FD_multi_fapl_t*)_old_fa;
- H5FD_multi_fapl_t *new_fa = (H5FD_multi_fapl_t *)malloc(sizeof(H5FD_multi_fapl_t));
+ H5FD_multi_fapl_t *new_fa = (H5FD_multi_fapl_t *)calloc(1, sizeof(H5FD_multi_fapl_t));
int nerrors = 0;
static const char *func="H5FD_multi_fapl_copy"; /* Function Name for error reporting */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index 1a2418d..7cefb06 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -41,6 +41,7 @@
#include "H5Fpkg.h" /* File access */
#include "H5Iprivate.h" /* IDs */
#include "H5SMprivate.h" /* Shared object header messages */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
@@ -225,7 +226,7 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format)
low = H5F_LIBVER_EARLIEST;
/* Set the library's version bounds */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, (int)low, (int)high) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds")
done:
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 46ed62a..e35d787 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -38,6 +38,7 @@
#include "H5SMprivate.h" /* Shared Object Header Messages */
#include "H5Tprivate.h" /* Datatypes */
#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
@@ -3701,7 +3702,7 @@ H5F_get_file_id(hid_t obj_id, H5I_type_t type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid identifier")
/* Get the file through the VOL */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_ID, type, &file_id) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_ID, (int)type, &file_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get file ID")
if(H5I_INVALID_HID == file_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get the file ID through the VOL")
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index d7f8915..13d95aa 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -482,7 +482,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "Can't mount file onto object from different VOL connector")
/* Perform the mount operation */
- if(H5VL_file_specific(loc_vol_obj, H5VL_FILE_MOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, loc_type, name, child_vol_obj->data, plist_id) < 0)
+ if(H5VL_file_specific(loc_vol_obj, H5VL_FILE_MOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)loc_type, name, child_vol_obj->data, plist_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file")
done:
@@ -534,7 +534,7 @@ H5Funmount(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
/* Perform the unmount operation */
- if(H5VL_file_specific(vol_obj, H5VL_FILE_UNMOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, loc_type, name) < 0)
+ if(H5VL_file_specific(vol_obj, H5VL_FILE_UNMOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)loc_type, name) < 0)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file")
done:
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index b9ed163..5f7a1b2 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -504,9 +504,7 @@ typedef struct H5F_t H5F_t;
#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */
#define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */
#define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME "start_mdc_log_on_access" /* Whether logging starts on file create/open */
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
#define H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME "evict_on_close_flag" /* Whether or not the metadata cache will evict objects on close */
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
#define H5F_ACS_COLL_MD_WRITE_FLAG_NAME "collective_metadata_write" /* property indicating whether metadata writes are done collectively or not */
#define H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME "mdc_initCacheImageCfg" /* Initial metadata cache image creation configuration */
#define H5F_ACS_PAGE_BUFFER_SIZE_NAME "page_buffer_size" /* the maximum size for the page buffer cache */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 36143a7..c4bf0b4 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -217,43 +217,13 @@ typedef struct H5F_retry_info_t {
/* Callback for H5Pset_object_flush_cb() in a file access property list */
typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
-/* Enumeration for native VOL connector file optional VOL operations */
-typedef enum H5VL_native_file_optional_t {
- H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE, /* H5Fclear_elink_file_cache */
- H5VL_NATIVE_FILE_GET_FILE_IMAGE, /* H5Fget_file_image */
- H5VL_NATIVE_FILE_GET_FREE_SECTIONS, /* H5Fget_free_sections */
- H5VL_NATIVE_FILE_GET_FREE_SPACE, /* H5Fget_freespace */
- H5VL_NATIVE_FILE_GET_INFO, /* H5Fget_info1/2 */
- H5VL_NATIVE_FILE_GET_MDC_CONF, /* H5Fget_mdc_config */
- H5VL_NATIVE_FILE_GET_MDC_HR, /* H5Fget_mdc_hit_rate */
- H5VL_NATIVE_FILE_GET_MDC_SIZE, /* H5Fget_mdc_size */
- H5VL_NATIVE_FILE_GET_SIZE, /* H5Fget_filesize */
- H5VL_NATIVE_FILE_GET_VFD_HANDLE, /* H5Fget_vfd_handle */
- H5VL_NATIVE_FILE_GET_FILE_ID, /* H5Fget_file_id */
- H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE, /* H5Freset_mdc_hit_rate_stats */
- H5VL_NATIVE_FILE_SET_MDC_CONFIG, /* H5Fset_mdc_config */
- H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO, /* H5Fget_metadata_read_retry_info */
- H5VL_NATIVE_FILE_START_SWMR_WRITE, /* H5Fstart_swmr_write */
- H5VL_NATIVE_FILE_START_MDC_LOGGING, /* H5Fstart_mdc_logging */
- H5VL_NATIVE_FILE_STOP_MDC_LOGGING, /* H5Fstop_mdc_logging */
- H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS, /* H5Fget_mdc_logging_status */
- H5VL_NATIVE_FILE_FORMAT_CONVERT, /* H5Fformat_convert */
- H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS, /* H5Freset_page_buffering_stats */
- H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS, /* H5Fget_page_buffering_stats */
- H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO, /* H5Fget_mdc_image_info */
- H5VL_NATIVE_FILE_GET_EOA, /* H5Fget_eoa */
- H5VL_NATIVE_FILE_INCR_FILESIZE, /* H5Fincrement_filesize */
- H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, /* H5Fset_latest_format/libver_bounds */
- H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG, /* H5Fget_dset_no_attrs_hint */
- H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG /* H5Fset_dset_no_attrs_hint */
-} H5VL_native_file_optional_t;
-
-
+/*********************/
+/* Public Prototypes */
+/*********************/
#ifdef __cplusplus
extern "C" {
#endif
-/* Functions in H5F.c */
H5_DLL htri_t H5Fis_accessible(const char *container_name, hid_t fapl_id);
H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags,
hid_t create_plist, hid_t access_plist);
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 07cad55..1c86707 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -44,6 +44,7 @@
#include "H5Lprivate.h" /* Links */
#include "H5Pprivate.h" /* Property lists */
#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 58961ba..170b74d 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -37,10 +37,6 @@
/* Public Macros */
/*****************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*******************/
/* Public Typedefs */
/*******************/
@@ -62,21 +58,6 @@ typedef struct H5G_info_t {
hbool_t mounted; /* Whether group has a file mounted on it */
} H5G_info_t;
-/* Enumeration for native VOL connector group optional VOL operations */
-typedef enum H5VL_native_group_optional_t {
- H5VL_NATIVE_GROUP_ITERATE_OLD, /* HG5Giterate (deprecated routine) */
- H5VL_NATIVE_GROUP_GET_OBJINFO /* HG5Gget_objinfo (deprecated routine) */
- /* (These two enum values should have an
- * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
- * around them, but the compiler
- * complains about an empty enum
- * when deprecated symbols are
- * disabled currently. When
- * another enum value is added,
- * please put the #ifdef around
- * these symbols. QAK - 2018/12/06
- */
-} H5VL_native_group_optional_t;
/********************/
/* Public Variables */
@@ -86,6 +67,10 @@ typedef enum H5VL_native_group_optional_t {
/*********************/
/* Public Prototypes */
/*********************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id,
hid_t gcpl_id, hid_t gapl_id);
H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
diff --git a/src/H5L.c b/src/H5L.c
index 9506e7d..33e561a 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -1332,7 +1332,7 @@ H5Literate(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
loc_params.obj_type = H5I_get_type(group_id);
/* Iterate over the links */
- if((ret_value = H5VL_link_specific(vol_obj, &loc_params, H5VL_LINK_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, FALSE, idx_type, order, idx_p, op, op_data)) < 0)
+ if((ret_value = H5VL_link_specific(vol_obj, &loc_params, H5VL_LINK_ITER, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (unsigned)FALSE, (int)idx_type, (int)order, idx_p, op, op_data)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed")
done:
diff --git a/src/H5O.c b/src/H5O.c
index ea88172..30250a1 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -37,6 +37,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
#include "H5Opkg.h" /* Object headers */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
@@ -971,7 +972,7 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
loc_params.obj_type = H5I_get_type(obj_id);
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, fields)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed")
done:
@@ -1055,7 +1056,7 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
loc_params.obj_type = H5I_get_type(loc_id);
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, fields)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed")
done:
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 56b0c05..bd04cdb 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -36,6 +36,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Opkg.h" /* Object headers */
+#include "H5VLnative.h" /* Native VOL connector */
/****************/
@@ -289,7 +290,7 @@ H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
loc_params.obj_type = H5I_get_type(obj_id);
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, op, op_data, H5O_INFO_ALL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
@@ -368,7 +369,7 @@ H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
loc_params.obj_type = H5I_get_type(loc_id);
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)idx_type, (int)order, op, op_data, H5O_INFO_ALL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index fe0c72d..c868e72 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -150,25 +150,19 @@ typedef enum H5O_mcdt_search_ret_t {
/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */
typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
-/* Enumeration for native VOL connector object optional VOL operations */
-typedef enum H5VL_native_object_optional_t {
- H5VL_NATIVE_OBJECT_GET_COMMENT, /* H5G|H5Oget_comment, H5Oget_comment_by_name */
- H5VL_NATIVE_OBJECT_GET_INFO, /* H5Oget_info(_by_idx, _by_name)(2?) */
- H5VL_NATIVE_OBJECT_SET_COMMENT /* H5G|H5Oset_comment, H5Oset_comment_by_name */
-} H5VL_native_object_optional_t;
/********************/
/* Public Variables */
/********************/
+/*********************/
+/* Public Prototypes */
+/*********************/
#ifdef __cplusplus
extern "C" {
#endif
-/*********************/
-/* Public Prototypes */
-/*********************/
H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name,
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 923c792..4e23221 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -177,16 +177,6 @@
#define H5F_ACS_FILE_IMAGE_INFO_COPY H5P__facc_file_image_info_copy
#define H5F_ACS_FILE_IMAGE_INFO_CMP H5P__facc_file_image_info_cmp
#define H5F_ACS_FILE_IMAGE_INFO_CLOSE H5P__facc_file_image_info_close
-/* Definition of core VFD write tracking flag */
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE sizeof(hbool_t)
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEF FALSE
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_ENC H5P__encode_hbool_t
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEC H5P__decode_hbool_t
-/* Definition of core VFD write tracking page size */
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE sizeof(size_t)
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF 524288
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC H5P__encode_size_t
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC H5P__decode_size_t
/* Definition for # of metadata read attempts */
#define H5F_ACS_METADATA_READ_ATTEMPTS_SIZE sizeof(unsigned)
#define H5F_ACS_METADATA_READ_ATTEMPTS_DEF 0
@@ -401,8 +391,6 @@ static const H5F_libver_t H5F_def_libver_high_bound_g = H5F_ACS_LIBVER_HIGH_BOUN
static const hbool_t H5F_def_want_posix_fd_g = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */
static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */
static const H5FD_file_image_info_t H5F_def_file_image_info_g = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */
-static const hbool_t H5F_def_core_write_tracking_flag_g = H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEF; /* Default setting for core VFD write tracking */
-static const size_t H5F_def_core_write_tracking_page_size_g = H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF; /* Default core VFD write tracking page size */
static const unsigned H5F_def_metadata_read_attempts_g = H5F_ACS_METADATA_READ_ATTEMPTS_DEF; /* Default setting for the # of metadata read attempts */
static const H5F_object_flush_t H5F_def_object_flush_cb_g = H5F_ACS_OBJECT_FLUSH_CB_DEF; /* Default setting for object flush callback */
static const hbool_t H5F_def_clear_status_flags_g = H5F_ACS_CLEAR_STATUS_FLAGS_DEF; /* Default to clear the superblock status_flags */
@@ -572,18 +560,6 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass)
H5F_ACS_FILE_IMAGE_INFO_DEL, H5F_ACS_FILE_IMAGE_INFO_COPY, H5F_ACS_FILE_IMAGE_INFO_CMP, H5F_ACS_FILE_IMAGE_INFO_CLOSE) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
- /* Register the core VFD backing store write tracking flag */
- if(H5P__register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE, &H5F_def_core_write_tracking_flag_g,
- NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_FLAG_ENC, H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEC,
- NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
- /* Register the size of the core VFD backing store page size */
- if(H5P__register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE, &H5F_def_core_write_tracking_page_size_g,
- NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC,
- NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
/* Register the # of read attempts */
if(H5P__register_real(pclass, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, H5F_ACS_METADATA_READ_ATTEMPTS_SIZE, &H5F_def_metadata_read_attempts_g,
NULL, NULL, NULL, H5F_ACS_METADATA_READ_ATTEMPTS_ENC, H5F_ACS_METADATA_READ_ATTEMPTS_DEC,
@@ -3957,89 +3933,6 @@ H5P__facc_libver_type_dec(const void **_pp, void *_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5P__facc_libver_type_dec() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_core_write_tracking
- *
- * Purpose: Enables/disables core VFD write tracking and page
- * aggregation size.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Dana Robinson
- * Tuesday, April 8, 2014
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
-{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "ibz", plist_id, is_enabled, page_size);
-
- /* The page size cannot be zero */
- if(page_size == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero")
-
- /* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
-
- /* Set values */
- if(H5P_set(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, &is_enabled) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD write tracking flag")
- if(H5P_set(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, &page_size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD write tracking page size")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Pset_core_write_tracking() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_core_write_tracking
- *
- * Purpose: Gets information about core VFD write tracking and page
- * aggregation size.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Dana Robinson
- * Tuesday, April 8, 2014
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled, size_t *page_size)
-{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "i*b*z", plist_id, is_enabled, page_size);
-
- /* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
-
- /* Get values */
- if(is_enabled) {
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, is_enabled) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core VFD write tracking flag")
- } /* end if */
-
- if(page_size) {
- if(H5P_get(plist, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, page_size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core VFD write tracking page size")
- } /* end if */
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Pget_core_write_tracking() */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_metadata_read_attempts
diff --git a/src/H5R.c b/src/H5R.c
index b7866b1..7d3686e 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -127,7 +127,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access property list info")
/* Create reference */
- if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_REF_CREATE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, ref, name, ref_type, space_id)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, &loc_params, H5VL_REF_CREATE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, ref, name, (int)ref_type, space_id)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create reference")
done:
@@ -257,7 +257,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
/* Get the dataspace with the correct region selected */
- if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_REGION, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_REGION, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, (int)ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve dataspace")
done:
@@ -314,7 +314,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Get the object type */
- if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_type, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_type, (int)ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to determine object type")
done:
@@ -381,7 +381,7 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
/* Get name */
- if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, name, size, ref_type, _ref) < 0)
+ if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, name, size, (int)ref_type, _ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to determine object path")
done:
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 827506e..ab8d3b4 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -126,7 +126,7 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid file identifier")
/* Get the object information */
- if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &obj_type, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, &loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &obj_type, (int)ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5G_UNKNOWN, "unable to determine object type")
/* Set return value */
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 17dfc1f..d51be0c 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -627,7 +627,7 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
done:
if (ret_value < 0 && saved) {
if (saved->name)
- H5MM_xfree(saved->name);
+ H5MM_xfree((void *)(saved->name)); /* Casting away const OK -QAK */
H5FL_FREE(H5VL_class_t, saved);
}
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 0d82f38..381bdfc 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -718,8 +718,8 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
case H5VL_ATTR_ITER:
{
- H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
- H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
+ H5_index_t idx_type = (H5_index_t)HDva_arg(arguments, int); /* enum work-around */
+ H5_iter_order_t order = (H5_iter_order_t)HDva_arg(arguments, int); /* enum work-around */
hsize_t *idx = HDva_arg(arguments, hsize_t *);
H5A_operator2_t op = HDva_arg(arguments, H5A_operator2_t);
void *op_data = HDva_arg(arguments, void *);
@@ -803,13 +803,6 @@ H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, hid_t H5_ATTR_UNUSED dxpl_i
break;
}
-#else
- /* XXX: This case only exists because this is the only attribute optional
- * value and we can't have empty enums. Delete it when we have another
- * attribute optional enum value.
- */
- case H5VL_NATIVE_ATTR_ITERATE_OLD:
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_ATTR_ITERATE_OLD is not a valid value when the library is built without deprecated routines")
#endif /* H5_NO_DEPRECATED_SYMBOLS */
default:
@@ -1592,7 +1585,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_name */
case H5VL_FILE_GET_NAME:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
size_t size = HDva_arg(arguments, size_t);
char *name = HDva_arg(arguments, char *);
ssize_t *ret = HDva_arg(arguments, ssize_t *);
@@ -1644,8 +1637,8 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fflush */
case H5VL_FILE_FLUSH:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
- H5F_scope_t scope = HDva_arg(arguments, H5F_scope_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
+ H5F_scope_t scope = (H5F_scope_t)HDva_arg(arguments, int); /* enum work-around */
H5F_t *f = NULL; /* File to flush */
/* Get the file for the object */
@@ -1692,7 +1685,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fmount */
case H5VL_FILE_MOUNT:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
const char *name = HDva_arg(arguments, const char *);
H5F_t *child = HDva_arg(arguments, H5F_t *);
hid_t plist_id = HDva_arg(arguments, hid_t);
@@ -1711,7 +1704,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Funmount */
case H5VL_FILE_UNMOUNT:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
const char *name = HDva_arg(arguments, const char *);
H5G_loc_t loc;
@@ -1817,7 +1810,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
{
H5F_sect_info_t *sect_info = HDva_arg(arguments, H5F_sect_info_t *);
ssize_t *ret = HDva_arg(arguments, ssize_t *);
- H5F_mem_t type = HDva_arg(arguments, H5F_mem_t);
+ H5F_mem_t type = (H5F_mem_t)HDva_arg(arguments, int); /* enum work-around */
size_t nsects = HDva_arg(arguments, size_t);
/* Go get the free-space section information in the file */
@@ -1829,7 +1822,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
/* H5Fget_info1/2 */
case H5VL_NATIVE_FILE_GET_INFO:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
H5F_info2_t *finfo = HDva_arg(arguments, H5F_info2_t *);
/* Get the file struct. This call is careful to not return the file pointer
@@ -1901,7 +1894,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
/* H5Iget_file_id */
case H5VL_NATIVE_FILE_GET_FILE_ID:
{
- H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
hid_t *file_id = HDva_arg(arguments, hid_t *);
if(NULL == (f = H5F__get_file(obj, type)))
@@ -2101,8 +2094,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
/* H5Fset_latest_format, H5Fset_libver_bounds */
case H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS:
{
- H5F_libver_t low = HDva_arg(arguments, H5F_libver_t);
- H5F_libver_t high = HDva_arg(arguments, H5F_libver_t);
+ H5F_libver_t low = (H5F_libver_t)HDva_arg(arguments, int); /* enum work-around */
+ H5F_libver_t high = (H5F_libver_t)HDva_arg(arguments, int); /* enum work-around */
/* Call internal set_libver_bounds function */
if(H5F__set_libver_bounds(f, low, high) < 0)
@@ -2476,7 +2469,7 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
case H5VL_NATIVE_GROUP_GET_OBJINFO:
{
const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
- hbool_t follow_link = HDva_arg(arguments, unsigned);
+ hbool_t follow_link = (hbool_t)HDva_arg(arguments, unsigned);
H5G_stat_t *statbuf = HDva_arg(arguments, H5G_stat_t *);
H5G_loc_t grp_loc;
@@ -2490,15 +2483,6 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
-#else
- /* XXX: These cases only exist because they are the only group optional
- * values and we can't have empty enums. Delete them when we have
- * non-deprecated group optional enum values.
- */
- case H5VL_NATIVE_GROUP_ITERATE_OLD:
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_GROUP_ITERATE_OLD is not a valid value when the library is built without deprecated routines")
- case H5VL_NATIVE_GROUP_GET_OBJINFO:
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_GROUP_GET_OBJINFO is not a valid value when the library is built without deprecated routines")
#endif /* H5_NO_DEPRECATED_SYMBOLS */
default:
@@ -2893,12 +2877,12 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
case H5VL_LINK_ITER:
{
H5G_loc_t loc;
- hbool_t recursive = HDva_arg(arguments, int);
- H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
- H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
- hsize_t *idx_p = HDva_arg(arguments, hsize_t *);
- H5L_iterate_t op = HDva_arg(arguments, H5L_iterate_t);
- void *op_data = HDva_arg(arguments, void *);
+ hbool_t recursive = (hbool_t)HDva_arg(arguments, unsigned);
+ H5_index_t idx_type = (H5_index_t)HDva_arg(arguments, int); /* enum work-around */
+ H5_iter_order_t order = (H5_iter_order_t)HDva_arg(arguments, int); /* enum work-around */
+ hsize_t *idx_p = HDva_arg(arguments, hsize_t *);
+ H5L_iterate_t op = HDva_arg(arguments, H5L_iterate_t);
+ void *op_data = HDva_arg(arguments, void *);
/* Get the location */
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
@@ -3115,7 +3099,7 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
case H5VL_REF_GET_REGION:
{
hid_t *ret = HDva_arg(arguments, hid_t *);
- H5R_type_t H5_ATTR_UNUSED ref_type = HDva_arg(arguments, H5R_type_t);
+ H5R_type_t H5_ATTR_UNUSED ref_type = (H5R_type_t)HDva_arg(arguments, int); /* enum work-around */
void *ref = HDva_arg(arguments, void *);
H5S_t *space = NULL; /* Dataspace object */
@@ -3130,11 +3114,11 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
break;
}
- /* H5Rget_obj_type2 */
+ /* H5Rget_obj_type1/2 */
case H5VL_REF_GET_TYPE:
{
H5O_type_t *obj_type = HDva_arg(arguments, H5O_type_t *);
- H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ H5R_type_t ref_type = (H5R_type_t)HDva_arg(arguments, int); /* enum work-around */
void *ref = HDva_arg(arguments, void *);
/* Get the object information */
@@ -3149,7 +3133,7 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
ssize_t *ret = HDva_arg(arguments, ssize_t *);
char *name = HDva_arg(arguments, char *);
size_t size = HDva_arg(arguments, size_t);
- H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ H5R_type_t ref_type = (H5R_type_t)HDva_arg(arguments, int); /* enum work-around */
void *ref = HDva_arg(arguments, void *);
/* Get name */
@@ -3232,8 +3216,8 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
case H5VL_OBJECT_VISIT:
{
- H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
- H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
+ H5_index_t idx_type = (H5_index_t)HDva_arg(arguments, int); /* enum work-around */
+ H5_iter_order_t order = (H5_iter_order_t)HDva_arg(arguments, int); /* enum work-around */
H5O_iterate_t op = HDva_arg(arguments, H5O_iterate_t);
void *op_data = HDva_arg(arguments, void *);
unsigned fields = HDva_arg(arguments, unsigned);
@@ -3281,7 +3265,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
{
void *ref = HDva_arg(arguments, void *);
const char *name = HDva_arg(arguments, char *);
- H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ H5R_type_t ref_type = (H5R_type_t)HDva_arg(arguments, int); /* enum work-around */
hid_t space_id = HDva_arg(arguments, hid_t);
H5S_t *space = NULL; /* Pointer to dataspace containing region */
diff --git a/src/H5VLnative.h b/src/H5VLnative.h
index 8ae3a66..613e7e3 100644
--- a/src/H5VLnative.h
+++ b/src/H5VLnative.h
@@ -25,6 +25,63 @@
#define H5VL_NATIVE_VALUE H5_VOL_NATIVE /* enum value */
#define H5VL_NATIVE_VERSION 0
+/* Typedef and values for native VOL connector attribute optional VOL operations */
+typedef int H5VL_native_attr_optional_t;
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+#define H5VL_NATIVE_ATTR_ITERATE_OLD 0 /* H5Aiterate (deprecated routine) */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+/* Typedef and values for native VOL connector dataset optional VOL operations */
+typedef int H5VL_native_dataset_optional_t;
+#define H5VL_NATIVE_DATASET_FORMAT_CONVERT 0 /* H5Dformat_convert (internal) */
+#define H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE 1 /* H5Dget_chunk_index_type */
+#define H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE 2 /* H5Dget_chunk_storage_size */
+#define H5VL_NATIVE_DATASET_CHUNK_READ 3 /* H5Dchunk_read */
+#define H5VL_NATIVE_DATASET_CHUNK_WRITE 4 /* H5Dchunk_write */
+
+/* Typedef and values for native VOL connector file optional VOL operations */
+typedef int H5VL_native_file_optional_t;
+#define H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE 0 /* H5Fclear_elink_file_cache */
+#define H5VL_NATIVE_FILE_GET_FILE_IMAGE 1 /* H5Fget_file_image */
+#define H5VL_NATIVE_FILE_GET_FREE_SECTIONS 2 /* H5Fget_free_sections */
+#define H5VL_NATIVE_FILE_GET_FREE_SPACE 3 /* H5Fget_freespace */
+#define H5VL_NATIVE_FILE_GET_INFO 4 /* H5Fget_info1/2 */
+#define H5VL_NATIVE_FILE_GET_MDC_CONF 5 /* H5Fget_mdc_config */
+#define H5VL_NATIVE_FILE_GET_MDC_HR 6 /* H5Fget_mdc_hit_rate */
+#define H5VL_NATIVE_FILE_GET_MDC_SIZE 7 /* H5Fget_mdc_size */
+#define H5VL_NATIVE_FILE_GET_SIZE 8 /* H5Fget_filesize */
+#define H5VL_NATIVE_FILE_GET_VFD_HANDLE 9 /* H5Fget_vfd_handle */
+#define H5VL_NATIVE_FILE_GET_FILE_ID 10 /* H5Fget_file_id */
+#define H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE 11 /* H5Freset_mdc_hit_rate_stats */
+#define H5VL_NATIVE_FILE_SET_MDC_CONFIG 12 /* H5Fset_mdc_config */
+#define H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO 13 /* H5Fget_metadata_read_retry_info */
+#define H5VL_NATIVE_FILE_START_SWMR_WRITE 14 /* H5Fstart_swmr_write */
+#define H5VL_NATIVE_FILE_START_MDC_LOGGING 15 /* H5Fstart_mdc_logging */
+#define H5VL_NATIVE_FILE_STOP_MDC_LOGGING 16 /* H5Fstop_mdc_logging */
+#define H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS 17 /* H5Fget_mdc_logging_status */
+#define H5VL_NATIVE_FILE_FORMAT_CONVERT 18 /* H5Fformat_convert */
+#define H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS 19 /* H5Freset_page_buffering_stats */
+#define H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS 20 /* H5Fget_page_buffering_stats */
+#define H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO 21 /* H5Fget_mdc_image_info */
+#define H5VL_NATIVE_FILE_GET_EOA 22 /* H5Fget_eoa */
+#define H5VL_NATIVE_FILE_INCR_FILESIZE 23 /* H5Fincrement_filesize */
+#define H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS 24 /* H5Fset_latest_format/libver_bounds */
+#define H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG 25 /* H5Fget_dset_no_attrs_hint */
+#define H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG 26 /* H5Fset_dset_no_attrs_hint */
+
+/* Typedef and values for native VOL connector group optional VOL operations */
+typedef int H5VL_native_group_optional_t;
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+#define H5VL_NATIVE_GROUP_ITERATE_OLD 0 /* HG5Giterate (deprecated routine) */
+#define H5VL_NATIVE_GROUP_GET_OBJINFO 1 /* HG5Gget_objinfo (deprecated routine) */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+/* Typedef and values for native VOL connector object optional VOL operations */
+typedef int H5VL_native_object_optional_t;
+#define H5VL_NATIVE_OBJECT_GET_COMMENT 0 /* H5G|H5Oget_comment, H5Oget_comment_by_name */
+#define H5VL_NATIVE_OBJECT_GET_INFO 1 /* H5Oget_info(_by_idx, _by_name)(2) */
+#define H5VL_NATIVE_OBJECT_SET_COMMENT 2 /* H5G|H5Oset_comment, H5Oset_comment_by_name */
+
#ifdef __cplusplus
extern "C" {
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index 49102d7..8b83e2e 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -1636,7 +1636,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
hid_t plist_id;
/* Retrieve parameters for 'mount' operation, so we can unwrap the child file */
- loc_type = va_arg(arguments, H5I_type_t);
+ loc_type = (H5I_type_t)va_arg(arguments, int); /* enum work-around */
name = va_arg(arguments, const char *);
child_file = (H5VL_pass_through_t *)va_arg(arguments, void *);
plist_id = va_arg(arguments, hid_t);
@@ -1645,7 +1645,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
under_vol_id = o->under_vol_id;
/* Re-issue 'file specific' call, using the unwrapped pieces */
- ret_value = H5VL_pass_through_file_specific_reissue(o->under_object, o->under_vol_id, specific_type, dxpl_id, req, loc_type, name, child_file->under_object, plist_id);
+ ret_value = H5VL_pass_through_file_specific_reissue(o->under_object, o->under_vol_id, specific_type, dxpl_id, req, (int)loc_type, name, child_file->under_object, plist_id);
} /* end if */
else if(specific_type == H5VL_FILE_IS_ACCESSIBLE) {
H5VL_pass_through_info_t *info;
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index cee38f3..33d23dc 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -463,8 +463,6 @@ main(void)
FAIL_STACK_ERROR
if((H5Pset_mdc_image_config(fapl, &my_cache_image_config)) < 0)
FAIL_STACK_ERROR
- if((H5Pset_core_write_tracking(fapl, TRUE, 1024 * 1024)) < 0)
- FAIL_STACK_ERROR
/* Test encoding & decoding property list */
if(test_encode_decode(fapl) < 0)
diff --git a/test/h5test.c b/test/h5test.c
index bd56592..e187264 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -763,10 +763,10 @@ h5_rmprefix(const char *filename)
*
* Purpose: Returns a file access template which is the default template
* but with a file driver, VOL connector, or libver bound set
- * according to a constant or environment variable
+ * according to a constant or environment variable
*
- * Return: Success: A file access property list
- * Failure: -1
+ * Return: Success: A file access property list
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, November 19, 1998
@@ -776,24 +776,29 @@ h5_rmprefix(const char *filename)
hid_t
h5_fileaccess(void)
{
- hid_t fapl = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- return -1;
+ if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
/* Attempt to set up a file driver first */
- if(h5_get_vfd_fapl(fapl) < 0)
- return -1;
+ if(h5_get_vfd_fapl(fapl_id) < 0)
+ goto error;
/* Next, try to set up a VOL connector */
- if(h5_get_vol_fapl(fapl) < 0)
- return -1;
+ if(h5_get_vol_fapl(fapl_id) < 0)
+ goto error;
/* Finally, check for libver bounds */
- if(h5_get_libver_fapl(fapl) < 0)
- return -1;
+ if(h5_get_libver_fapl(fapl_id) < 0)
+ goto error;
- return(fapl);
+ return fapl_id;
+
+error:
+ if(fapl_id != H5I_INVALID_HID)
+ H5Pclose(fapl_id);
+ return H5I_INVALID_HID;
} /* end h5_fileaccess() */
@@ -1003,7 +1008,7 @@ error:
* fapl but with a VOL connector set according to the constant
* or environment variable HDF5_VOL_CONNECTOR.
*
- * Return: Success: A file access property list ID
+ * Return: Success: 0
* Failure: -1
*
* Programmer: Jordan Henderson
diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be
index 6e94011..cd8a33a 100644
--- a/test/testfiles/plist_files/def_fapl_32be
+++ b/test/testfiles/plist_files/def_fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le
index 6e94011..cd8a33a 100644
--- a/test/testfiles/plist_files/def_fapl_32le
+++ b/test/testfiles/plist_files/def_fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be
index 6e94011..cd8a33a 100644
--- a/test/testfiles/plist_files/def_fapl_64be
+++ b/test/testfiles/plist_files/def_fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le
index 6e94011..cd8a33a 100644
--- a/test/testfiles/plist_files/def_fapl_64le
+++ b/test/testfiles/plist_files/def_fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be
index 237b291..b0ad12e 100644
--- a/test/testfiles/plist_files/fapl_32be
+++ b/test/testfiles/plist_files/fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le
index 237b291..b0ad12e 100644
--- a/test/testfiles/plist_files/fapl_32le
+++ b/test/testfiles/plist_files/fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be
index 237b291..b0ad12e 100644
--- a/test/testfiles/plist_files/fapl_64be
+++ b/test/testfiles/plist_files/fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le
index 237b291..b0ad12e 100644
--- a/test/testfiles/plist_files/fapl_64le
+++ b/test/testfiles/plist_files/fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be
index 9d81759..f93e19a 100644
--- a/test/testfiles/plist_files/lapl_32be
+++ b/test/testfiles/plist_files/lapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le
index 9d81759..f93e19a 100644
--- a/test/testfiles/plist_files/lapl_32le
+++ b/test/testfiles/plist_files/lapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be
index 9d81759..f93e19a 100644
--- a/test/testfiles/plist_files/lapl_64be
+++ b/test/testfiles/plist_files/lapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le
index 9d81759..f93e19a 100644
--- a/test/testfiles/plist_files/lapl_64le
+++ b/test/testfiles/plist_files/lapl_64le
Binary files differ