]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: fix write amplificiation calculation
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Tue, 9 Oct 2018 11:11:50 +0000 (13:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:07 +0000 (08:25 -0600)
commit53a50f58ca9a1c03f92be0dac27bd0b813258436
treeb97d875ef5463cc92466dca93681cca2798edc0c
parentc5bf77b0c00db6932b68df85d0e2135ee768c1b2
lightnvm: pblk: fix write amplificiation calculation

When the user data counter exceeds 32 bits, the write amplification
calculation does not provide the right value. Fix this by using
div64_u64 in stead of div64.

Fixes: 176a8e64dfd1 ("lightnvm: pblk: export write amplification counters to sysfs")
Signed-off-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-sysfs.c