Skip to content

Commit

Permalink
Merge branch 'HDFGroup:develop' into develop-ci-clang
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Dec 17, 2024
2 parents 3cb4462 + 914640e commit 8d705d5
Show file tree
Hide file tree
Showing 55 changed files with 485 additions and 299 deletions.
10 changes: 10 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,17 @@ New Features
There is no API compatibility wrapper for this change.

Fixes GitHub issue #3506

- H5Pset* routines now fail when used on default property lists

Modifying default property lists was never fully supported and could produce
inconsistent and unexpected behavior.

- H5Pset_vol() now fails when used on a non-file-access property list

Similar to the above. Setting the connector on a non-FAPL had no effect on
library behavior, and the connector ID and information could not be read back
from that plist later.

Parallel Library:
-----------------
Expand Down
12 changes: 11 additions & 1 deletion src/H5ACpublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,18 @@ typedef struct H5AC_cache_config_t {

#define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1

/**
* No limit on number of times a prefetched entry can appear in subsequent
* cache images
* \since 1.10.1
*/
#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1
#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100
/**
* Limit on number of times a prefetched entry can appear in subsequent
* cache images
* \since 1.10.1
*/
#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100

//! <!-- [H5AC_cache_image_config_t_snip] -->
/**
Expand Down
6 changes: 2 additions & 4 deletions src/H5Dpublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
#define H5D_CHUNK_CACHE_NBYTES_DEFAULT SIZE_MAX
#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0)

/**
* Bit flags for the H5Pset_chunk_opts() and H5Pget_chunk_opts()
*/
/** Bit flags for the H5Pset/get_chunk_opts() \since 1.10.0 */
#define H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS (0x0002u)

/*******************/
Expand Down Expand Up @@ -1697,7 +1695,7 @@ H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type);
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS

/* Macros */
/** v1 B-tree index \since 1.10.0 */
#define H5D_CHUNK_BTREE H5D_CHUNK_IDX_BTREE

/* Formerly used to support the H5DOread/write_chunk() API calls.
Expand Down
8 changes: 4 additions & 4 deletions src/H5FDcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
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)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
Expand Down Expand Up @@ -550,7 +550,7 @@ H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled /*out*/, size_t *
FUNC_ENTER_API(FAIL)

/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
Expand Down Expand Up @@ -588,7 +588,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
FUNC_ENTER_API(FAIL)

/* Check argument */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");

/* Set VFD info values */
Expand Down Expand Up @@ -624,7 +624,7 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor

FUNC_ENTER_API(FAIL)

if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
Expand Down
8 changes: 8 additions & 0 deletions src/H5FDdevelop.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,41 +92,49 @@
/**
* Extensible array header block; it is mapped to 'ohdr' type file memory to
* benefit from their similarity.
* \since 1.10.0
*/
#define H5FD_MEM_EARRAY_HDR H5FD_MEM_OHDR
/**
* Extensible array index block; it is mapped to 'ohdr' type file memory because
* these index blocks are similar to extensible array header blocks.
* \since 1.10.0
*/
#define H5FD_MEM_EARRAY_IBLOCK H5FD_MEM_OHDR
/**
* Extensible array super block; it is mappend to 'btree' type file memory
* because the indices are similar enough to B-tree nodes.
* \since 1.10.0
*/
#define H5FD_MEM_EARRAY_SBLOCK H5FD_MEM_BTREE
/**
* Extensible array data block; it is mapped to 'lheap' type file memory
* because it is similar enough to local heap info.
* \since 1.10.0
*/
#define H5FD_MEM_EARRAY_DBLOCK H5FD_MEM_LHEAP
/**
* Extensible array data block & page; it is mapped to 'lheap' type file memory
* because it is similar enough to local heap info.
* \since 1.10.0
*/
#define H5FD_MEM_EARRAY_DBLK_PAGE H5FD_MEM_LHEAP
/**
* Fixed array header block; it is mapped to 'ohdr' type file memory to
* benefit their similarity.
* \since 1.10.0
*/
#define H5FD_MEM_FARRAY_HDR H5FD_MEM_OHDR
/**
* Fixed array data block; it is mapped to 'lheap' type file memory
* because it is similar enough to local heap info.
* \since 1.10.0
*/
#define H5FD_MEM_FARRAY_DBLOCK H5FD_MEM_LHEAP
/**
* Fixed array data block & page; it is mapped to 'lheap' type file memory
* because it is similar enough to local heap info.
* \since 1.10.0
*/
#define H5FD_MEM_FARRAY_DBLK_PAGE H5FD_MEM_LHEAP

