blob: allow _spdk_bs_recover to operate as a sequence completion
This prepares for a future change where we need to use the recovery path when loading pre-v3 on-disk formats, since the older disk formats do not save a blobid mask. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ia94d56450202f81373c3de94237eca2dfd96526c Reviewed-on: https://review.gerrithub.io/391694 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
ac1aa04ba7
commit
d8022e1357
@ -1943,11 +1943,16 @@ _spdk_bs_load_replay_md(spdk_bs_sequence_t *seq, void *cb_arg)
|
||||
}
|
||||
|
||||
static void
|
||||
_spdk_bs_recover(spdk_bs_sequence_t *seq, void *cb_arg)
|
||||
_spdk_bs_recover(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_bs_load_ctx *ctx = cb_arg;
|
||||
int rc;
|
||||
|
||||
if (bserrno != 0) {
|
||||
_spdk_bs_load_ctx_fail(seq, ctx, -EIO);
|
||||
return;
|
||||
}
|
||||
|
||||
rc = spdk_bit_array_resize(&ctx->bs->used_md_pages, ctx->super->md_len);
|
||||
if (rc < 0) {
|
||||
_spdk_bs_load_ctx_fail(seq, ctx, -ENOMEM);
|
||||
@ -2016,7 +2021,7 @@ _spdk_bs_load_super_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
ctx->super->clean = 0;
|
||||
_spdk_bs_write_super(seq, ctx->bs, ctx->super, _spdk_bs_load_write_super_cpl, ctx);
|
||||
} else {
|
||||
_spdk_bs_recover(seq, ctx);
|
||||
_spdk_bs_recover(seq, ctx, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user