OSDN Git Service

lightnvm: pblk: gracefully handle GC vmalloc fail
authorIgor Konopko <igor.j.konopko@intel.com>
Sat, 4 May 2019 18:37:50 +0000 (20:37 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 May 2019 16:19:17 +0000 (10:19 -0600)
commitd378561b8ec7b46402de2b649cd44ee835d2e579
treefc07fb11559b7bbac4d9585fd86bc8de231e6950
parent605bcef7f7d733aa732b6cc06201bd95a4288f72
lightnvm: pblk: gracefully handle GC vmalloc fail

Currently when we fail on rq data allocation in gc, it skips moving
active data and moves line straigt to its free state. Losing user
data in the process.

Move the data allocation to an earlier phase of GC, where we can still
fail gracefully by moving line back to the closed state.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Reviewed-by: Javier González <javier@javigon.com>
Reviewed-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-gc.c