]> git.itanic.dy.fi Git - linux-stable/commitdiff
lightnvm: pblk: initialize debug stat counter
authorJavier González <javier@cnexlabs.com>
Fri, 13 Oct 2017 12:46:01 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:37 +0000 (10:10 +0100)
[ 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/lightnvm/pblk-init.c

index 8ccfb95a72ff343c9603b6498fe008e21e19a4d3..39de6121f46ea2af081520b26b30b35bafe4716e 100644 (file)
@@ -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);