From fae72b3464e0600240c56b118c6b4d68aa5e10ec Mon Sep 17 00:00:00 2001 From: Mike Gerdts Date: Mon, 20 Dec 2021 20:42:45 +0000 Subject: [PATCH] blob: add logging for blobstore recovery When a blobstore is not clean, a message is logged at the notice level. As other progress is made, messages are logged at the info level. Signed-off-by: Mike Gerdts Change-Id: Icfbe375faaa95d5be53864f7eb8a73e1ae7c5d01 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11251 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/blob/blobstore.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 690e40601..97969a097 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -3904,6 +3904,7 @@ bs_load_replay_md_parse_page(struct spdk_bs_load_ctx *ctx, struct spdk_blob_md_p * in the used cluster map. */ if (cluster_idx != 0) { + SPDK_NOTICELOG("Recover: cluster %" PRIu32 "\n", cluster_idx + j); spdk_bit_array_set(ctx->used_clusters, cluster_idx + j); if (bs->num_free_clusters == 0) { return -ENOSPC; @@ -4240,6 +4241,7 @@ bs_load_replay_md_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno) if (page->sequence_num == 0 || ctx->in_page_chain == true) { bs_claim_md_page(ctx->bs, page_num); if (page->sequence_num == 0) { + SPDK_NOTICELOG("Recover: blob %" PRIu32 "\n", page_num); spdk_bit_array_set(ctx->bs->used_blobids, page_num); } if (bs_load_replay_md_parse_page(ctx, page)) { @@ -4292,6 +4294,7 @@ bs_recover(struct spdk_bs_load_ctx *ctx) { int rc; + SPDK_NOTICELOG("Performing recovery on blobstore\n"); rc = spdk_bit_array_resize(&ctx->bs->used_md_pages, ctx->super->md_len); if (rc < 0) { bs_load_ctx_fail(ctx, -ENOMEM);