From: Javier González javier@cnexlabs.com
[ Upstream commit a1121176ff757e3c073490a69608ea0b18a00ec1 ]
Initialize the stat counter for garbage collected reads.
Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González javier@cnexlabs.com Signed-off-by: Matias Bjørling m@bjorling.me Signed-off-by: Jens Axboe axboe@kernel.dk Signed-off-by: Sasha Levin alexander.levin@verizon.com --- drivers/lightnvm/pblk-init.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 8ccfb95a72ff..39de6121f46e 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -945,6 +945,7 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk, atomic_long_set(&pblk->recov_writes, 0); atomic_long_set(&pblk->recov_writes, 0); atomic_long_set(&pblk->recov_gc_writes, 0); + atomic_long_set(&pblk->recov_gc_reads, 0); #endif
atomic_long_set(&pblk->read_failed, 0);