From patchwork Thu Dec 7 18:49:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 10100855 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AC8660329 for ; Thu, 7 Dec 2017 18:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E8B428521 for ; Thu, 7 Dec 2017 18:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 736B22853C; Thu, 7 Dec 2017 18:49:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2736128521 for ; Thu, 7 Dec 2017 18:49:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56D364A6E5; Thu, 7 Dec 2017 18:49:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BA997849F; Thu, 7 Dec 2017 18:49:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 151EE1804750; Thu, 7 Dec 2017 18:49:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vB7InVWA026270 for ; Thu, 7 Dec 2017 13:49:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id B2D99183A2; Thu, 7 Dec 2017 18:49:31 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from redhat.com (octiron.msp.redhat.com [10.15.80.209]) by smtp.corp.redhat.com (Postfix) with SMTP id 7232969AFB; Thu, 7 Dec 2017 18:49:30 +0000 (UTC) Received: by redhat.com (sSMTP sendmail emulation); Thu, 07 Dec 2017 12:49:30 -0600 From: "Benjamin Marzinski" To: device-mapper development Date: Thu, 7 Dec 2017 12:49:02 -0600 Message-Id: <1512672546-12785-9-git-send-email-bmarzins@redhat.com> In-Reply-To: <1512672546-12785-1-git-send-email-bmarzins@redhat.com> References: <1512672546-12785-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: Martin Wilck Subject: [dm-devel] [PATCH 08/12] libmultipath: __setup_multipath param cleanup X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 07 Dec 2017 18:49:35 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP setup multipath is only called by the daemon, so there is no point in the is_daemon parameter. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/structs_vec.c | 6 +++--- libmultipath/structs_vec.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 70fb005..814a4b9 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -336,7 +336,7 @@ void set_no_path_retry(struct config *conf, struct multipath *mpp) } int __setup_multipath(struct vectors *vecs, struct multipath *mpp, - int reset, int is_daemon) + int reset) { struct config *conf; @@ -352,7 +352,7 @@ int __setup_multipath(struct vectors *vecs, struct multipath *mpp, goto out; } - if (update_multipath_strings(mpp, vecs->pathvec, is_daemon)) { + if (update_multipath_strings(mpp, vecs->pathvec, 1)) { condlog(0, "%s: failed to setup multipath", mpp->alias); goto out; } @@ -594,7 +594,7 @@ int update_multipath (struct vectors *vecs, char *mapname, int reset) return 2; } - if (__setup_multipath(vecs, mpp, reset, 1)) + if (__setup_multipath(vecs, mpp, reset)) return 1; /* mpp freed in setup_multipath */ /* diff --git a/libmultipath/structs_vec.h b/libmultipath/structs_vec.h index 54865d7..04fa0dd 100644 --- a/libmultipath/structs_vec.h +++ b/libmultipath/structs_vec.h @@ -20,8 +20,8 @@ void orphan_path (struct path * pp, const char *reason); int verify_paths(struct multipath * mpp, struct vectors * vecs); int update_mpp_paths(struct multipath * mpp, vector pathvec); int __setup_multipath (struct vectors * vecs, struct multipath * mpp, - int reset, int is_daemon); -#define setup_multipath(vecs, mpp) __setup_multipath(vecs, mpp, 1, 1) + int reset); +#define setup_multipath(vecs, mpp) __setup_multipath(vecs, mpp, 1) int update_multipath_strings (struct multipath *mpp, vector pathvec, int is_daemon); void extract_hwe_from_path(struct multipath * mpp);