Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3931544imm; Mon, 8 Oct 2018 11:53:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV61QloS/todi1QvdeCsnqqjxOh2/kNV3uMz0mgtUQFh0rp8t12NdujawY4ybgz9S66jHhAq5 X-Received: by 2002:a63:4047:: with SMTP id n68-v6mr17866522pga.224.1539024832418; Mon, 08 Oct 2018 11:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024832; cv=none; d=google.com; s=arc-20160816; b=rPqZvnAoRhy7NpREj9xi8bRwqIcNinQT5Pi4rPp8BfDYu1LS5rl7lYHDdGMXkKm3kC nPfbU6yVmbduU8Eh6wpzfjWjHY4NTcQ1gKGmb6K8MTGYRz/NlnLH7R1n8sp8u/OKQNJq uyJzc6fuMfT1eYcf53EeogJzOo1gI7/M7AcxUJ6u5zws0rmk/1i6GkgAL0SjEikwB7yx XDPJrsRsqXNCRDuQWcf/LeC1LQ3GPD6WKVcJ8rp8V7uVg7BD02E01WLbL3X3CAVU2u5/ a70azoqwwTsDarByQnOH3N+rALh5LdYrJ7bdaB2YUTLVkiQ1zH0EeM/h46BbgD4aNHz+ KAsg== 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=eCMYoR8AXDw1BtGsz415si1kvfBy3RMamDq5XiyZkFQ=; b=s7mnlLcF4jRzmHr5rO2x/Xmr1jCWicNbbqzNKW/6rTWxVjXp4pef2xGYswsE8/BIS9 t0X0HPM/3u1RS9wpokqNIgNR3adsuW8ZXMM/9XY4+iBdzxloHVxVeCcnDd6zak+1HM8u xXUEJgTRRedxDmcLe74qcMaAcrQ8BGw5w4pqtJ8D2di4j9ggZbgT1PyHWOWvCoiIwoTr LrGaah1FZ32DSX/sH7ICN3as2YZlVFjkYozf3wTEHcKo1mLzlCbc9PnjHS+oZQ6O905t ZSa1DEmwizeql62N1n0oX6AC9PevR3J0VWr6rbYIJcoBZz/LIzyEnOLy0t7/4xrZ4BNV 5Z9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cCUaPYXh; 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 ce19-v6si8360079plb.162.2018.10.08.11.53.37; Mon, 08 Oct 2018 11:53:52 -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=cCUaPYXh; 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 S1732507AbeJICF2 (ORCPT + 99 others); Mon, 8 Oct 2018 22:05:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:55546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727260AbeJICF1 (ORCPT ); Mon, 8 Oct 2018 22:05:27 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 17A8C204FD; Mon, 8 Oct 2018 18:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024739; bh=A26M3ZC0TDc0FiEWakmvr+uL9581k0hvVEhNyWz/Ifs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cCUaPYXhK4H4v3Q1ZPkGa/8eU6+8fXZWAFk8+eqCY6A3U50oQYOvn0B5Ke4p6wJap LdW0PA5LcbQixxlaDXj2fDDyBpIrk6XU47uPnpFKsl4YIRTnIfSNOeuqpQTMJWXhzR Eyy4KEo8MiCnguLCfYIIBJ8thafeOCtkptZqnhkI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heinz Mauelshagen , Mike Snitzer , Sasha Levin Subject: [PATCH 4.18 114/168] dm raid: fix rebuild of specific devices by updating superblock Date: Mon, 8 Oct 2018 20:31:34 +0200 Message-Id: <20181008175624.380273043@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heinz Mauelshagen [ Upstream commit c44a5ee803d2b7ed8c2e6ce24a5c4dd60778886e ] Update superblock when particular devices are requested via rebuild (e.g. lvconvert --replace ...) to avoid spurious failure with the "New device injected into existing raid set without 'delta_disks' or 'rebuild' parameter specified" error message. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-raid.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3126,6 +3126,11 @@ static int raid_ctr(struct dm_target *ti set_bit(RT_FLAG_UPDATE_SBS, &rs->runtime_flags); rs_set_new(rs); } else if (rs_is_recovering(rs)) { + /* Rebuild particular devices */ + if (test_bit(__CTR_FLAG_REBUILD, &rs->ctr_flags)) { + set_bit(RT_FLAG_UPDATE_SBS, &rs->runtime_flags); + rs_setup_recovery(rs, MaxSector); + } /* A recovering raid set may be resized */ ; /* skip setup rs */ } else if (rs_is_reshaping(rs)) {