lib/blob: save the sequence much earlier into blob load
The sequence was saved into the load context much later into the loading, instead of right when ctx is allocated. This will come in handy in later patches that refer to sequence earlier (in error paths). Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ibe513dbd919f36874fcde763fc96d46973b60446 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479140 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
ada795302a
commit
3225f86bc2
@ -1024,8 +1024,6 @@ _spdk_blob_load_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
free(ctx);
|
||||
return;
|
||||
}
|
||||
ctx->seq = seq;
|
||||
|
||||
|
||||
if (spdk_blob_is_thin_provisioned(blob)) {
|
||||
rc = _spdk_blob_get_xattr_value(blob, BLOB_SNAPSHOT, &value, &len, true);
|
||||
@ -1083,6 +1081,7 @@ _spdk_blob_load(spdk_bs_sequence_t *seq, struct spdk_blob *blob,
|
||||
ctx->num_pages = 1;
|
||||
ctx->cb_fn = cb_fn;
|
||||
ctx->cb_arg = cb_arg;
|
||||
ctx->seq = seq;
|
||||
|
||||
page_num = _spdk_bs_blobid_to_page(blob->id);
|
||||
lba = _spdk_bs_page_to_lba(blob->bs, bs->md_start + page_num);
|
||||
|
Loading…
x
Reference in New Issue
Block a user