lightnvm: pblk: refactor emeta consistency check
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Fri, 5 Jan 2018 13:16:08 +0000 (14:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 15:50:12 +0000 (08:50 -0700)
commit06bc072b3fb1d08898b96118ab428ea33a8da0a6
treea5ddfad7ac8585d490d60c8983b56ddadaac73fc
parentd6d3ec2a3be37ca5309013b46ede37b2aa09ced1
lightnvm: pblk: refactor emeta consistency check

Currently pblk_recov_get_lba list does two separate things:
it checks the consistency of the emeta and extracts the lba list.

This patch separates the consistency check to make the code easier
to read and to prepare for version checks of the line emeta
persistent data format version.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
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>
drivers/lightnvm/pblk-gc.c
drivers/lightnvm/pblk-recovery.c
drivers/lightnvm/pblk.h