09b3d24036
Validating btree nodes during lfsr_btree_lookup was useful as a proof-of-concept, but it's not really needed if we validate btree nodes during mtree traversal. mtree traversal provides the first reads into the filesystem. It's how we find the real mroot, and (in theory at the moment) it provides the core operation for error detection in correction. With this in mind, implementing btree node validation in mtree traversal makes a lot of sense, with lfsr_btree_lookup leveraging an assumed successful validation for faster/smaller btree walks. Note that btree node validation during traversal is still optional. We really don't want to pay this cost during block allocation for example. --- It may look concerning that there's no related validation in btree traversal layer itself. It turns out that a quirk of btree traversal returning inner btree nodes on first visit, before actually traversing the btree node, is that it's safe for us to validte the btree node in only the mtree traversal layer. As long as we don't continue traversing on finding a corrupted btree, the btree traversal layer will never traverse an unvalidated btree node. This keeps all the validation logic in the same place, mtree traversal. I don't know if this will stay this way if/when more error correction features are added, but it's convenient in the meantime.