Network

 
AuthorCommitMessageCommit Date
David YoungDavid Young
d14d6d882b6Add some missing spaces.
David YoungDavid Young
6177b1278a1Fix spelling. NFCI.
David YoungDavid Young
cb8c5e6990aPrepare the VFD SWMR reader for a "floating" shadow index by overhauling the way that the shadow header and shadow index are loaded. In H5FD__vfd_swmr_load_hdr_and_idx(), adopt a new protocol for reading the shadow file: 0 If the maximum number of retries have been attempted, then exit with an error. 1 Try to read the shadow file *header*. If successful, continue to 2. If there is a hard failure, then return an error. If there is a failure that may be transient, then sleep and ret...
David YoungDavid Young
18a90ecd94bAdd my newest commentary. Finally reached page 14!
David YoungDavid Young
1f1fdf4221bChange md_pages_reserved and pb_expansion_threshold parameters to uint32_t from int32_t.
David YoungDavid Young
c61a484e262Don't use the bash-ism [[ ]]. Use the [ ], which is standard and perfectly adequate in this case.
David YoungDavid Young
211dd37b1c0Prepare a bit to let the shadow index "float": drastically 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...
David YoungDavid Young
b80eb562d53Now that we're buffering the removed pages to process at once, 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.
David YoungDavid Young
af51b6b49f7H5F_vfd_swmr_reader_end_of_tick(), 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_...
David YoungDavid Young
62dc8f18271Simplify nested logic in H5FD_vfd_swmr_get_tick_and_idx(). assert() our expectation that either a NULL index was passed, or a pointer to the index length was passed in, too.
David YoungDavid Young
aac0cd524f3Correct some irregular indentation, delete an unused line, split an `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.
David YoungDavid Young
97dec2db824Make H5FD__vfd_swmr_load_hdr_and_idx() simpler and faster: copy a pointer to the metadata index instead of copying the index itself. Use struct assignment instead of copying individual struct members. Lower a staircase.
David YoungDavid Young
f5b6eed8acdAfter quick-sorting the index, go ahead and assert that there are not 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.
David YoungDavid Young
088521835ebIn H5F__vfd_swmr_writer__create_index(), use calloc(3) instead of malloc(3) and a for-loop that zeroes the index.
David YoungDavid Young
86ba218d231In H5PB_remove_entry(), do not call vfd_swmr_mdf_idx_entry_remove(), because the H5PB__evict_entry() call should have already done that. Instead, just assert() that the index entry is not present.
David YoungDavid Young
369f7026ff3In vfd_swmr_mdf_idx_entry_remove(), give some local variables less wordy 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.
David YoungDavid Young
05f9f891a14Straggler from previous: provide uint64_decode().
David YoungDavid Young
c794a64014eClean up the code a bit: remove some unnecessary casts and such. NFCI.
David YoungDavid Young
02f0d0edbf1Change the blah_blah_blah_md_header `index_length` member from `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.
David YoungDavid Young
c7c0e6a33e8Delete unused constants.
David YoungDavid Young
99ab3e1c910Be brief, replace `(H5FS_section_info_t *)node` with `&node->sect_info`.
David YoungDavid Young
a88c99f67efProvide a convenience constant, H5_RETRY_ONE_SECOND.
David YoungDavid Young
05cc6c03941Disable C++ compatibility warnings to follow `develop` on the main fork.
David YoungDavid Young
f3ebcebc429Update punchlist a bit with John: add some items, update entries that are now complete.
David YoungDavid Young
c7d1aad5fccAdd a new version of the RFC with some commentary by me.
David YoungDavid Young
b999b3ea91aMakes some updates: in-progress, needs unit testing. Insert some whitespace where it makes things more readable.
David YoungDavid Young
cb707897a2aMention the current situation concerning raw-data flushing.
David YoungDavid Young
51d611e1726Mention that I fixed the VFD SWMR tests.
David YoungDavid Young
a3ea31e26a1Don't cast a malloc(3), this is C. Put curly braces around a multiline `if` statement. Delete an unnecessary backslash line continuation. NFCI.
David YoungDavid Young
22ac20d929cAssert that a shadow image is page-aligned since we assume that it is when we compute its base address and free it.
David YoungDavid Young
114f86275b0Delete unnecessary whitespace including invisible whitespace at the end of lines. Wrap a couple of lines. NFCI.
David YoungDavid Young
3ab6bd6111bChange the unwieldy name vfd_swmr_idx_entry_defer_free() to shadow_image_defer_free(), which is also a better description of what the routine does.
David YoungDavid Young
ca9707f8c21Use 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, ...
David YoungDavid Young
4bcde974dc0Remove unnecessary casts. Use the `ptr = calloc(n, sizeof(*ptr))` idiom for specifying the item size to be allocated. NFCI.
David YoungDavid Young
a76738098d9Prepare for some changes I'm committing shortly: pass an `H5F_shared_t *` as the first argument to H5PB__evict_entry() instead of an `H5PB_t *`.
David YoungDavid Young
ec079b01c2bMake the first parameter of H5PB_remove_entry() non-const to support some changes I will commit shortly.
David YoungDavid Young
0030737064bThere's no need to name parameters in a function declaration, and it makes them very long, so just delete the parameters.
David YoungDavid Young
c80418a1f37Allocate 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.
David YoungDavid Young
bc3467a2b9bTell the tick number in diagnostic messages.
David YoungDavid Young
e0dfdee9f6cAlign 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.
David YoungDavid Young
645aeac15cdIn 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.
David YoungDavid Young
a6a8b8fef51Allocate and zero using calloc(3) instead of malloc(3)+memset(3).
David YoungDavid Young
d23a6885e80Follow 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.
David YoungDavid Young
b05d4144542Delete a macro that's not used.
David YoungDavid Young
b6033855543Remove 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.
David YoungDavid Young
77a3506378bRemove the ugly casts on calloc() and malloc(). Change some malloc() to calloc() so that all bytes are initialized to something.
David YoungDavid Young
4a67d6145eeFix some typos. NFCI.
David YoungDavid Young
a7a2228798dWrap some comments at <= 80 characters.
David YoungDavid Young
8260929cad1Shorten 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.
David YoungDavid Young
7f3c00472acFix typo. NFCI.