From b2f6de7b58f81a4894ba26d87865a15e6115a1c2 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 21 Oct 2024 04:01:49 +1100 Subject: [PATCH] zdb: show bp in uberblock dump Just another useful nugget of info in times of strife. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16667 --- cmd/zdb/zdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 16c702580..42b82c082 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -4266,6 +4266,10 @@ dump_uberblock(uberblock_t *ub, const char *header, const char *footer) (void) printf("\ttimestamp = %llu UTC = %s", (u_longlong_t)ub->ub_timestamp, ctime(×tamp)); + char blkbuf[BP_SPRINTF_LEN]; + snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp); + (void) printf("\tbp = %s\n", blkbuf); + (void) printf("\tmmp_magic = %016llx\n", (u_longlong_t)ub->ub_mmp_magic); if (MMP_VALID(ub)) {