Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2173040ybm; Thu, 23 May 2019 12:33:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQYR+yrjAKScw7Mpyl762KmTMYa6lYNIyDBEhv3CpR+Oxp+dIvSA4GK4nOp1EJNzFrBDtZ X-Received: by 2002:a17:902:9305:: with SMTP id bc5mr1297049plb.193.1558640008651; Thu, 23 May 2019 12:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640008; cv=none; d=google.com; s=arc-20160816; b=udOhCXz2tmbaF/TJf6IxINo83oejdMgaYYzMw70K/I1/I2oIaaZlLiNMJxJU3ItWjq sjEry6fgMzFEEZaBpsIS5VjK2MDbh2NEIPbzDHr0ejPkne0qVG4Y4A8RGQU0xpMLGL3d 8hwk87WeeSoBA5hah7qZlqtmefL6Lca2sLeJ2068ORf4IND5VY8bjOItCz3lPkgTmJiF ZXydECxQkMP5HjanuTodCpQ0WtBAqvTy3/ITxrI2nvMZp3V5d9MmeslEDFWnlTJs1UwS aTTQH8KwuWdLl8q0j2Ge/ZSPJakbCkaCC4rnUOzOiFl7ION9iCJW/3Jc1daY2VrDCX7M Qdtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qz87cjzh4f4O/LoxLSsY8MYVghLEsRmOxuHE2APxusY=; b=WxcUQwYKJcvJeM4vidF2LCVrjLFnWf7BpQb/Wp8u01eg0bR1LPAn7Jqh+jN6Y0hHJZ V5BNMlRm0EM6thyel1gmyZ4n+JRnlQDakBUXNEm1rqIzGk+XlqOgLOktOjB9cG/nHBYP vsh47+qVDjT/yMl6kkwt+MmG3h1R+SEosE09ImcVUp9aTWJqItMIjYQW8mX2Z8UW5YPz p3973zxruYF9DInV+y+J11iTOPdoGR6OwnKNF2XD3oulBSkn65RKblImEBciR5h0RBcl jibyzjlsZ5JQjDyNkMP7SOFbLMUXefOIT3x6nUlpruZDvcuETwDHefQ2nBbVwIibifZA dthg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rpPtoR3G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si563876pgk.553.2019.05.23.12.33.12; Thu, 23 May 2019 12:33:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rpPtoR3G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391809AbfEWTaq (ORCPT + 99 others); Thu, 23 May 2019 15:30:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:44292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391044AbfEWTam (ORCPT ); Thu, 23 May 2019 15:30:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BCDA2206BA; Thu, 23 May 2019 19:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639842; bh=0+FMZ+ewi22YLZs+nmDi4kl7PdV+y8/QWHfucQQnit0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rpPtoR3Gj6ZA310ta6sZpVr0DtXq38PjBAK7W66pN4RYpi3LjddJSdmrH7PzQ9AnW 1X03ib5BYFiqcIOrNd8dMqoaeEhdaKanX9a1uyCMZtfTplKGI3DsuZzbBpGPwZ7zL5 Spm1/oZzjpKOJ4mV+h9L/To3VWZXCUWPmiNbacNU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Williams , Nigel Croxon , Xiao Ni , Song Liu Subject: [PATCH 5.1 112/122] Revert "Dont jump to compute_result state from check_result state" Date: Thu, 23 May 2019 21:07:14 +0200 Message-Id: <20190523181720.293820308@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181705.091418060@linuxfoundation.org> References: <20190523181705.091418060@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Song Liu commit a25d8c327bb41742dbd59f8c545f59f3b9c39983 upstream. This reverts commit 4f4fd7c5798bbdd5a03a60f6269cf1177fbd11ef. Cc: Dan Williams Cc: Nigel Croxon Cc: Xiao Ni Signed-off-by: Song Liu Signed-off-by: Greg Kroah-Hartman --- drivers/md/raid5.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4223,15 +4223,26 @@ static void handle_parity_checks6(struct case check_state_check_result: sh->check_state = check_state_idle; - if (s->failed > 1) - break; /* handle a successful check operation, if parity is correct * we are done. Otherwise update the mismatch count and repair * parity if !MD_RECOVERY_CHECK */ if (sh->ops.zero_sum_result == 0) { - /* Any parity checked was correct */ - set_bit(STRIPE_INSYNC, &sh->state); + /* both parities are correct */ + if (!s->failed) + set_bit(STRIPE_INSYNC, &sh->state); + else { + /* in contrast to the raid5 case we can validate + * parity, but still have a failure to write + * back + */ + sh->check_state = check_state_compute_result; + /* Returning at this point means that we may go + * off and bring p and/or q uptodate again so + * we make sure to check zero_sum_result again + * to verify if p or q need writeback + */ + } } else { atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches); if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {