]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: use internal allocation for chunk log page
authorJavier González <javier@javigon.com>
Tue, 9 Oct 2018 11:12:01 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:07 +0000 (08:25 -0600)
commit147885d1c77f3ca1b082072fe73bc50f8f15e557
treeb5f64b5f0b285e7a391b8defcf826395d6ba1fbb
parentd971a257c754bc7b5f5b02ec44a92bf45562b3aa
lightnvm: use internal allocation for chunk log page

The lightnvm subsystem provides helpers to retrieve chunk metadata,
where the target needs to provide a buffer to store the metadata. An
implicit assumption is that this buffer is contiguous and can be used to
retrieve the data from the device. If the device exposes too many
chunks, then kmalloc might fail, thus failing instance creation.

This patch removes this assumption by implementing an internal buffer in
the lightnvm subsystem to retrieve chunk metadata. Targets can then
use virtual memory allocations. Since this is a target API change, adapt
pblk accordingly.

Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-init.c
drivers/nvme/host/lightnvm.c