Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9938234ybi; Wed, 24 Jul 2019 12:40:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgOGSB8Z4wdqbwmn5zEqcgnn41nZt6pTgaby/AkDBtGm0Th9avul4HiShAo0mP6lIXD2B3 X-Received: by 2002:a17:902:44a4:: with SMTP id l33mr86954665pld.174.1563997233515; Wed, 24 Jul 2019 12:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997233; cv=none; d=google.com; s=arc-20160816; b=NmvyYu0LnZGiFLuxTgzq7FzDyoLUgq8CbxHwzaprnDNaidmz4L4RhnhpwdGScnKaUh M4UQrTaHOAhaIu/T/xuBo7pqvoe4XU3v0lnYCurWYr34ivz0sNxYpAktMaNvKXmxe2dy s6v+44DQP7VZ0EgbXii5A1NkpFUSJDmp+oqEGQSJvGJdZ+GhKVCe7PyoEuNA71Dy4Gdq 3I/PTGKRMoc/eQ9MaF8Hvd3edtZUL1gihoL9n6DA3631Z8hHNANRu4G0a55Q8kbnpKII CdzOcXUdgm/tYe2PQ3UwqhLhSuHpH81X+FPRAb+kNhjFNM+ttfWp6Z0aG2v/pzCiaJur dqGQ== 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=3TXw2cAMIjvpHrLBHatr4Fq2ubcTutZwSvRqo3iFJkU=; b=toeV0Dvqg8HaB/Tp+AUZtmr7tL6Xjwh7KM6MXtUM9TuYD8oWOVpMlGfOHpg0MIJxD9 D6sKKiTt5Iyw1l/YawGjFblgVWbEz8xN3U/2CoSWMqCspj5F1AjV7k7TSnZQDFToDvIx +t4B+8j/RekvGl7jfflAA2Rz9Sq9Yvks5uqRmoZcYqqR3wHrjDDqx4M7Qa39H1BE6YNO bwxswMLZjf/UI5+h3EDhg209fhm+4aFQpetO54ng9NhxP4ofZmIEbXTy9JHHKmpm8Qgx j8q1HK1jkr/wlIIzlFj1bpTZRZEAsI3lHO9/Z9c9tuarD6wana3otGDCU6Qcvs8MGRDd PJsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OPpN9RyR; 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 64si15418390plk.87.2019.07.24.12.40.19; Wed, 24 Jul 2019 12:40:33 -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=OPpN9RyR; 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 S2388948AbfGXTh4 (ORCPT + 99 others); Wed, 24 Jul 2019 15:37:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:38232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389527AbfGXThw (ORCPT ); Wed, 24 Jul 2019 15:37:52 -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 DD6DE20665; Wed, 24 Jul 2019 19:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997071; bh=syFbf0UgcCFnGH1X+UvaiG84VD7cB2/7T3UzsCLEOIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OPpN9RyR/z/MOqZjHAiSyrFL3kitDk5IOZUbUcenNz1kfNZy0FruGa7H4iSBNyPcu rrQJ89OReTALHRAb2n/8fBZgio2XmSwO0yDlZ1+kTXx7gwvRFBdPLALsfuuUeKOh4Q 1qJC7fvcAIAzjLIi+u6f3/nT2ck6B/AfKGT1OPx8= 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 5.2 312/413] raid5-cache: Need to do start() part job after adding journal device Date: Wed, 24 Jul 2019 21:20:03 +0200 Message-Id: <20190724191758.103472484@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@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 @@ -7672,7 +7672,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; @@ -7687,7 +7687,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)