lib/blob: fix a potential wrong release of md page
blob_insert_cluster_msg() will release the already claimed md page(intended for extent page) if the corresponding extent page is found to be allocated. But later blob_insert_extent() may fails, and this cause blob_insert_cluster_cpl() to release the same md page again, this could be wrong if this specific md page is clamied by others, thus cause data corruption. So, put it to zero after released in blob_insert_cluster_msg(). Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com> Change-Id: I46eba79b24b1950318002dcb27cb51b01ca566ec Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3152 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
16364fdc14
commit
7137bde120
@ -6878,6 +6878,7 @@ blob_insert_cluster_msg(void *arg)
|
||||
if (ctx->extent_page != 0) {
|
||||
assert(spdk_bit_array_get(ctx->blob->bs->used_md_pages, ctx->extent_page) == true);
|
||||
bs_release_md_page(ctx->blob->bs, ctx->extent_page);
|
||||
ctx->extent_page = 0;
|
||||
}
|
||||
/* Extent page already allocated.
|
||||
* Every cluster allocation, requires just an update of single extent page. */
|
||||
|
Loading…
Reference in New Issue
Block a user