lightnvm: cleanup nvm transformation functions
authorMatias Bjørling <matias@cnexlabs.com>
Tue, 31 Jan 2017 12:17:14 +0000 (13:17 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 31 Jan 2017 15:32:13 +0000 (08:32 -0700)
commitdab8ee9e8a30620a5b5f22d6c0b3749217093803
treed7379e44ddf70434594a56cd1320c813d463050a
parent61a561d8d7d1e1cac46618d01aa3298eb447eece
lightnvm: cleanup nvm transformation functions

Going from target specific ppa addresses to device was accomplished by
first converting target to generic ppa addresses and generic to device
addresses. The conversion was either open-coded or used the built-in
nvm_trans_* and nvm_map_* functions for conversion. Simplify the
interface and cleanup the calls to provide clean functions that now
either take a list of ppas or a nvm_rq, and is exposed through:

 void nvm_ppa_* - target to/from device with a list of PPAs,
 void nvm_rq_* - target to/from device with a nvm_rq.

Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c
include/linux/lightnvm.h