Support code for disk access management
Marcel Sondaar
diskmm.bas | Support code for disk access management |
Todo’s | |
concatenate fail to end if necessary | |
Functions | |
DiskMM_FoldTranslate | Translates an extent for a given mapping to a list of extents in the physical domain. |
Todo’s | |
Recurse | |
Functions | |
DiskMM_Insert | Inserts a translation extent into a map |
DiskMM_InsertNodeExPrime | Insert an extent into a mappings extent tree. |
Todo’s | |
Balance | |
Functions | |
DiskMM_InsertNodeEx | Insert an extent into a mappings extent tree. |
Function DiskMM_FoldTranslate( ByVal node As DISKMM_EXTENTTREE Ptr, ByVal Requester As Integer, ByVal Extent as DISKMM_EXTENT Ptr, ByVal Validated As Integer ) As DISKMM_TRANSLATION Ptr
Translates an extent for a given mapping to a list of extents in the physical domain.
node | pointer to the root node of an extent tree to translate |
requester | the source making the request, used in determining validation |
extent | pointer to the input extent |
validated | nonzero if ownership was already established |
return | a linked list of translated extents |
Function DiskMM_Insert( ByVal map As Integer, ByRef extent as DISKMM_EXTENT ) As Integer
Inserts a translation extent into a map
map | the map index to update |
extent | the extent to insert |
out return - zero on success, nonzero on failure
failures include non-present maps, extents overlapping existing extents, and extents (partially) falling outside of the map’s range
Function DiskMM_InsertNodeExPrime( ByVal root As DISKMM_EXTENTTREE Ptr, ByVal newnode As DISKMM_EXTENTTREE Ptr ) As Integer
Insert an extent into a mappings extent tree. This function will not update anything if the inserted node overlaps existing nodes.
root | current root of the tree, must be nonzero |
newnode | new node to insert, must be nonzero |
return | zero on success, nonzero if there was any overlap |
Function DiskMM_InsertNodeEx( ByVal map As DISKMM_MAPPING Ptr, ByVal newnode As DISKMM_EXTENTTREE Ptr ) As Integer
Insert an extent into a mappings extent tree. This function will not update anything if the inserted node overlaps existing nodes.
map | map to modify |
newnode | new node to insert |
return | zero on success, nonzero if there was any overlap, any null argument, or if the extent is out of bounds |
Translates an extent for a given mapping to a list of extents in the physical domain.
Function DiskMM_FoldTranslate( ByVal node As DISKMM_EXTENTTREE Ptr, ByVal Requester As Integer, ByVal Extent as DISKMM_EXTENT Ptr, ByVal Validated As Integer ) As DISKMM_TRANSLATION Ptr
Inserts a translation extent into a map
Function DiskMM_Insert( ByVal map As Integer, ByRef extent as DISKMM_EXTENT ) As Integer
Insert an extent into a mappings extent tree.
Function DiskMM_InsertNodeExPrime( ByVal root As DISKMM_EXTENTTREE Ptr, ByVal newnode As DISKMM_EXTENTTREE Ptr ) As Integer
Insert an extent into a mappings extent tree.
Function DiskMM_InsertNodeEx( ByVal map As DISKMM_MAPPING Ptr, ByVal newnode As DISKMM_EXTENTTREE Ptr ) As Integer