From 527396e5cb1fecf491c0311c364b1b3fad69c3e6 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Wed, 12 Feb 2025 22:00:21 -0500 Subject: [PATCH] extent scan: integrate seeker debug output stream Send both tree_search ioctl and `seek_backward` debug logs to the same output stream, but only write that stream to the debug log if there is an exception. The feature remains disabled at compile time. Signed-off-by: Zygo Blaxell --- src/bees-roots.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 499dfcb..6c5d787 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -5,6 +5,7 @@ #include "crucible/cleanup.h" #include "crucible/ntoa.h" #include "crucible/openat2.h" +#include "crucible/seeker.h" #include "crucible/string.h" #include "crucible/table.h" #include "crucible/task.h" @@ -940,6 +941,7 @@ BeesScanModeExtent::SizeTier::find_next_extent() #endif if (debug_oss) { BtrfsIoctlSearchKey::s_debug_ostream = debug_oss; + tl_seeker_debug_str = debug_oss; } // Write out the stats no matter how we exit @@ -973,6 +975,7 @@ BeesScanModeExtent::SizeTier::find_next_extent() } } BtrfsIoctlSearchKey::s_debug_ostream.reset(); + tl_seeker_debug_str.reset(); }); #define MNE_DEBUG(x) do { \