diff options
author | 2018-03-30 00:05:16 +0200 | |
---|---|---|
committer | 2018-03-29 17:29:09 -0600 | |
commit | 7100d50a7e58a6884368001e2b1a32b7169c072c (patch) | |
tree | b29aa03fc3dd1942f0d53e58a693bd1f98274acb /include/linux/lightnvm.h | |
parent | lightnvm: add support for 2.0 address format (diff) | |
download | linux-7100d50a7e58a6884368001e2b1a32b7169c072c.tar.gz linux-7100d50a7e58a6884368001e2b1a32b7169c072c.tar.bz2 linux-7100d50a7e58a6884368001e2b1a32b7169c072c.zip |
lightnvm: make address conversions depend on generic device
On address conversions, use the generic device, instead of the target
device. This allows to use conversions outside of the target's realm.
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>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r-- | include/linux/lightnvm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index f2549b4b8626..f3b273e543c3 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -397,10 +397,10 @@ struct nvm_dev { struct list_head targets; }; -static inline struct ppa_addr generic_to_dev_addr(struct nvm_tgt_dev *tgt_dev, +static inline struct ppa_addr generic_to_dev_addr(struct nvm_dev *dev, struct ppa_addr r) { - struct nvm_geo *geo = &tgt_dev->geo; + struct nvm_geo *geo = &dev->geo; struct ppa_addr l; if (geo->version == NVM_OCSSD_SPEC_12) { @@ -424,10 +424,10 @@ static inline struct ppa_addr generic_to_dev_addr(struct nvm_tgt_dev *tgt_dev, return l; } -static inline struct ppa_addr dev_to_generic_addr(struct nvm_tgt_dev *tgt_dev, +static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev, struct ppa_addr r) { - struct nvm_geo *geo = &tgt_dev->geo; + struct nvm_geo *geo = &dev->geo; struct ppa_addr l; l.ppa = 0; |