lightnvm: rename ->nr_pages to ->nr_sects
The struct rrpc->nr_pages can easily be interpreted as the number of flash pages allocated to rrpc, while it is the nr_sects. Make sure that this is reflected from the variable name. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
6adb03de40
commit
4ece44af73
@@ -104,7 +104,7 @@ struct rrpc {
|
||||
struct rrpc_lun *luns;
|
||||
|
||||
/* calculated values */
|
||||
unsigned long long nr_pages;
|
||||
unsigned long long nr_sects;
|
||||
unsigned long total_blocks;
|
||||
|
||||
/* Write strategy variables. Move these into each for structure for each
|
||||
@@ -205,7 +205,7 @@ static inline int rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr,
|
||||
unsigned pages,
|
||||
struct rrpc_inflight_rq *r)
|
||||
{
|
||||
BUG_ON((laddr + pages) > rrpc->nr_pages);
|
||||
BUG_ON((laddr + pages) > rrpc->nr_sects);
|
||||
|
||||
return __rrpc_lock_laddr(rrpc, laddr, pages, r);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ static inline void rrpc_unlock_rq(struct rrpc *rrpc, struct nvm_rq *rqd)
|
||||
struct rrpc_inflight_rq *r = rrpc_get_inflight_rq(rqd);
|
||||
uint8_t pages = rqd->nr_pages;
|
||||
|
||||
BUG_ON((r->l_start + pages) > rrpc->nr_pages);
|
||||
BUG_ON((r->l_start + pages) > rrpc->nr_sects);
|
||||
|
||||
rrpc_unlock_laddr(rrpc, r);
|
||||
}
|
||||
|
Reference in New Issue
Block a user