From 5eb194c2159499200661991a802d531857395a66 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sun, 27 Apr 2025 15:08:09 -0500 Subject: [PATCH] scripts: dbgbmap[d3].py: Limited block conflicts to mismatched types Block conflict detection was originally implemented with non-dags in mind. But now that dags are allowed, we shouldn't treat them as errors! Instead, we only report blocks as conflicts if multiple references have mismatching types. This should still be very useful for debugging the upcoming bmap work. --- scripts/dbgbmap.py | 7 ++++++- scripts/dbgbmapd3.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/dbgbmap.py b/scripts/dbgbmap.py index 1d05810c..b5a104b2 100755 --- a/scripts/dbgbmap.py +++ b/scripts/dbgbmap.py @@ -4603,7 +4603,12 @@ def main_(ring, disk, mroots=None, *, # check for some common issues # block conflict? - if b in bmap and bmap[b].type != 'unused': + # + # note we can't compare more than types due to different + # trunks, slicing, etc + if (b in bmap + and bmap[b].type != 'unused' + and bmap[b].type != type): if bmap[b].type == 'conflict': bmap[b].value.append(child) else: diff --git a/scripts/dbgbmapd3.py b/scripts/dbgbmapd3.py index 88dd42cc..7a597bde 100755 --- a/scripts/dbgbmapd3.py +++ b/scripts/dbgbmapd3.py @@ -4322,7 +4322,12 @@ def main(disk, output, mroots=None, *, # check for some common issues # block conflict? - if b in bmap and bmap[b].type != 'unused': + # + # note we can't compare more than types due to different + # trunks, slicing, etc + if (b in bmap + and bmap[b].type != 'unused' + and bmap[b].type != type): if bmap[b].type == 'conflict': bmap[b].value.append(child) else: