Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbbL2JhR (ORCPT ); Tue, 29 Dec 2015 04:37:17 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38725 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbbL2JhN (ORCPT ); Tue, 29 Dec 2015 04:37:13 -0500 Subject: Re: [PATCH] lightnvm: check bi_error in gc To: Wenwei Tao References: <1451368212-20076-1-git-send-email-ww.tao0320@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <56825446.70902@lightnvm.io> Date: Tue, 29 Dec 2015 10:37:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1451368212-20076-1-git-send-email-ww.tao0320@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1134 Lines: 40 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 > --- > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/