lib/blob: resize open_blobids on bs load
open_blobids holds bit array of currently open blobs,
this is a way for quicker determination than iterating
over all blobs. See patch introducing it:
(30ee8137
)blob: Add a bitmask for quickly checking which blobs are open
That patch added resizes of this bit array to bs init
and bs recovery path (not shut down cleanly).
But that patch skipped over bs load from a clean shutdown.
This resulted in blob open having multiple blob pointers that
target the same blob id.
Fixes #1937
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3c42a63d168d1f5b013b449f010c5b207936045b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7998
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>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
parent
e65310624b
commit
42ad9d0379
@ -4366,6 +4366,12 @@ bs_load_super_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
}
|
||||
ctx->bs->md_start = ctx->super->md_start;
|
||||
ctx->bs->md_len = ctx->super->md_len;
|
||||
rc = spdk_bit_array_resize(&ctx->bs->open_blobids, ctx->bs->md_len);
|
||||
if (rc < 0) {
|
||||
bs_load_ctx_fail(ctx, -ENOMEM);
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->bs->total_data_clusters = ctx->bs->total_clusters - spdk_divide_round_up(
|
||||
ctx->bs->md_start + ctx->bs->md_len, ctx->bs->pages_per_cluster);
|
||||
ctx->bs->super_blob = ctx->super->super_blob;
|
||||
|
Loading…
Reference in New Issue
Block a user