From c905bab4b610311b1ddb58f44f7557222dcee9a7 Mon Sep 17 00:00:00 2001 From: Alex Markuze Date: Tue, 18 Mar 2025 19:46:35 +0000 Subject: [PATCH] verbose debug --- net/ceph/ceph_san_logger.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/ceph/ceph_san_logger.c b/net/ceph/ceph_san_logger.c index 7a5552292af47..faa5642505955 100644 --- a/net/ceph/ceph_san_logger.c +++ b/net/ceph/ceph_san_logger.c @@ -143,8 +143,16 @@ void ceph_san_log(const char *file, const char *func, unsigned int line, const c alloc = cephsan_pagefrag_alloc(&ctx->pf, needed_size); int loop_count = 0; while (!alloc) { - if (loop_count++ >= 8) + if (loop_count++ >= 32) { + pr_err("ceph_san_log: pagefrag stats - head: %u, tail: %u, size: %u, free: %d\n", + ctx->pf.head, ctx->pf.tail, + CEPHSAN_PAGEFRAG_SIZE, + (ctx->pf.tail > ctx->pf.head) ? + ctx->pf.tail - ctx->pf.head : + CEPHSAN_PAGEFRAG_SIZE - (ctx->pf.head - ctx->pf.tail)); + panic("ceph_san_log: failed to allocate entry after 8 retries"); + } entry = cephsan_pagefrag_get_ptr_from_tail(&ctx->pf); BUG_ON(entry->debug_poison != CEPH_SAN_LOG_ENTRY_POISON); BUG_ON(entry->len == 0); -- 2.39.5