Received: by 10.213.65.68 with SMTP id h4csp18671imn; Tue, 3 Apr 2018 14:35:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9jtihBjj+ZOun1Yh9WhdE9YJB/Q09ruxv4j8QhyIF6qCzRce1VZ3z7KKYXSPvyJX2V3CH X-Received: by 10.99.107.198 with SMTP id g189mr39570pgc.423.1522791301575; Tue, 03 Apr 2018 14:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522791301; cv=none; d=google.com; s=arc-20160816; b=FG0nroIxSnNdtN2qxzBB9xqwyie62uuEH21Vo80IBDAqJw9DH9m0atuR7q1eT1GaQa kT/q/VmjgoR0bOGYfUxDqR29OtzXzFwbixFlpHk9XXzfPMMoq8pJ3yVHmbNXhsIwbTe2 sS27VcbkBGbsHgpmOPDSh7ypn1QfkxbsCoTebwgM2M0lJkQpg+brWEQv+f4itzYGcgwW GtjwKBiwubj0iqeJkBcflluW3CfJYvQ94/eezBJxb+30MZAtqzElU0c3uDjsMTXpKJ9p Ort0Yc7xo0lIe7vyY9RcyhHcdC5rQnNEZXWR1H+ppMqOyWL6bkBI41wsEkLtVGuv26rY GatA== 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 :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=kjwust9w+ahECrdmSErApmMlhcc7DUAWdQqDYhvl9Vc=; b=SkqkkYQ4dX2SZxk1RnvaeUbHDm0oGBAlsUlW1LNVDAGKJSrgm5gqb+AlL3v1LAVatx EKeNWolo1O95yhVJ2A9Ui2m8mBzFCJSAx8m973U3x0AtEhr1hI/UCtx5Vg+sY/AjXjTQ lg4gW136c8Q21630d0N5VuUDWetxuDQ/i5jbVv6MTvjaxHuSiJjz/09xBnnz7AtpVwnZ LPbXWJMxD2wU8grlt1V2AURPFXYuMzbOX21twFWwEn96FH8hDXm9QIJ7CBanJGMEFS9n h6o85r29LmnFaFEtDuSWctwH1D1NGyonU6CMjzDF6yZX5fhcQrjvxgU0ti08+CdAsHWw nY8A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si2801823pff.280.2018.04.03.14.34.47; Tue, 03 Apr 2018 14:35:01 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697AbeDCVcP (ORCPT + 99 others); Tue, 3 Apr 2018 17:32:15 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:33902 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588AbeDCVcN (ORCPT ); Tue, 3 Apr 2018 17:32:13 -0400 Received: from 167-98-27-229.cust-167.exponential-e.net ([167.98.27.229] helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1f3TXG-0008LB-LG; Tue, 03 Apr 2018 22:32:10 +0100 Message-ID: <1522791129.2654.135.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 63/97] md/raid10: skip spare disk as first disk From: Ben Hutchings To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Guoqing Jiang , NeilBrown , Shaohua Li , Sasha Levin Date: Tue, 03 Apr 2018 22:32:09 +0100 In-Reply-To: <20180323094201.150412201@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> <20180323094201.150412201@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-03-23 at 10:54 +0100, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Shaohua Li > > > [ Upstream commit b506335e5d2b4ec687dde392a3bdbf7601778f1d ] > > Commit 6f287ca(md/raid10: reset the 'first' at the end of loop) ignores > a case in reshape, the first rdev could be a spare disk, which shouldn't > be accounted as the first disk since it doesn't include the offset info. > > Fix: 6f287ca(md/raid10: reset the 'first' at the end of loop) But that commit hasn't been applied to 4.4-stable. It probably should be, since it fixes another instance of the problem in the run() function. Take care not to add the wrongly placed assignment in raid10_start_reshape(). Ben. > Cc: Guoqing Jiang > Cc: NeilBrown > Signed-off-by: Shaohua Li > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- >  drivers/md/raid10.c |    1 + >  1 file changed, 1 insertion(+) > > --- a/drivers/md/raid10.c > +++ b/drivers/md/raid10.c > @@ -4044,6 +4044,7 @@ static int raid10_start_reshape(struct m >   diff = 0; >   if (first || diff < min_offset_diff) >   min_offset_diff = diff; > + first = 0; >   } >   } >   -- Ben Hutchings Software Developer, Codethink Ltd.