linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lightnvm: check bi_error in gc
@ 2015-12-29  5:50 Wenwei Tao
  2015-12-29  9:37 ` Matias Bjørling
  0 siblings, 1 reply; 2+ messages in thread
From: Wenwei Tao @ 2015-12-29  5:50 UTC (permalink / raw)
  To: mb; +Cc: linux-kernel, linux-block

We should check last io compeltion status before
start another one.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
---
 drivers/lightnvm/rrpc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c0886a8..d40c140 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -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);
 	}
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lightnvm: check bi_error in gc
  2015-12-29  5:50 [PATCH] lightnvm: check bi_error in gc Wenwei Tao
@ 2015-12-29  9:37 ` Matias Bjørling
  0 siblings, 0 replies; 2+ messages in thread
From: Matias Bjørling @ 2015-12-29  9:37 UTC (permalink / raw)
  To: Wenwei Tao; +Cc: linux-kernel, linux-block

On 12/29/2015 06:50 AM, Wenwei Tao wrote:
> We should check last io compeltion status before
> start another one.
>
> Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
> ---
>   drivers/lightnvm/rrpc.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index c0886a8..d40c140 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -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);
>   	}
>
Thanks Tao. I've applied it for 4.5.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-29  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-29  5:50 [PATCH] lightnvm: check bi_error in gc Wenwei Tao
2015-12-29  9:37 ` Matias Bjørling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).