From c7325e3fad9700c47f27dac56543e6af68685e48 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 2 Apr 2020 06:34:07 -0400 Subject: [PATCH] lib/blob: assert that md_page is not extent page Contidion previous to this should already verify that md page is not an extent page. All extent pages are not part of the chain (sequence_num == 0), and their location (ctx->cur_page) cannot be the root of md chain (page->id). Yet during development it could appen, so adding assert to verify further that the md page is not extent page. Signed-off-by: Tomasz Zawadzki Change-Id: I6d5dc2ae965f8f9a388cd1c8e186145f8ca91db4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1667 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/blob/blobstore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 67e58d6a4..2c2f1ce96 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -3834,6 +3834,8 @@ static bool _spdk_bs_load_cur_md_page_valid(struct spdk_bs_load_ctx *ctx) _spdk_bs_page_to_blobid(ctx->cur_page) != page->id) { return false; } + assert(_spdk_bs_load_cur_extent_page_valid(page) == false); + return true; }