lightnvm: check bi_error in gc
PATCH 1/1 lightnvm: check bi_error in gc
We should check last io compeltion status before
start another one.
Signed-off-by Wenwei Tao <[email protected]>
--- drivers/lightnvm/rrpc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/lightnvm/rrpc.c +6 -0
@@ -328,6 +328,10 @@ try: goto finished; }wait_for_completion_io (&wait); +if (bio->bi_error) { +rrpc_inflight_laddr_release (rrpc, rqd); + goto finished; + }bio_reset (bio);reinit_completion (&wait);
@@ -350,6 +354,8 @@ try:wait_for_completion_io (&wait);rrpc_inflight_laddr_release (rrpc, rqd); +if (bio->bi_error) + goto finished;bio_reset (bio); }
Signature · 1 line
1.8.3.1
Quoted 25 lines · Wenwei Tao
We should check last io compeltion status before
start another one.Signed-off-by Wenwei Tao <[email protected]>--- drivers/lightnvm/rrpc.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/lightnvm/rrpc.c +4
-0@@ -328,6 +328,10 @@ try: goto finished; }wait_for_completion_io (&wait); +if (bio->bi_error) { +rrpc_inflight_laddr_release (rrpc, rqd); + goto finished; + }bio_reset (bio);reinit_completion (&wait);
drivers/lightnvm/rrpc.c try: · line 361
Quoted 8 lines
drivers/lightnvm/rrpc.c +2
-0@@ -350,6 +354,8 @@ try:wait_for_completion_io (&wait);rrpc_inflight_laddr_release (rrpc, rqd); +if (bio->bi_error) + goto finished;bio_reset (bio); }
Thanks Tao. I've applied it for 4.5.