From patchwork Tue Jan 12 06:49:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 8013841 X-Patchwork-Delegate: axboe@kernel.dk Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8E3779F88A for ; Tue, 12 Jan 2016 06:51:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF12A20114 for ; Tue, 12 Jan 2016 06:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 907DC2038A for ; Tue, 12 Jan 2016 06:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759441AbcALGvN (ORCPT ); Tue, 12 Jan 2016 01:51:13 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37677 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760947AbcALGuF (ORCPT ); Tue, 12 Jan 2016 01:50:05 -0500 Received: by mail-wm0-f51.google.com with SMTP id f206so303685003wmf.0 for ; Mon, 11 Jan 2016 22:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=RtK0ZUroXkgxkEOiLLLINT7E++XS4Kc1tUeZFptQ9Ww=; b=bYpuBlSP+E73Pc4uzOwDFAy6eLJn7O10yId/fjO5sYM+uQeGKzJEW/yHcjmG4N6J39 zIo2Xn2dssCokK+QnI50U1NMwxjw7lj8TmfshxiGI4MGPKFuMh3B+JjzaXFSnoGOJ+P0 EWlQKND3gdAO/CQ9erKFiaAaM8vUP+rpMm6as= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=RtK0ZUroXkgxkEOiLLLINT7E++XS4Kc1tUeZFptQ9Ww=; b=Lpq/ediULNPVeeMDk7lll/RGX9jbUaKFhIWR5kECQrgKYqEmgwKfl8VRVgUBKIVbIB T3gBqLfyJyAVZ4kmt+GB2rCGJB9t/fLLsX7h8MrIfLvmlFCur7Jt8yPs706xA0b/C7h/ XBBW4dXGMhdmcqtsxnDtuMOEDMi3kvocBb79btS3FyvP8SnJ3slYlmlN6j5jBn0sXdE/ ukGGpH5SpLPt5yTXXJjYNGLj81zVYlD5YgRVUcORVClpLm7bwf/3KvdNHe8WuERSxH/F kl+xeEf3CsJo7IpvD9RvaQffXz6q4a1pNBNNwy9ETQ4JGHxaUa7KYNekfQ1TbsslIzoG 8gfA== X-Gm-Message-State: ALoCoQlX1F2v/GuaJzk/9B+JF0rHmSLdSYq7qDeysRax6L3wOtN8Rp8McoWNgZ9AL/ooVrm7wYl6ipj6KVaDNReEoe4wfOFnZA== X-Received: by 10.194.158.73 with SMTP id ws9mr155616555wjb.40.1452581404677; Mon, 11 Jan 2016 22:50:04 -0800 (PST) Received: from localhost.localdomain (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.gmail.com with ESMTPSA id yz5sm70776886wjc.36.2016.01.11.22.50.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 22:50:03 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: Wenwei Tao , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 09/25] lightnvm: check bi_error in gc Date: Tue, 12 Jan 2016 07:49:23 +0100 Message-Id: <1452581379-18162-10-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452581379-18162-1-git-send-email-m@bjorling.me> References: <1452581379-18162-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wenwei Tao We should check last io completion status before starting another one. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling --- drivers/lightnvm/rrpc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 661c6f3..5df4a69 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -330,6 +330,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); @@ -352,6 +356,8 @@ try: wait_for_completion_io(&wait); rrpc_inflight_laddr_release(rrpc, rqd); + if (bio->bi_error) + goto finished; bio_reset(bio); }