Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2187453ybm; Thu, 23 May 2019 12:48:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOw2Tyeaoc7kGHeJ91raeKa3zVOOgMMlCdzDXG8rxy5oc2fHckgRpwH9YdgrOeQkBRW34V X-Received: by 2002:a62:6d41:: with SMTP id i62mr67233409pfc.227.1558640907335; Thu, 23 May 2019 12:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640907; cv=none; d=google.com; s=arc-20160816; b=c6Upjda0XgLv++Zx9JEXBdrCvTQ4OQizeJplFa6R8i8h4TdbcXZUmQhbPCw0xo8k42 XLfvhvIXia/wASEhP4Ir9rctN/vKMwRw2nVjoWg+Xa6Ozl14R0iqBPID4E4jnKIDBuNb 8dQ9aWvHHd8i86erC6f/PxIqn/oZ72pOZIlJUrh2RxAWeey1MAxgMIOkv0BwEUTbblsE i++YEUi4ZU6KcHWd96bC596ugLwobV+K3ZCuPfMwlUBN/Xh3Y8N9MMkoeqdvpNDRWMr+ RKFrFc9V2tW6OYNGQX5qGJswXWB+GoKNN50GonDHk3brEUr+skqjSyhATyNGSHjcpRYf +Q9A== 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=OG5t62bLJaOTJ4fzi2qPNh7pFBqXO8aRS9ee+xrEFRE=; b=1EwNZuwJIJDLTV4EL7fc5y93hN2rlWIjT4R+TaIIqAZvihv/BJnMDlrLuWI4SgRoSY /4fOUY1DMRxaKlx7o42jMNGTwVA58zdujhqAYL2+E0dETyPxlsrToFQIT89zryY0m+Sw G8BhZBvohMLac9nD1on+R/q1BSNYkSL/fVZZxf7yOBmwJ/fRXdHRdFoPa8X15iTLFP13 Vh4+iBNxQHXI2Oi0AwnXRI/+wTXhKbTkljSIwmceM8Ppa7CFByhodHG1chnV6WYUi8LU uVdk+DKqHwyDN6Grl1Oh0fSioAyhwxu8SJgiQHgSBeGCiFVTSD+IIC4QX517jeZtQpKw +3rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JPHLvEHj; 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 t5si522730pgv.164.2019.05.23.12.48.11; Thu, 23 May 2019 12:48:27 -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=JPHLvEHj; 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 S2388574AbfEWTrL (ORCPT + 99 others); Thu, 23 May 2019 15:47:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:47456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388082AbfEWTN1 (ORCPT ); Thu, 23 May 2019 15:13:27 -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 6DAF32186A; Thu, 23 May 2019 19:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638806; bh=iinsLTxbI9GgEq3kXfceGAF5pzt0Yc7F8j71KqN8rV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JPHLvEHjKJVFH/x3TVO4WhhLjOtAn0hjqbW8f6SrlFMWA/8a9RzET5rHIA0a8cLsn bIVPzW5Io7+t7/O4ODPYwTfozu1Y/HxoZ/qvaxzGekzU7FtmIUKyLA0uoqKTsmr8VM 7N1MFuzGcRn/vM9xMvMe37AFCfE5p6YRi7FKEuas= 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 4.14 72/77] Revert "Dont jump to compute_result state from check_result state" Date: Thu, 23 May 2019 21:06:30 +0200 Message-Id: <20190523181729.932487393@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@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 @@ -4218,15 +4218,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)) {