-
Type: Technical Debt
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Block Manager
-
Storage Engines
-
5
-
StorEng - Defined Pipeline
There is a semi-common pattern in the code of accessing a file handle off a WT_BM or WT_BLOCK. This looks like this in the code:
bm->block->fh->handle
We should add a bm_get_handle function to the block API to avoid this pattern in the codebase. It would return the backing WT_FILE_HANDLE to the caller.
Additionally there are a number of locations a handle is retrieved directory from the WT_BLOCK* structure using a similar pattern. We could create a function like __wt_block_get_handle which returns a WT_FILE_HANDLE* to the caller.
Thus bm_get_handle becomes a simple call into wt_block_get_handle.