]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: dynamic DMA pool entry size
authorIgor Konopko <igor.j.konopko@intel.com>
Tue, 11 Dec 2018 19:16:24 +0000 (20:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Dec 2018 19:22:35 +0000 (12:22 -0700)
commit7650be1f52c41d771e4177e3c3d73cc5b4175148
treebf902aa63b71543db101677c5bfef73b7d757fee
parentd0c06cca5c5497f46626207d0c2e41c0f2397cc2
lightnvm: dynamic DMA pool entry size

Currently lightnvm and pblk uses single DMA pool, for which the entry
size always is equal to PAGE_SIZE. The contents of each entry allocated
from the DMA pool consists of a PPA list (8bytes * 64), leaving
56bytes * 64 space for metadata. Since the metadata field can be bigger,
such as 128 bytes, the static size does not cover this use-case.

This patch adds support for I/O metadata above 56 bytes by changing DMA
pool size based on device meta size and allows pblk to use OOB metadata
>=16B.

Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/core.c
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-init.c
drivers/lightnvm/pblk-recovery.c
drivers/lightnvm/pblk.h
drivers/nvme/host/lightnvm.c
include/linux/lightnvm.h