Hans Holmberg d68a934404 lightnvm: introduce nvm_rq_to_ppa_list
There is a number of places in the lightnvm subsystem where the user
iterates over the ppa list. Before iterating, the user must know if it
is a single or multiple LBAs due to vector commands using either the
nvm_rq ->ppa_addr or ->ppa_list fields on command submission, which
leads to open-coding the if/else statement.

Instead of having multiple if/else's, move it into a function that can
be called by its users.

A nice side effect of this cleanup is that this patch fixes up a
bunch of cases where we don't consider the single-ppa case in pblk.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-10-09 08:25:07 -06:00
..
2018-08-14 23:49:13 +02:00
2018-08-25 14:12:36 -07:00
2018-08-20 15:38:44 -07:00
2018-09-18 19:55:01 -07:00
2018-08-23 15:34:48 -07:00
2018-08-15 22:06:26 -07:00
2018-09-17 18:59:21 +02:00
2018-09-27 17:34:59 -06:00
2018-08-23 15:44:58 -07:00
2018-10-01 08:58:57 -06:00