From 6b82e9fb259733c549614812ab170ab99cb302ee Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sun, 19 Nov 2023 15:41:09 -0600 Subject: [PATCH] Fixed dbg scripts to allow explicit trunks without checksums Note this is intentionally different from how lfsr_rbyd_fetch behaves in lfs.c. We only call lfsr_rbyd_fetch when we need validated checksums, otherwise we just don't fetch. The dbg scripts, on the other hand, always go through fetch, but it is useful to be able to inspect the state of incomplete trunks when debugging. This use to be how the dbg scripts behaved, but they broke because of some recent script work. --- scripts/dbgbmap.py | 3 +++ scripts/dbgbtree.py | 3 +++ scripts/dbglfs.py | 3 +++ scripts/dbgmtree.py | 3 +++ scripts/dbgrbyd.py | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/scripts/dbgbmap.py b/scripts/dbgbmap.py index 1b5dd12c..57c8dc60 100755 --- a/scripts/dbgbmap.py +++ b/scripts/dbgbmap.py @@ -700,6 +700,9 @@ class Rbyd: # keep track of eoff for best matching trunk if trunk and j_ + size > trunk: trunkeoff = j_ + size + cksum = cksum_ + trunk_ = trunk__ + weight = weight_ if not tag & TAG_ALT: j_ += size diff --git a/scripts/dbgbtree.py b/scripts/dbgbtree.py index 366833c6..3af6a575 100755 --- a/scripts/dbgbtree.py +++ b/scripts/dbgbtree.py @@ -371,6 +371,9 @@ class Rbyd: # keep track of eoff for best matching trunk if trunk and j_ + size > trunk: trunkeoff = j_ + size + cksum = cksum_ + trunk_ = trunk__ + weight = weight_ if not tag & TAG_ALT: j_ += size diff --git a/scripts/dbglfs.py b/scripts/dbglfs.py index c33700e0..63bc77fa 100755 --- a/scripts/dbglfs.py +++ b/scripts/dbglfs.py @@ -400,6 +400,9 @@ class Rbyd: # keep track of eoff for best matching trunk if trunk and j_ + size > trunk: trunkeoff = j_ + size + cksum = cksum_ + trunk_ = trunk__ + weight = weight_ if not tag & TAG_ALT: j_ += size diff --git a/scripts/dbgmtree.py b/scripts/dbgmtree.py index 3166d87a..d2ba6cfe 100755 --- a/scripts/dbgmtree.py +++ b/scripts/dbgmtree.py @@ -386,6 +386,9 @@ class Rbyd: # keep track of eoff for best matching trunk if trunk and j_ + size > trunk: trunkeoff = j_ + size + cksum = cksum_ + trunk_ = trunk__ + weight = weight_ if not tag & TAG_ALT: j_ += size diff --git a/scripts/dbgrbyd.py b/scripts/dbgrbyd.py index 03e5bc8c..ab501619 100755 --- a/scripts/dbgrbyd.py +++ b/scripts/dbgrbyd.py @@ -981,6 +981,10 @@ def main(disk, blocks=None, *, # keep track of eoff for best matching trunk if trunk and j_ + size > trunk: trunkeoff = j_ + size + eoff = trunkeoff + cksum = cksum_ + trunk_ = trunk__ + weight = weight_ if not tag & TAG_ALT: j_ += size