lightnvm: pblk: improve line helpers
The current helper to obtain a line from a ppa returns the line id, which requires its users to explicitly retrieve the pointer to the line with the id. Make 2 different helpers: one returning the line id and one returning the line directly. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
2cf99bbd10
commit
cb21665c8d
@@ -252,9 +252,9 @@ static void pblk_end_partial_read(struct nvm_rq *rqd)
|
||||
i = 0;
|
||||
hole = find_first_zero_bit(read_bitmap, nr_secs);
|
||||
do {
|
||||
int line_id = pblk_ppa_to_line(rqd->ppa_list[i]);
|
||||
struct pblk_line *line = &pblk->lines[line_id];
|
||||
struct pblk_line *line;
|
||||
|
||||
line = pblk_ppa_to_line(pblk, rqd->ppa_list[i]);
|
||||
kref_put(&line->ref, pblk_line_put);
|
||||
|
||||
meta_list[hole].lba = lba_list_media[i];
|
||||
|
Reference in New Issue
Block a user