]> git.hungrycats.org Git - bees/commitdiff
extent scan: integrate seeker debug output stream
authorZygo Blaxell <bees@furryterror.org>
Thu, 13 Feb 2025 03:00:21 +0000 (22:00 -0500)
committerZygo Blaxell <bees@furryterror.org>
Thu, 19 Jun 2025 01:17:48 +0000 (21:17 -0400)
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 <bees@furryterror.org>
src/bees-roots.cc

index 499dfcbe6d974f03ca6cd30dffd01eef34149ec0..6c5d78762db02e7aac75f959687f097c3d610de4 100644 (file)
@@ -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 { \