projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lightnvm: pblk: fail gracefully on irrec. error
[linux-block.git]
/
drivers
/
lightnvm
/
pblk-cache.c
diff --git
a/drivers/lightnvm/pblk-cache.c
b/drivers/lightnvm/pblk-cache.c
index 59bcea88db842f93ffca0a7d19cde803cbf327c5..024a8fc93069e74f4a84f6efcd1ac356fc2667c2 100644
(file)
--- a/
drivers/lightnvm/pblk-cache.c
+++ b/
drivers/lightnvm/pblk-cache.c
@@
-31,9
+31,13
@@
int pblk_write_to_cache(struct pblk *pblk, struct bio *bio, unsigned long flags)
*/
retry:
ret = pblk_rb_may_write_user(&pblk->rwb, bio, nr_entries, &bpos);
*/
retry:
ret = pblk_rb_may_write_user(&pblk->rwb, bio, nr_entries, &bpos);
- if (ret == NVM_IO_REQUEUE) {
+ switch (ret) {
+ case NVM_IO_REQUEUE:
io_schedule();
goto retry;
io_schedule();
goto retry;
+ case NVM_IO_ERR:
+ pblk_pipeline_stop(pblk);
+ goto out;
}
if (unlikely(!bio_has_data(bio)))
}
if (unlikely(!bio_has_data(bio)))
@@
-58,6
+62,8
@@
retry:
atomic_long_add(nr_entries, &pblk->req_writes);
#endif
atomic_long_add(nr_entries, &pblk->req_writes);
#endif
+ pblk_rl_inserted(&pblk->rl, nr_entries);
+
out:
pblk_write_should_kick(pblk);
return ret;
out:
pblk_write_should_kick(pblk);
return ret;