Always log mbid=-1 for mroots and inlined mdirs

So mbid=0 now implies the mdir is not inlined.

Downsides:

- A bit more work to calculate
- May lose information due to masking everything when mtree.weight==0
- Risk of confusion when in-lfs.c state doesn't match (mbid=-1 is
  implied by mtree.weight==0)

Upsides:

- Includes more information about the topology of the mtree
- Avoids multiple dbgmbids for the same physical mdir

Also added lfsr_dbgmbid and lfsr_dbgmrid to help make logging
easier/more consistent.

And updated dbg scripts.
This commit is contained in:
Christopher Haster
2025-04-17 01:41:44 -05:00
parent 89356fc697
commit 3ca6670dcd
5 changed files with 56 additions and 51 deletions
+4 -6
View File
@@ -1700,11 +1700,10 @@ class Mtree:
else:
return None
mdir = Mdir(0, self.mroot)
if path:
return mdir, path_
return self.mroot, path_
else:
return mdir
return self.mroot
# mtree? lookup in mtree
else:
@@ -2074,11 +2073,10 @@ class Mtree:
# no mtree? must be inlined in mroot
if self.mtree is None:
mdir = Mdir(0, self.mroot)
if path:
return mdir, path_
return self.mroot, path_
else:
return mdir
return self.mroot
# mtree? find name in mtree
else: