Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NDMP: Add out of order meta data handling.
This uses an additional hash table when we receive the FHDB dir information in a somewhat random order from the NDMP DATA Agent. The NetApp NDMP implementation is known to do this semi random ordering. We pre-allocate the nodes in the same way they are normally created them but store them temporary in the hash table as a pointer to the node and the node id of its parent. This way we use the tree alloc optimal. When we start processing the actual node information we first look if there is any out of order metadata captured in the hash table. If so we do a linear walk of the hash table and recursivly create the missing parent nodes until we can connect things to the existing tree. For creating the parent node we hash lookup the parent node in the hash and try inserting it into the tree. When we consume the node for a parent node we set the pointer to the node to NULL in the hash table entry. This way the linear walk knows we already visited this node and can skip it.
- Loading branch information
Marco van Wieringen
committed
Oct 31, 2015
1 parent
3ed7a1d
commit 9b78b96
Showing
1 changed file
with
198 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters