diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-06 17:32:20 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-06 17:32:20 (GMT) |
commit | 9678dcffbf02f3d944a16af9ec6249f5a858df75 (patch) | |
tree | 2adc080153d4a201f7764c407c5de5f50e9e5ae5 /src/H5MFaggr.c | |
parent | fd079a23574376214aedeff9625b49d7b3917a81 (diff) | |
download | hdf5-9678dcffbf02f3d944a16af9ec6249f5a858df75.zip hdf5-9678dcffbf02f3d944a16af9ec6249f5a858df75.tar.gz hdf5-9678dcffbf02f3d944a16af9ec6249f5a858df75.tar.bz2 |
Make some changes to conserve filespace and ensure that all filespace is
eventually reclaimed.
Defer reclamation of raw data filespace, only.
XXX Deferring only raw-data reclamation isn't *quite* sufficient because
XXX a writer could conceivably reuse metadata space as raw-data space
XXX before max_lag ticks have elapsed. Readers could see metadata
XXX corrupted by raw data.
Once a file starts to close, stop deferring reclamation.
In H5MF_free_aggrs(), perform all deferred reclamations if the file is
closing.
Diffstat (limited to 'src/H5MFaggr.c')
-rw-r--r-- | src/H5MFaggr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index d716ae2..919ba63 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -753,6 +753,9 @@ H5MF_free_aggrs(H5F_t *f) HDassert(f->shared); HDassert(f->shared->lf); + if (f->shared->closing && H5MF_process_deferred_frees(f, UINT64_MAX) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "could not process deferrals") + /* Retrieve metadata aggregator info, if available */ if(H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats") |