summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-19 19:43:54 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 19:43:54 (GMT)
commitdc15a6987e1b10f19a0a692fdd00d5e713701a9a (patch)
treea0318de2beca1a1928d4132b6e62cfaecf54fd29 /src/H5Fint.c
parent10a7a4741500276804cb245fd8f860286642b76d (diff)
downloadhdf5-dc15a6987e1b10f19a0a692fdd00d5e713701a9a.zip
hdf5-dc15a6987e1b10f19a0a692fdd00d5e713701a9a.tar.gz
hdf5-dc15a6987e1b10f19a0a692fdd00d5e713701a9a.tar.bz2
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, 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.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 282a9de..661ec40 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1117,9 +1117,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
f->shared->vfd_swmr_md_fd = -1;
f->shared->fs_man_md = NULL;
- f->shared->dl_head_ptr = NULL;
- f->shared->dl_tail_ptr = NULL;
- f->shared->dl_len = 0;
+ TAILQ_INIT(&f->shared->old_images);
/* Get the VOL connector info */
if(H5F__set_vol_conn(f) < 0)