lib/ftl: decreased the size of the metadata buffer
The metadata buffer was allocated in multiples of blocks (as well as aligned to a block). It's not necessary and is a waste of space. Change-Id: Icb13c664e82b23ea09bec16fa3c18fa98b722d57 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455922 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
e1dbe1c84c
commit
c92720211d
@ -150,8 +150,7 @@ ftl_rwb_batch_init(struct ftl_rwb *rwb, struct ftl_rwb_batch *batch, unsigned in
|
||||
{
|
||||
size_t md_size, i;
|
||||
|
||||
md_size = spdk_divide_round_up(rwb->md_size * rwb->xfer_size, FTL_BLOCK_SIZE) *
|
||||
FTL_BLOCK_SIZE;
|
||||
md_size = rwb->md_size * rwb->xfer_size;
|
||||
batch->rwb = rwb;
|
||||
batch->pos = pos;
|
||||
|
||||
@ -169,7 +168,7 @@ ftl_rwb_batch_init(struct ftl_rwb *rwb, struct ftl_rwb_batch *batch, unsigned in
|
||||
}
|
||||
|
||||
if (md_size > 0) {
|
||||
batch->md_buffer = spdk_dma_zmalloc(md_size, FTL_BLOCK_SIZE, NULL);
|
||||
batch->md_buffer = spdk_dma_zmalloc(md_size, 0, NULL);
|
||||
if (!batch->md_buffer) {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user