| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simplify H5FD__vfd_swmr_index_deserialize(): reuse
h5_retry_init()/h5_retry_next() for retry loops.
Don't wait for the fstat(2) to read the correct size, because the
read(2) will return short if the file isn't long enough. (This change
should save at least one system call, always.)
Leave a bunch of comments about the changes that I will have to make so
that the shadow index will float.
NFCI: do not cast H5MM_malloc() return values, this is not C++.
|
|
|
|
|
|
|
| |
it's not necessary to iterate over pass numbers any more,
so just use two loops.
While I'm in here, change a comment or formatting here and there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compares both new and old shadow indices and calls H5PB_remove_entry()
on each entry that was in the old index but is not in the new.
Ever since H5PB_remove_entry() started removing shadow index
entries, it has been possible for H5F_vfd_swmr_reader_end_of_tick()
to walk past the end of the new shadow index or even to skip entries
in the new index. Sometimes an assertion failed when that happened.
I have restructured the code in H5F_vfd_swmr_reader_end_of_tick()
so that it compares the old and new indices, gathering a list of
removed pages, in one step. In the next step, it processes the
list of removed pages, calling H5PB_remove_entry() on each page.
In the step after that, it notifies the metadata cache of each
removed page. This fixes the bug I described, above.
|
|
|
|
|
| |
assert() our expectation that either a NULL index was passed, or a
pointer to the index length was passed in, too.
|
|
|
|
|
|
|
| |
`if ((p = allocate(...)) == NULL) { }` into two statements, `p =
allocate(...); if (p == NULL) { }`, put a semicolon at the end of an
HGOTO_ERROR(), remove comments /* end if */, /* end for */ after closing
curly braces.
|
|
|
|
|
|
| |
pointer to the metadata index instead of copying the index itself. Use
struct assignment instead of copying individual struct members. Lower a
staircase.
|
|
|
|
|
|
| |
duplicate entries for the same HDF5 page offset. There's an O(n) cost
to that, but it should be no more than the O(n log n) cost of the
quicksort.
|
|
|
|
| |
malloc(3) and a for-loop that zeroes the index.
|
|
|
|
|
| |
because the H5PB__evict_entry() call should have already done that.
Instead, just assert() that the index entry is not present.
|
|
|
|
|
|
| |
names. While I am here, do not copy the last element of the index over
the element that's being deleted, because in the very next step I'm
shifting all elements over by one.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
`uint64_t` to `size_t` because it describes the size of an in-core
structure as well as an on-disk one, and `size_t` is wide enough
to store the size of any in-core structure, while `uint64_t` may
be much too wide. Check that `index_length` is no more than SIZE_MAX
after we read it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
complete.
|
| |
|
|
|
|
| |
where it makes things more readable.
|
| |
|
| |
|
|
|
|
| |
statement. Delete an unnecessary backslash line continuation. NFCI.
|
|
|
|
| |
compute its base address and free it.
|
|
|
|
| |
lines. Wrap a couple of lines. NFCI.
|
|
|
|
|
| |
shadow_image_defer_free(), which is also a better description of what the
routine does.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, n, sizeof(type), cmp)` to
`qsort(ptr, n, sizeof(*ptr), cmp)`.
Use a `continue` statement to lower a staircase in
H5F_update_vfd_swmr_metadata_file().
Add vfd_swmr_mdf_idx_entry_remove() to delete a shadow index entry and add the
image at that entry to a deferred-free list. Call it whenever a page is
evicted.
Update the comment in H5PB_remove_entry() that asks if we need to remove shadow
index entries: now we *do* remove them. Remove shadow index entries in
H5PB__evict_entry(). Also mention in the comment that the index-entry removal
performed by H5PB__evict_entry() ought to be sufficient.
|
|
|
|
| |
specifying the item size to be allocated. NFCI.
|
|
|
|
| |
the first argument to H5PB__evict_entry() instead of an `H5PB_t *`.
|
|
|
|
| |
changes I will commit shortly.
|
|
|
|
| |
very long, so just delete the parameters.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
seems to be the programmer's original intention. It sure makes debugging
easier to have non-overlapping shadow images.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
where static routines have to have double underscores (__) in their name or
else the library asserts false.
|
| |
|
|
|
|
|
| |
by accident when I merged Vailin's changes that moved some functions from one
file to another.
|
|
|
|
| |
calloc() so that all bytes are initialized to something.
|
| |
|
| |
|
|
|
|
|
|
|
| |
people have to read and type this stuff!
Use TAILQ_* macros instead of an unnecessary custom implementation of
doubly-linked lists.
|
| |
|
| |
|
|
|
|
| |
constant `1`, to `hsize_t`.
|
|
|
|
|
| |
SWMR was never 100% effective, and now that there is a delay line on filespace
frees, it is not necesesary.
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
| |
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).
|
| |
|