]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: gc all lines in the pipeline before exit
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Fri, 13 Oct 2017 12:46:41 +0000 (14:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commit65e7970ab008acb0706a204187a36d8654727dca
tree6f1dd1ed74a8f33191961cf22bbec2aa5cc1b1e5
parent2449b9cc74c183d1be720925132bc7e0436a75cb
lightnvm: pblk: gc all lines in the pipeline before exit

Finish garbage collect of the lines that are in the gc pipeline
before exiting. Ensure that all lines already in in the pipeline
goes through, from read to write.

Do this by keeping track of how many lines are in the pipeline
and waiting for that number to reach zero before exiting the gc
reader task.

Since we're adding a new gc line counter, change the name of
inflight_gc to read_inflight_gc to make the distinction clear.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-gc.c
drivers/lightnvm/pblk-sysfs.c
drivers/lightnvm/pblk.h