summaryrefslogtreecommitdiffstats
path: root/src/H5Ofsinfo.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2019-06-26 15:47:31 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-07-22 19:52:43 (GMT)
commit00a546ec57edd319d95baea088ab0f9fb7b722b5 (patch)
treec181579c0be6fa120f81671e5955b479e1a3aa7d /src/H5Ofsinfo.c
parentf4e2304bad527b57d6edcb7136e69ac7ba70cebf (diff)
downloadhdf5-00a546ec57edd319d95baea088ab0f9fb7b722b5.zip
hdf5-00a546ec57edd319d95baea088ab0f9fb7b722b5.tar.gz
hdf5-00a546ec57edd319d95baea088ab0f9fb7b722b5.tar.bz2
Bring pull request #1772 from develop to 1.10.
Fails file creation when non-default free-space info is set in fcpl and the library version high bound is less than v110 because free-space info message is introduced in library release v110. Merge pull request #1772 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-10808-h5pset_file_space_strategy-succeeds to develop * commit '3768566139df18928aa29ece0eff3010b224633b': Add release notes. Correct hid_t error value to H5I_INVALID_HID in tests related to libver_bounds. Fix for HDFFV-10808 H5Pset_file_space_strategy succeeds when using H5Pset_libver_bounds v18,v18. Fails file creation when non-default free-space info is set in fcpl and the library version high bound is less than v110 because free-space info message is introduced in library release v110. Conflicts: test/tfile.c
Diffstat (limited to 'src/H5Ofsinfo.c')
-rw-r--r--src/H5Ofsinfo.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index bb15f62..ec2328c 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -65,10 +65,6 @@ const H5O_msg_class_t H5O_MSG_FSINFO[1] = {{
H5O__fsinfo_debug /* debug the message */
}};
-/* Current version of free-space manager info information */
-#define H5O_FSINFO_VERSION_0 0
-#define H5O_FSINFO_VERSION_1 1
-
/* Declare a free list to manage the H5O_fsinfo_t struct */
H5FL_DEFINE_STATIC(H5O_fsinfo_t);
@@ -157,11 +153,13 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file space strategy")
} /* end switch */
+ fsinfo->version = H5O_FSINFO_VERSION_1;
fsinfo->mapped = TRUE;
} else {
- HDassert(vers == H5O_FSINFO_VERSION_1);
+ HDassert(vers >= H5O_FSINFO_VERSION_1);
+ fsinfo->version = vers;
fsinfo->strategy = (H5F_fspace_strategy_t)*p++; /* File space strategy */
fsinfo->persist = *p++; /* Free-space persist or not */
H5F_DECODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section threshold */
@@ -214,7 +212,7 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
HDassert(p);
HDassert(fsinfo);
- *p++ = H5O_FSINFO_VERSION_1; /* message version */
+ *p++ = (uint8_t)fsinfo->version; /* message version */
*p++ = fsinfo->strategy; /* File space strategy */
*p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */
H5F_ENCODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section size threshold */