From 894175dece126dd32dbfe5016d2b68b05bad412a Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 11 Dec 2020 15:01:10 +0000 Subject: [PATCH] blob: add more detail to bs_load_use_pages_cpl assert We have an intermittent CI failure that hits this assert. Adding some more detail to help analyze and root cause. Signed-off-by: Jim Harris Change-Id: I2174dda58d0ae4d98359a914e5975f8be3e45a89 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5550 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki --- lib/blob/blobstore.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index cc0ecea16..c2494b1ed 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -3692,7 +3692,12 @@ bs_load_used_pages_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno) assert(ctx->mask->length <= (ctx->super->used_page_mask_len * SPDK_BS_PAGE_SIZE * 8)); /* The length of the mask must be exactly equal to the size (in pages) of the metadata region */ - assert(ctx->mask->length == ctx->super->md_len); + if (ctx->mask->length != ctx->super->md_len) { + SPDK_ERRLOG("mismatched md_len in used_pages mask: " + "mask->length=%" PRIu32 " super->md_len=%" PRIu32 "\n", + ctx->mask->length, ctx->super->md_len); + assert(false); + } rc = spdk_bit_array_resize(&ctx->bs->used_md_pages, ctx->mask->length); if (rc < 0) {