Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10434184ybi; Wed, 24 Jul 2019 23:08:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjMtM4r9md2Kw2Gxya3x1LKr16DZOcJb8FUN2f5GaK+3g0GZUDCRSpy6YQtkbc3mdoViR6 X-Received: by 2002:a63:121b:: with SMTP id h27mr69565272pgl.335.1564034917334; Wed, 24 Jul 2019 23:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034917; cv=none; d=google.com; s=arc-20160816; b=PJM/QlE6uLX0zLkpApHTML0lwmerkHEam4gzglaS5qbNQDkWuPQv2Hk95VMiwJFEBr vMPu/HuOt4C/OgBQbacUXMjvCxkUt26v1aWs1NpKeCQaPV8dW04j9KwNjssud3zsf/OU poQwGILgsvwecuWH1pXfsuf0Kp8BoeMd5WnURTYKvsGJc/RFIyc4m4eBrDRf6bWDQpjL DPvQM0ZgRj09lsGT6wgirBDEdc/mFxcvBD4G3RHGVQ4Yx7OYnrNig7Bag78voDtDf+Eu 4nd2INre1zjSmxpPJCAetunNlWr9S6aXk9mhPM5Nax2tLdMrLdsm/A+sNllZzVEHIbod Vxsg== 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=A5HVYTid7+4vD/cpOFLjBvFasZjbP3BLlYcO2y47dv0=; b=WjH+OiT3QhMrjVVGnOdXhgPR2mZiTve8Hd0XZh9MT8nKV+9JkOGmOa4tIIaOpx3ooi PWxOIpPaBGA1BP1d84Sqpr4L2CGJ3Cbys2jF7kXLEhb3Tbvdbc5remMr2kzBIhv1DN7n TSjefpu2v3WnxgES/bhyH97y8f5jbl6mYAIOMWSZDmXRMhXH9S7iHCDPLnjnOJ/2EcJB q1lvy0oPfZS59DaNx8ViJrogJ5s/nBb/0kmmawpztoDhbpKJL+6fSPsFyR/iljBkjuds jY4WnZof9jms9JB+GHMpETY6C1GAKvyXOzC7apCLTgdZKHxMA/Kgo6avMw73HVH3LohV EetA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gTPlkx9l; 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 e1si14021624plt.276.2019.07.24.23.08.22; Wed, 24 Jul 2019 23:08:37 -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=gTPlkx9l; 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 S2391129AbfGYFn6 (ORCPT + 99 others); Thu, 25 Jul 2019 01:43:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:58906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391107AbfGYFnx (ORCPT ); Thu, 25 Jul 2019 01:43:53 -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 5EB9721850; Thu, 25 Jul 2019 05:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033432; bh=11E7e5E99LqGGNJmqynG3uIbu/ENqOYwEjK/1K0oJ5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gTPlkx9lzcGxH1FrR7FnT62phLq0m5q1wLlUr7zL3juua4YdFtA69T17ldIFFhy0r 8m7vYiBd6du9A4Ma4yx6vt/BLNAJjsPx4/pJGbve1kL5PYCBHck+EPxUQgR4RZI7x1 aK3o0lVpbYVv3ymApxqGrsv4jDTCM9OFbS5wWf9I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Soltys , Xiao Ni , Song Liu , Jens Axboe Subject: [PATCH 4.19 205/271] raid5-cache: Need to do start() part job after adding journal device Date: Wed, 24 Jul 2019 21:21:14 +0200 Message-Id: <20190724191712.656388776@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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: Xiao Ni commit d9771f5ec46c282d518b453c793635dbdc3a2a94 upstream. commit d5d885fd514f ("md: introduce new personality funciton start()") splits the init job to two parts. The first part run() does the jobs that do not require the md threads. The second part start() does the jobs that require the md threads. Now it just does run() in adding new journal device. It needs to do the second part start() too. Fixes: d5d885fd514f ("md: introduce new personality funciton start()") Cc: stable@vger.kernel.org #v4.9+ Reported-by: Michal Soltys Signed-off-by: Xiao Ni Signed-off-by: Song Liu Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/md/raid5.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -7670,7 +7670,7 @@ abort: static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev) { struct r5conf *conf = mddev->private; - int err = -EEXIST; + int ret, err = -EEXIST; int disk; struct disk_info *p; int first = 0; @@ -7685,7 +7685,14 @@ static int raid5_add_disk(struct mddev * * The array is in readonly mode if journal is missing, so no * write requests running. We should be safe */ - log_init(conf, rdev, false); + ret = log_init(conf, rdev, false); + if (ret) + return ret; + + ret = r5l_start(conf->log); + if (ret) + return ret; + return 0; } if (mddev->recovery_disabled == conf->recovery_disabled)