Expand Down
6 changes: 3 additions & 3 deletions src/H5FDdirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbu

FUNC_ENTER_API(FAIL)

if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");

if (H5FD__direct_populate_config(boundary, block_size, cbuf_size, &fa) < 0)
Expand Down Expand Up @@ -256,7 +256,7 @@ H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size /

FUNC_ENTER_API(FAIL)

if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_DIRECT != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
Expand Down Expand Up @@ -443,7 +443,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct");

/* Get the driver specific information */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
if (NULL == (fa = (const H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) {
if (H5FD__direct_populate_config(0, 0, 0, &default_fa) < 0)
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDfamily.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /*

FUNC_ENTER_API(FAIL)

if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_FAMILY != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
Expand Down Expand Up @@ -1118,7 +1118,7 @@ H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
FUNC_ENTER_PACKAGE

/* Get the plist structure and family offset */
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get offset for family driver");
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDhdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
fprintf(stdout, "called %s.\n", __func__);
#endif

plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false);
if (plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (FAIL == H5FD__hdfs_validate_config(fa))
Expand Down Expand Up @@ -621,7 +621,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/)

if (fa_dst == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst ptr is NULL");
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true);
if (plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");

Expand Down
6 changes: 3 additions & 3 deletions src/H5FDhdfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
*/
#define H5FD__CURR_HDFS_FAPL_T_VERSION 1

/** Max size of the node name \since 1.8.22 */
/** Max size of the node name \since 1.8.22 1.10.6 */
#define H5FD__HDFS_NODE_NAME_SPACE 128
/** Max size of the user name \since 1.8.22 */
/** Max size of the user name \since 1.8.22 1.10.6 */
#define H5FD__HDFS_USER_NAME_SPACE 128
/** Max size of the kerberos cache path \since 1.8.22 */
/** Max size of the kerberos cache path \since 1.8.22 1.10.6 */
#define H5FD__HDFS_KERB_CACHE_PATH_SPACE 128

/**
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
memset(&fa, 0, sizeof(H5FD_log_fapl_t));

/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");

/* Duplicate the log file string
Expand Down Expand Up @@ -446,7 +446,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
o_flags |= O_EXCL;

/* Get the driver specific information */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
if (NULL == (fa = (const H5FD_log_fapl_t *)H5P_peek_driver_info(plist))) {
/* Use default driver configuration*/
Expand Down
68 changes: 44 additions & 24 deletions src/H5FDlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,60 @@
#define H5FD_LOG_VALUE H5_VFD_LOG

/* Flags for H5Pset_fapl_log() */
/* Flags for tracking 'meta' operations (truncate) */

/** Flag for tracking truncate operation \since 1.10.1 */
#define H5FD_LOG_TRUNCATE 0x00000001
#define H5FD_LOG_META_IO (H5FD_LOG_TRUNCATE)
/* Flags for tracking where reads/writes/seeks occur */
#define H5FD_LOG_LOC_READ 0x00000002
/** Flag for tracking meta IO operations \since 1.10.1 */
#define H5FD_LOG_META_IO (H5FD_LOG_TRUNCATE)
/** Flag for tracking where reads occur \since 1.6.0 */
#define H5FD_LOG_LOC_READ 0x00000002
/** Flag for tracking where writes occur \since 1.6.0 */
#define H5FD_LOG_LOC_WRITE 0x00000004
#define H5FD_LOG_LOC_SEEK 0x00000008
#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ | H5FD_LOG_LOC_WRITE | H5FD_LOG_LOC_SEEK)
/* Flags for tracking number of times each byte is read/written */
#define H5FD_LOG_FILE_READ 0x00000010
/** Flag for tracking where seeks occur \since 1.6.0 */
#define H5FD_LOG_LOC_SEEK 0x00000008
/** Flag for tracking where IO operations occur \since 1.6.0 */
#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ | H5FD_LOG_LOC_WRITE | H5FD_LOG_LOC_SEEK)
/** Flag for tracking number of times each byte is read \since 1.6.0 */
#define H5FD_LOG_FILE_READ 0x00000010
/** Flag for tracking number of times each byte is written \since 1.6.0 */
#define H5FD_LOG_FILE_WRITE 0x00000020
#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ | H5FD_LOG_FILE_WRITE)
/* Flag for tracking "flavor" (type) of information stored at each byte */
/** Flag for tracking number of times each byte is read/written \since 1.6.0 */
#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ | H5FD_LOG_FILE_WRITE)
/** Flag for tracking "flavor" (type) of information stored at each byte \since 1.6.0 */
#define H5FD_LOG_FLAVOR 0x00000040
/* Flags for tracking total number of reads/writes/seeks/truncates */
#define H5FD_LOG_NUM_READ 0x00000080
#define H5FD_LOG_NUM_WRITE 0x00000100
#define H5FD_LOG_NUM_SEEK 0x00000200
/** Flag for tracking total number of reads \since 1.6.0 */
#define H5FD_LOG_NUM_READ 0x00000080
/** Flag for tracking total number of writes \since 1.6.0 */
#define H5FD_LOG_NUM_WRITE 0x00000100
/** Flag for tracking total number of seeks \since 1.6.0 */
#define H5FD_LOG_NUM_SEEK 0x00000200
/** Flag for tracking total number of truncates \since 1.8.7 */
#define H5FD_LOG_NUM_TRUNCATE 0x00000400
#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ | H5FD_LOG_NUM_WRITE | H5FD_LOG_NUM_SEEK | H5FD_LOG_NUM_TRUNCATE)
/* Flags for tracking time spent in open/stat/read/write/seek/truncate/close */
#define H5FD_LOG_TIME_OPEN 0x00000800
#define H5FD_LOG_TIME_STAT 0x00001000
#define H5FD_LOG_TIME_READ 0x00002000
#define H5FD_LOG_TIME_WRITE 0x00004000
#define H5FD_LOG_TIME_SEEK 0x00008000
/** Flag for tracking total number of IO operations \since 1.6.0 */
#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ | H5FD_LOG_NUM_WRITE | H5FD_LOG_NUM_SEEK | H5FD_LOG_NUM_TRUNCATE)
/** Flag for tracking time spent in open \since 1.8.7 */
#define H5FD_LOG_TIME_OPEN 0x00000800
/** Flag for tracking time spent in stat \since 1.8.7 */
#define H5FD_LOG_TIME_STAT 0x00001000
/** Flag for tracking time spent in read \since 1.8.7 */
#define H5FD_LOG_TIME_READ 0x00002000
/** Flag for tracking time spent in write \since 1.6.0 */
#define H5FD_LOG_TIME_WRITE 0x00004000
/** Flag for tracking time spent in seek \since 1.6.0 */
#define H5FD_LOG_TIME_SEEK 0x00008000
/** Flag for tracking time spent in truncate \since 1.10.1 */
#define H5FD_LOG_TIME_TRUNCATE 0x00010000
#define H5FD_LOG_TIME_CLOSE 0x00020000
/** Flag for tracking time spent in close \since 1.6.0 */
#define H5FD_LOG_TIME_CLOSE 0x00020000
/** Flag for tracking time spent in IO operations \since 1.6.0 */
#define H5FD_LOG_TIME_IO \
(H5FD_LOG_TIME_OPEN | H5FD_LOG_TIME_STAT | H5FD_LOG_TIME_READ | H5FD_LOG_TIME_WRITE | \
H5FD_LOG_TIME_SEEK | H5FD_LOG_TIME_TRUNCATE | H5FD_LOG_TIME_CLOSE)
/* Flags for tracking allocation/release of space in file */
/** Flag for tracking allocation of space in file \since 1.6.0 */
#define H5FD_LOG_ALLOC 0x00040000
#define H5FD_LOG_FREE 0x00080000
/** Flag for tracking release of space in file \since 1.10.1 */
#define H5FD_LOG_FREE 0x00080000
/** Flag for tracking all info \since 1.6.0 */
#define H5FD_LOG_ALL \
(H5FD_LOG_FREE | H5FD_LOG_ALLOC | H5FD_LOG_TIME_IO | H5FD_LOG_NUM_IO | H5FD_LOG_FLAVOR | \
H5FD_LOG_FILE_IO | H5FD_LOG_LOC_IO | H5FD_LOG_META_IO)
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDmirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/)
if (NULL == fa_dst)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL");

plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true);
if (NULL == plist)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5P_peek_driver(plist) != H5FD_MIRROR)
Expand Down Expand Up @@ -1284,7 +1284,7 @@ H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa)

LOG_OP_CALL(__func__);

plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false);
if (NULL == plist)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (NULL == fa)
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDmirror.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#ifdef H5_HAVE_MIRROR_VFD

/** ID for the mirror VFD */
/** ID for the mirror VFD \since 1.10.7 */
#define H5FD_MIRROR (H5OPEN H5FD_MIRROR_id_g)

/** Identifier for the mirror VFD */
Expand Down
Loading

0 comments on commit 8d705d5

Please sign in to comment.