Commit 894175de authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I2174dda58d0ae4d98359a914e5975f8be3e45a89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5550


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent e8e9a9aa
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {