reduce: mark correct number of backing pages for md
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iebdfe79dd8e4240f2333db6a758193e048f9b5f2 Reviewed-on: https://review.gerrithub.io/c/440574 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
e28605f47a
commit
1fa0283f31
@ -370,6 +370,7 @@ static int
|
|||||||
_allocate_bit_arrays(struct spdk_reduce_vol *vol)
|
_allocate_bit_arrays(struct spdk_reduce_vol *vol)
|
||||||
{
|
{
|
||||||
uint64_t total_chunks, total_backing_io_units;
|
uint64_t total_chunks, total_backing_io_units;
|
||||||
|
uint32_t i, num_metadata_io_units;
|
||||||
|
|
||||||
total_chunks = _get_total_chunks(vol->params.vol_size, vol->params.chunk_size);
|
total_chunks = _get_total_chunks(vol->params.vol_size, vol->params.chunk_size);
|
||||||
vol->allocated_chunk_maps = spdk_bit_array_create(total_chunks);
|
vol->allocated_chunk_maps = spdk_bit_array_create(total_chunks);
|
||||||
@ -381,8 +382,11 @@ _allocate_bit_arrays(struct spdk_reduce_vol *vol)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set backing io unit bits associated with metadata. */
|
/* Set backing io unit bits associated with metadata. */
|
||||||
spdk_bit_array_set(vol->allocated_backing_io_units, 0);
|
num_metadata_io_units = (sizeof(*vol->backing_super) + REDUCE_PATH_MAX) /
|
||||||
spdk_bit_array_set(vol->allocated_backing_io_units, 1);
|
vol->backing_dev->blocklen;
|
||||||
|
for (i = 0; i < num_metadata_io_units; i++) {
|
||||||
|
spdk_bit_array_set(vol->allocated_backing_io_units, i);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user