1
0
mirror of https://github.com/Zygo/bees.git synced 2025-07-01 16:22:27 +02:00

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 <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell
2025-02-12 22:00:21 -05:00
parent bc7c35aa2d
commit 527396e5cb

View 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 { \