t: Adopted simpler blanket-mdir traversal clobbering scheme

Now, lfsr_mdir_commit just clobbers all traversals associated with the
current mdir, irrespective of mid.

This makes our traversal clobbering model quite a bit simpler, drops any
mess related to bshrub staging, and allows lfsr_mdir_commit to handle
most of the clobbering logic with the exception of opened file handles.

This also fits mtree/mroot clobbering a bit better, with mtree
clobbering behaving the same as a file btree in the mroot.

The downside is we will miss more blocks during clobbered traversals,
but clobbered traversals are best effort anyways. The saved code cost
and simpler/more robust clobbering model are probably worth it.

Traversal clobbering is already complicated enough...

Code/stack changes:

           code          stack
  before: 34716           2648
  after:  34740 (+0.1%)   2624 (-0.9%)
This commit is contained in:
Christopher Haster
2024-06-18 11:41:10 -05:00
parent 4cd1f84a89
commit a8a214ec0b
3 changed files with 155 additions and 155 deletions
-1
View File
@@ -610,7 +610,6 @@ typedef struct lfsr_mtraversal {
// so only store the relevant bits, is this a hack? yes
const struct lfs_file_config *cfg;
lfsr_bshrub_t bshrub;
lfsr_bshrub_t bshrub_;
// opened file state, we use an indirect pointer here so we
// always point to data associated with the current mid