Use the "tail queue" from queue(3) for the delayed free list of shadow images.
Delete the little-used free-list length, dl_len, and just count up the list
entries when diagnostic code needs the length.
Extract the code for deferring shadow-image free into a new subroutine,
`vfd_swmr_idx_entry_defer_free()`.
Rename type `deferred_free_head_t` as `deferred_free_queue_t`.
Remove the disused H5F__LL_{REMOVE,PREPEND} macros.
Add some diagnostic code and #if 0'd assertions.
Change `qsort(ptr, ...
Allocate regionsin the shadow file of page size or greater size with page
alignment. The VFD SWMR code had always assumed that the regions were aligned
to page size. It would blithely round the start addresses of regions to the
next lower page. When the region was freed, the freespace manager (H5MV) would
suffer an assertion or corruption.
Align the shadow images on page boundaries so that they don't overlap. This
seems to be the programmer's original intention. It sure makes debugging
easier to have non-overlapping shadow images.
In the faked-up shadow-index entries, assign independent page numbers in the
HDF5 file and in the shadow file. I had added assertions that the page numbers
were unique, and this caused those assertions to fail. I don't know if I'll
keep the assertions, but this is an inexpensive change that makes the test more
realistic.
Follow the naming convention enforced by FUNC_ENTER_/FUNC_EXIT_* macros (?)
where static routines have to have double underscores (__) in their name or
else the library asserts false.
Remove disused duplicate of H5F__idx_entry_cmp(). I probably introduced that
by accident when I merged Vailin's changes that moved some functions from one
file to another.
Shorten the type name `H5F_vfd_swmr_eot_queue_entry_t` to `eot_queue_entry_t`:
people have to read and type this stuff!
Use TAILQ_* macros instead of an unnecessary custom implementation of
doubly-linked lists.
Don't see a 1GB threshold for tracking free filespace, that workaround for VFD
SWMR was never 100% effective, and now that there is a delay line on filespace
frees, it is not necesesary.
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and
I share.
Now I need to put this branch on a fork with a less confusing name than
vchoi_fork!
Fix the FSM bug when setting the FSM threshold to a non-default value.
Check for smaller or larger section size after merging and shrinking a section,
for this case is the section that is smaller than threshold (see H5MF_xfree() in H5MF.c).
It is possible for the section to be smaller after merging/shrinking (see H5MF__sect_large_shrink()
in H5MFsection.c).
Fix for punch list #28:
Given that the VFD SWMR configuration FAPL property is set, the writer field must
be consistent with the flags passed in the H5Fopen() (either H5F_ACC_RDWR for the
VFD SWMR writer, or H5F_ACC_RDONLY for the VFD SWMR readers).
Changes for punch list #4: Add support for opening mulitple files in either VFD SWMR writer or reader mode. See EOT queue in section 3.2.2 and 3.3 and 3.3.2 in the RFC.
Update punch list with items completed and in progress.
Fix for punch list #13 item #1: Odd behavior in the superblock refresh routine.
The test "driver_addr != sblock->driver_addr" is failing for superblock version 2 & 3.
Fix: there is no driver_addr in superblock version 2 & 3.
It should decode the root group object header address (root_addr) and verify accordingly.
Modifications for the following items in the punch list:
(A) #5: Add the "pb_expansion_threshold" field to the "H5F_vfd_swmr_config_t" structure
and update H5Pset_vfd_swmr_config() and H5Pget_vfd_swmr_config() accordingly
(B) #13 bullet 2: Comment H5F_vfd_swmr_config_t in H5Fpublic.h properly
(copied from John's description in the RFC)
(C) Change the field name "vfd_swmr_writer" to "writer" in "struct H5F_vfd_swmr_config_t"
(as indicated on page 11 in the RFC) and all references to it
VFD SWMR sparse readers failed to open the .h5 file because the sparse writer
had finished its work and closed the .h5 file, thus removing the shadow file.
Make the sparse writer wait to close the .h5 file for a signal from
testvfdswmr.sh. In testvfdswmr.sh, send the signal when the readers have all
finished.
First, reduce code duplication in h5tools_fopen(). Then, stop h5tools_fopen()
from using the SWMR VFD unless the h5tools_fopen() arguments specifically
choose that VFD.
Delay for no more than 1/100 second between any retry in H5C_load_entry().
This lets test/testflushrefresh.sh pass again. It was timing out while it
waited for expected failures to occur because the retry loop ran for way too
long.
I've changed `test/dsets` so that every time it needs to visit all
cells in a matrix in an arbitrary order, first it chooses a random
starting `offset` in [0, rows * columns - 1]. Then it chooses a
random `increment` that's relatively prime to `rows * columns`.
Then it visits every cell in `rows * columns` steps:
for (i = 0; i < rows * columns; i++) {
visit(cell[offset / columns][offset % columns]);
offset = (increment + offset) % (rows * columns);
...