Commit e739a50f authored by Jim Harris's avatar Jim Harris Committed by Daniel Verkamp
Browse files

blob: initialize super_blob and bstype during load



A recent patch did some refactoring on how the superblock is
written out - it introduced a bug where on load we would
write out INVALID for super_blob id and a null bstype when
clearing the clean bit.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I1d6256e35030645b3e8fda83bfe0f74aeb635733

Reviewed-on: https://review.gerrithub.io/383129


Reviewed-by: default avatarMaciej Szwed <maciej.szwed@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent f97c8b31
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1728,6 +1728,8 @@ _spdk_bs_load_super_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
		return;
	}

	ctx->bs->super_blob = ctx->super->super_blob;
	memcpy(&ctx->bs->bstype, &ctx->super->bstype, sizeof(ctx->super->bstype));
	ctx->super->clean = 0;
	_spdk_bs_write_super(seq, ctx->bs, ctx->super, _spdk_bs_load_write_super_cpl, ctx);
}