reduce: fix ordering bug
_allocate_bit_arrays() needs vol->backing_dev set which was being done after the call. Change-Id: Ic8c36c98aee94fbd8230273638011b948cd95675 Signed-off-by: paul luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/c/443048 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
b2402ec516
commit
5abe0ec852
@ -502,6 +502,8 @@ spdk_reduce_vol_init(struct spdk_reduce_vol_params *params,
|
||||
vol->backing_lba_per_io_unit = params->backing_io_unit_size / backing_dev->blocklen;
|
||||
memcpy(&vol->params, params, sizeof(*params));
|
||||
|
||||
vol->backing_dev = backing_dev;
|
||||
|
||||
rc = _allocate_bit_arrays(vol);
|
||||
if (rc != 0) {
|
||||
cb_fn(cb_arg, NULL, rc);
|
||||
@ -509,8 +511,6 @@ spdk_reduce_vol_init(struct spdk_reduce_vol_params *params,
|
||||
return;
|
||||
}
|
||||
|
||||
vol->backing_dev = backing_dev;
|
||||
|
||||
memcpy(vol->backing_super->signature, SPDK_REDUCE_SIGNATURE,
|
||||
sizeof(vol->backing_super->signature));
|
||||
memcpy(&vol->backing_super->params, params, sizeof(*params));
|
||||
|
Loading…
Reference in New Issue
Block a user