summaryrefslogtreecommitdiffstats
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-05-06 20:03:04 +0200
committerJens Axboe <axboe@fb.com>2016-05-06 20:51:10 +0200
commit5136061ce705210b501ed9ecd673a67b74ebe017 (patch)
tree9d53516525698e1a8576cabb324bbce2c78b8f8f /init/do_mounts_rd.c
parentlightnvm: refactor dev->online_target to global nvm_targets (diff)
downloadlinux-5136061ce705210b501ed9ecd673a67b74ebe017.tar.xz
linux-5136061ce705210b501ed9ecd673a67b74ebe017.zip
lightnvm: introduce nvm_for_each_lun_ppa() macro
Users that wish to iterate all luns on a device. Must create a struct ppa_addr and separate iterators for channels and luns. To set the iterators, two loops are required, one to iterate channels, and another to iterate luns. This leads to decrease in readability. Introduce nvm_for_each_lun_ppa, which implements the nested loop and sets ppa, channel, and lun variable for each loop body, eliminating the boilerplate code. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'init/do_mounts_rd.c')
0 files changed, 0 insertions, 0 deletions