Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1371701
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/5] lightnvm: handle submit_io failure |
| Date | 2016-04-05 17:00 +0200 |
| Message-ID | <rkACu-5ln-35@gated-at.bofh.it> (permalink) |
| References | <rkACt-5ln-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The device ->submit_io() callback might fail to submit I/O to device.
In that case, the nvm_submit_ppa function should not wait for
completion. Instead return the ->submit_io() error.
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/lightnvm/core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 0dc9a80..c2ef53a 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -351,6 +351,11 @@ int nvm_submit_ppa(struct nvm_dev *dev, struct ppa_addr *ppa, int nr_ppas,
nvm_generic_to_addr_mode(dev, &rqd);
ret = dev->ops->submit_io(dev, &rqd);
+ if (ret) {
+ nvm_free_rqd_ppalist(dev, &rqd);
+ bio_put(bio);
+ return ret;
+ }
/* Prevent hang_check timer from firing at us during very long I/O */
hang_check = sysctl_hung_task_timeout_secs;
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Fixes to LightNVM Matias Bjørling <m@bjorling.me> - 2016-04-05 17:00 +0200
[PATCH 4/5] lightnvm: move block fold outside of get_bb_tbl() Matias Bjørling <m@bjorling.me> - 2016-04-05 17:00 +0200
Re: [PATCH 4/5] lightnvm: move block fold outside of get_bb_tbl() Johannes Thumshirn <jthumshirn@suse.de> - 2016-04-05 17:20 +0200
[PATCH 1/5] lightnvm: handle submit_io failure Matias Bjørling <m@bjorling.me> - 2016-04-05 17:00 +0200
Re: [PATCH 1/5] lightnvm: handle submit_io failure Johannes Thumshirn <jthumshirn@suse.de> - 2016-04-05 17:10 +0200
csiph-web