From c8d1703196d8b699f811d5240163bd9ca30780c6 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Nov 2016 15:35:16 -0700 Subject: [PATCH] Add blkno and level to bad btree printk Add the blkno and level to the output for a btree block that fails verification. Signed-off-by: Zach Brown --- kmod/src/btree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kmod/src/btree.c b/kmod/src/btree.c index ae3d4714..cf45346e 100644 --- a/kmod/src/btree.c +++ b/kmod/src/btree.c @@ -959,8 +959,9 @@ static int verify_btree_block(struct scoutfs_btree_block *bt, int level, bad = 0; out: if (bad) { - printk("bt %p small "CKF" large "CKF" end %u reclaim %u nr %u (max %lu after %u bytes %u)\n", - bt, CKA(small), CKA(large), le16_to_cpu(bt->free_end), + printk("bt %p blkno %llu level %d small "CKF" large "CKF" end %u reclaim %u nr %u (max %lu after %u bytes %u)\n", + bt, le64_to_cpu(bt->hdr.blkno), level, + CKA(small), CKA(large), le16_to_cpu(bt->free_end), le16_to_cpu(bt->free_reclaim), bt->nr_items, SCOUTFS_BTREE_MAX_ITEMS, after_offs, bytes); for (i = 0; i < nr; i++) {