summaryrefslogtreecommitdiffstats
path: root/src/H5Dbtree2.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-06-12 16:24:27 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-06-12 16:24:27 (GMT)
commit625ef85fe56d8265989e8c1ed32331064012a068 (patch)
tree814195dc9c8e3620e9a85adc6e0e4e7569563485 /src/H5Dbtree2.c
parentff43cd3631eaa13886933db3030728fc374c7123 (diff)
downloadhdf5-625ef85fe56d8265989e8c1ed32331064012a068.zip
hdf5-625ef85fe56d8265989e8c1ed32331064012a068.tar.gz
hdf5-625ef85fe56d8265989e8c1ed32331064012a068.tar.bz2
Avoid leaving a v1 B-tree used as a chunk index in a bad state
that makes assertions fail. Add an optional `close` method to the `H5D_chunk_ops_t`, and use that to release "holds" on metadata cache (MDC) entries. For extensible arrays and v2 B-trees, use the existing `dest`(roy) method to implement `close`. For v1 B-trees and other chunk indices, don't provide `close`: we cannot safely close the v1 B-tree index, and the other indices don't have a meaningful presence in the MDC. Revert my first attempt at making v1 B-tree chunk indices closeable with `dest`. Put my comment about the stopgap fix for VFD SWMR at the right place in src/H5Dchunk.c.
Diffstat (limited to 'src/H5Dbtree2.c')
-rw-r--r--src/H5Dbtree2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index ae98654..509a67b 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -161,7 +161,8 @@ const H5D_chunk_ops_t H5D_COPS_BT2[1] = {{
H5D__bt2_idx_size, /* size */
H5D__bt2_idx_reset, /* reset */
H5D__bt2_idx_dump, /* dump */
- H5D__bt2_idx_dest /* destroy */
+ H5D__bt2_idx_dest, /* destroy */
+ H5D__bt2_idx_dest /* close (same as destroy) */
}};