Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1416237imm; Thu, 5 Jul 2018 23:00:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcgS9fc8dJWsMC3KBx4EBW3q0+NZO1Zuk3oBM9+no2LTBPhBR6Z2JM9zjnP6dQitYjNLr2Z X-Received: by 2002:a62:968f:: with SMTP id s15-v6mr9264609pfk.191.1530856842919; Thu, 05 Jul 2018 23:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530856842; cv=none; d=google.com; s=arc-20160816; b=ZDodq0HsiGwgBL+OQ+dXHhZCvI+DVbJnGapNfS458fuMx6EXlwiV/hZy+OfHtyqfFr ZOjU4uwhY1/dPuD9yrF+iCiPgoL0xRptRtQ/ZjJ1khiVQNE12WXLoGqK8CxVhozeAfZ3 /CS5fFj20mv50e8gMspVQHLOLKx1qnElyqe0BAjJGLTAKvRfeA1NsE6ViEvlkuV4jg1F D5PIAeRvxyQng0JnMUxIsq495Y9x/nbYmPzWkOP8cQn3jOGRrOqssQ3Bh/8xEsCjaeqR +sD9mJV9MBOGkYG93LUxAlfSeuV6eVOxNNo//j8gNEVtIkbEd2V6hKWzMbmwTouHCAMJ qKGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=iaDGxoTEPk16V5FC9yKIHWIECE/aYsG9AGMD7xC3EqE=; b=oQg4ooovYSjPsAygZtODOBQpEMm+l9RPLgwNVzC/sH9WAPzFApcxzsoQkcyzxq+uOw L4b1GrjbIno5We0mdc9PCEQHxJlLFDUZaTNgS2DoGUnwTERzLXnItSHOUp9jiQh8qd8I fWQGGiucezofK5xxfEUEEaCg0oWhnhP3lSJVJHCBHqCZ+IsIR6qK2LQhEnfEEMe/S3jV jlnUs0OWEwJZ8a9SAJIDJR1RMKIgtcd7azd0Bu+yAfj+aQBbX1cjUX71En/qeKcd8v3K q42wzlInU8tNP9KEUBhLkRxc7JKwxljavK5r7BlasDWdzSuhKmfReH1YWJEadaDw7M52 n5CQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a67-v6si8071539pfb.348.2018.07.05.23.00.29; Thu, 05 Jul 2018 23:00:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934287AbeGFFv1 (ORCPT + 99 others); Fri, 6 Jul 2018 01:51:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33308 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934160AbeGFFvY (ORCPT ); Fri, 6 Jul 2018 01:51:24 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E03C186A; Fri, 6 Jul 2018 05:51:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, NeilBrown , Shaohua Li , Jack Wang Subject: [PATCH 4.14 37/61] md: use mddev_suspend/resume instead of ->quiesce() Date: Fri, 6 Jul 2018 07:47:01 +0200 Message-Id: <20180706054713.761302829@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706054712.332416244@linuxfoundation.org> References: <20180706054712.332416244@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: NeilBrown commit 9e1cc0a54556a6c63dc0cfb7cd7d60d43337bba6 upstream. mddev_suspend() is a more general interface than calling ->quiesce() and is so more extensible. A future patch will make use of this. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li Signed-off-by: Jack Wang Signed-off-by: Greg Kroah-Hartman --- drivers/md/md.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4870,8 +4870,8 @@ suspend_lo_store(struct mddev *mddev, co mddev->pers->quiesce(mddev, 2); } else { /* Expanding suspended region - need to wait */ - mddev->pers->quiesce(mddev, 1); - mddev->pers->quiesce(mddev, 0); + mddev_suspend(mddev); + mddev_resume(mddev); } err = 0; unlock: @@ -4914,8 +4914,8 @@ suspend_hi_store(struct mddev *mddev, co mddev->pers->quiesce(mddev, 2); } else { /* Expanding suspended region - need to wait */ - mddev->pers->quiesce(mddev, 1); - mddev->pers->quiesce(mddev, 0); + mddev_suspend(mddev); + mddev_resume(mddev); } err = 0; unlock: @@ -6666,7 +6666,7 @@ static int set_bitmap_file(struct mddev struct bitmap *bitmap; bitmap = bitmap_create(mddev, -1); - mddev->pers->quiesce(mddev, 1); + mddev_suspend(mddev); if (!IS_ERR(bitmap)) { mddev->bitmap = bitmap; err = bitmap_load(mddev); @@ -6676,11 +6676,11 @@ static int set_bitmap_file(struct mddev bitmap_destroy(mddev); fd = -1; } - mddev->pers->quiesce(mddev, 0); + mddev_resume(mddev); } else if (fd < 0) { - mddev->pers->quiesce(mddev, 1); + mddev_suspend(mddev); bitmap_destroy(mddev); - mddev->pers->quiesce(mddev, 0); + mddev_resume(mddev); } } if (fd < 0) { @@ -6966,7 +6966,7 @@ static int update_array_info(struct mdde mddev->bitmap_info.space = mddev->bitmap_info.default_space; bitmap = bitmap_create(mddev, -1); - mddev->pers->quiesce(mddev, 1); + mddev_suspend(mddev); if (!IS_ERR(bitmap)) { mddev->bitmap = bitmap; rv = bitmap_load(mddev); @@ -6974,7 +6974,7 @@ static int update_array_info(struct mdde rv = PTR_ERR(bitmap); if (rv) bitmap_destroy(mddev); - mddev->pers->quiesce(mddev, 0); + mddev_resume(mddev); } else { /* remove the bitmap */ if (!mddev->bitmap) { @@ -6997,9 +6997,9 @@ static int update_array_info(struct mdde mddev->bitmap_info.nodes = 0; md_cluster_ops->leave(mddev); } - mddev->pers->quiesce(mddev, 1); + mddev_suspend(mddev); bitmap_destroy(mddev); - mddev->pers->quiesce(mddev, 0); + mddev_resume(mddev); mddev->bitmap_info.offset = 0; } }