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 <tomasz.zawadzki@intel.com>
Change-Id: I6d5dc2ae965f8f9a388cd1c8e186145f8ca91db4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-04-02 06:34:07 -04:00
parent 955c58fa68
commit c7325e3fad

View File

@ -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) { _spdk_bs_page_to_blobid(ctx->cur_page) != page->id) {
return false; return false;
} }
assert(_spdk_bs_load_cur_extent_page_valid(page) == false);
return true; return true;
} }