lightnvm: pblk: fix incorrect min_write_pgs
authorMatias Bjørling <mb@lightnvm.io>
Tue, 9 Oct 2018 11:11:38 +0000 (13:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:50 +0000 (08:20 +0100)
commitc7e49f73152f246925285814a8b7dee5abbe944f
tree599754c310478687b0c205a428cc1902ebc95cec
parentced6b5dae1dcfc451926890a91dafcd958464ce6
lightnvm: pblk: fix incorrect min_write_pgs

[ Upstream commit 8bbd45d02a118cbefdf4e1a6274bd965a6aa3c59 ]

The calculation of pblk->min_write_pgs should only use the optimal
write size attribute provided by the drive, it does not correlate to
the memory page size of the system, which can be smaller or larger
than the LBA size reported.

Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/lightnvm/pblk-init.c