summaryrefslogtreecommitdiffstats
path: root/src/H5Pfapl.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-03 21:04:21 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-02-03 21:04:21 (GMT)
commit29ee63787b8b75bdbf16468c9a7d9955e55eec78 (patch)
tree3901db989b92e7c64ad15b2593abe28c1ce85278 /src/H5Pfapl.c
parent64f1ef1fda4dddb85ff16166051c7df3777254d7 (diff)
downloadhdf5-29ee63787b8b75bdbf16468c9a7d9955e55eec78.zip
hdf5-29ee63787b8b75bdbf16468c9a7d9955e55eec78.tar.gz
hdf5-29ee63787b8b75bdbf16468c9a7d9955e55eec78.tar.bz2
Numerous changes supporting a floating shadow index:
Add to the H5F_shared_t (!) a new member that tells the index in the shadow file where the index should be written. Allocate shadow filespace for the header and the index separately so that the index can float. Update tests to match the expected original location of the index. Introduce vfd_swmr_enlarge_shadow_index(), a routine that allocates space in the shadow file for a new index that has (up to) twice as many entries as the old index, allocates a new in-core index of the same size, and copies the old in-core index to the new. Call vfd_swmr_enlarge_shadow_index() in H5PB_vfd_swmr__update_index() when the in-core index has too few slots. In the comment at the top of H5FD__vfd_swmr_load_hdr_and_idx(), describe the protocol that it follows, now, when it reads the shadow header and index. Delete some dead code in the function and add a bit of diagnostic code. TBD quiet the diagnostic code. In H5F_vfd_swmr_init(), follow the protocol: write the index, first, then the header. Modify property-list checks and tests to reserve no fewer than two pages at the front of the shadow file for the header and index.
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r--src/H5Pfapl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index a3873b4..f28a381 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5582,9 +5582,9 @@ H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr)
if(config_ptr->max_lag < 3 )
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "max_lag must be at least 3")
- /* This field must be >= 1 */
- if(config_ptr->md_pages_reserved < 1 )
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_pages_reserved must be at least 1")
+ /* This field must be >= 2 */
+ if(config_ptr->md_pages_reserved < 2 )
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_pages_reserved must be at least 2")
/* This field must be in the range [0, 100] */
if(config_ptr->pb_expansion_threshold < 0 || config_ptr->pb_expansion_threshold > H5F__MAX_PB_EXPANSION_THRESHOLD)