projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c66ac6
)
lightnvm: re-convert ppa format on I/O failure
author
Javier González
<
[email protected]
>
Mon, 26 Jun 2017 09:57:10 +0000
(11:57 +0200)
committer
Jens Axboe
<
[email protected]
>
Mon, 26 Jun 2017 22:24:53 +0000
(16:24 -0600)
In case of a failure when submitting a request, convert the ppa_list
addresses to the target format so that it can interpret ppas for
recovery
Signed-off-by: Javier González <
[email protected]
>
Signed-off-by: Matias Bjørling <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
drivers/lightnvm/core.c
patch
|
blob
|
history
diff --git
a/drivers/lightnvm/core.c
b/drivers/lightnvm/core.c
index 6a4aa608ad958a51a270b0cbdcaec0961facca82..b8f82f5c6c0d942de77f4f6840f59925251d6781 100644
(file)
--- a/
drivers/lightnvm/core.c
+++ b/
drivers/lightnvm/core.c
@@
-640,6
+640,7
@@
EXPORT_SYMBOL(nvm_max_phys_sects);
int nvm_submit_io(struct nvm_tgt_dev *tgt_dev, struct nvm_rq *rqd)
{
struct nvm_dev *dev = tgt_dev->parent;
+ int ret;
if (!dev->ops->submit_io)
return -ENODEV;
@@
-647,7
+648,12
@@
int nvm_submit_io(struct nvm_tgt_dev *tgt_dev, struct nvm_rq *rqd)
nvm_rq_tgt_to_dev(tgt_dev, rqd);
rqd->dev = tgt_dev;
- return dev->ops->submit_io(dev, rqd);
+
+ /* In case of error, fail with right address format */
+ ret = dev->ops->submit_io(dev, rqd);
+ if (ret)
+ nvm_rq_dev_to_tgt(tgt_dev, rqd);
+ return ret;
}
EXPORT_SYMBOL(nvm_submit_io);