linux/drivers/lightnvm
Wenwei Tao 651b328d97 lightnvm: fix locking and mempool in rrpc_lun_gc
[ Upstream commit b262924be0 ]

This patch fix two issues in rrpc_lun_gc

1. prio_list is protected by rrpc_lun's lock not nvm_lun's, so
acquire rlun's lock instead of lun's before operate on the list.

2. we delete block from prio_list before allocating gcb, but gcb
allocation may fail, we end without putting it back to the list,
this makes the block won't get reclaimed in the future. To solve
this issue, delete block after gcb allocation.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-15 08:27:40 +02:00
..
core.c lightnvm: fix media mgr registration 2015-12-07 09:14:19 -07:00
gennvm.c lightnvm: fix incorrect nr_free_blocks stat 2016-09-15 08:27:40 +02:00
gennvm.h lightnvm: update bad block table format 2015-11-16 15:20:25 -07:00
Kconfig lightnvm: do not compile in debugging by default 2015-12-07 09:14:20 -07:00
Makefile rrpc: Round-robin sector target with cost-based gc 2015-10-29 16:21:42 +09:00
rrpc.c lightnvm: fix locking and mempool in rrpc_lun_gc 2016-09-15 08:27:40 +02:00
rrpc.h lightnvm: refactor phys addrs type to u64 2015-11-03 09:53:24 -07:00