From f9c2b8d014db11489608abaffec5ce43038a4eaa Mon Sep 17 00:00:00 2001 From: Matthew Larson Date: Tue, 10 Dec 2024 15:40:34 -0600 Subject: [PATCH] Require FAPL in H5Pset_vol() --- release_docs/RELEASE.txt | 6 ++++++ src/H5Pfapl.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c3a2dacfa0b..393ebfd8ac0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -392,6 +392,12 @@ New Features 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: ----------------- - diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 6a58b0f788c..7b92507dd66 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -5829,7 +5829,7 @@ H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info) FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) + if (NULL == (plist = (H5P_genplist_t *)H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (H5P_is_default_plist(plist_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't change VOL connector on a default property list");