Bug #3752
openwant more verifiable dbuf user eviction
0%
Description
The current dbuf user eviction process has a few issues that make it difficult to verify that they work properly:
- Intention is not reflected in the API, which makes it easy to misunderstand what a particular call is intended to do.
- Lock order reversals are a risk given that the dbuf's mutex is held during eviction
- Users should be formalized more so than they are now; instead of maintaining several pointers, maintain a single user pointer whose data is owned by the user and is otherwise opaque to the dbuf. We can also use the opportunity to perform strict type checking instead of passing around void*.
- Users should only ever access their dbuf contents prior to eviction, so the callbacks should remove any possibility that they do so afterwards; while we're at it, we can simplify user access to their dbuf contents by unionizing their in-core references with the dbuf contents.
No data to display