diff options
author | Matias Bjørling <m@bjorling.me> | 2016-02-20 08:52:41 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-03 14:46:35 -0700 |
commit | 4ece44af733ff63a7cd12aaa8c85afb6d9fdc664 (patch) | |
tree | af1736335c8f7abfaebaa3dba63cc5bee77cbd20 /drivers/lightnvm/rrpc.h | |
parent | 6adb03de406e8c92579c2e4b11640841fa908277 (diff) | |
download | linux-4ece44af733ff63a7cd12aaa8c85afb6d9fdc664.tar.bz2 |
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>
Diffstat (limited to 'drivers/lightnvm/rrpc.h')
-rw-r--r-- | drivers/lightnvm/rrpc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index ef13ac7700c8..dfca5c4d26bb 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -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); } |