diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-03 21:04:21 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-02-03 21:04:21 (GMT) |
commit | 29ee63787b8b75bdbf16468c9a7d9955e55eec78 (patch) | |
tree | 3901db989b92e7c64ad15b2593abe28c1ce85278 /src/H5Ftest.c | |
parent | 64f1ef1fda4dddb85ff16166051c7df3777254d7 (diff) | |
download | hdf5-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/H5Ftest.c')
-rw-r--r-- | src/H5Ftest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Ftest.c b/src/H5Ftest.c index ed3fec1..e1569a7 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -497,7 +497,7 @@ H5F__vfd_swmr_verify_md_hdr_and_idx(H5F_t *f, HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "incorrect index_length read from metadata file") /* Verify index_offset read from header in the metadata file is the size of md header */ - if(md_hdr->index_offset != H5FD_MD_HEADER_SIZE) + if(md_hdr->index_offset != f->shared->fs_page_size) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "incorrect index_offset read from metadata file") /* Verify num_entries read from index in the metadata file is num_entries */ |