From patchwork Wed Oct 26 02:33:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhou.guichun@zte.com.cn X-Patchwork-Id: 9395831 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 7405A600BA for ; Wed, 26 Oct 2016 02:37:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7651E295EE for ; Wed, 26 Oct 2016 02:37:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AFEA29640; Wed, 26 Oct 2016 02:37:34 +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 mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7154C295EE for ; Wed, 26 Oct 2016 02:37:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9Q2Ytdr018881; Tue, 25 Oct 2016 22:34:56 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9Q2Yr9G026691 for ; Tue, 25 Oct 2016 22:34:53 -0400 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9Q2Yrru008455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 25 Oct 2016 22:34:53 -0400 Received: from mx5.zte.com.cn (mx5.zte.com.cn [63.217.80.70]) by mx1.redhat.com (Postfix) with ESMTP id 13210C05A280; Wed, 26 Oct 2016 02:34:51 +0000 (UTC) Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Websense Email Security Gateway with ESMTP id BC1405B0284DA; Wed, 26 Oct 2016 10:34:46 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id u9Q2YVdh050435; Wed, 26 Oct 2016 10:34:31 +0800 (GMT-8) (envelope-from zhou.guichun@zte.com.cn) Received: from localhost.localdomain ([10.118.202.203]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2016102610343437-2208752 ; Wed, 26 Oct 2016 10:34:34 +0800 From: zhou.guichun@zte.com.cn To: 10184522@zte.com.cn, 10072500@zte.com.cn, 10074136@zte.com.cn Date: Wed, 26 Oct 2016 10:33:39 +0800 Message-Id: <1477449220-11020-1-git-send-email-zhou.guichun@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2016-10-26 10:34:34, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2016-10-26 10:34:12, Serialize complete at 2016-10-26 10:34:12 X-MAIL: mse01.zte.com.cn u9Q2YVdh050435 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 188 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 26 Oct 2016 02:34:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 26 Oct 2016 02:34:52 +0000 (UTC) for IP:'63.217.80.70' DOMAIN:'mx5.zte.com.cn' HELO:'mx5.zte.com.cn' FROM:'zhou.guichun@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -3.241 (BAYES_50, DCC_REPUT_00_12, RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2, RP_MATCHES_RCVD, SPF_PASS) 63.217.80.70 mx5.zte.com.cn 63.217.80.70 mx5.zte.com.cn X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-loop: dm-devel@redhat.com Cc: Xose Vazquez Perez , device-mapper development Subject: [dm-devel] [PATCH 1/2] multipath-tools: replace static and define default values for config options 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-Virus-Scanned: ClamAV using ClamSMTP From: Xose Vazquez Perez Replace "const" by PRIO_CONST. Replace static force_sync and partition_delim values, and define DEFAULT_FORCE_SYNC and DEFAULT_PARTITION_DELIM Cc: Benjamin Marzinski Cc: Hannes Reinecke Cc: Christophe Varoqui Cc: device-mapper development Signed-off-by: Xose Vazquez Perez --- libmultipath/config.c | 4 ++-- libmultipath/defaults.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libmultipath/config.c b/libmultipath/config.c index 92e4deb..ed51afb 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c @@ -606,8 +606,8 @@ load_config (char * file) conf->fast_io_fail = DEFAULT_FAST_IO_FAIL; conf->retain_hwhandler = DEFAULT_RETAIN_HWHANDLER; conf->detect_prio = DEFAULT_DETECT_PRIO; - conf->force_sync = 0; - conf->partition_delim = NULL; + conf->force_sync = DEFAULT_FORCE_SYNC; + conf->partition_delim = DEFAULT_PARTITION_DELIM; conf->processed_main_config = 0; conf->find_multipaths = DEFAULT_FIND_MULTIPATHS; conf->uxsock_timeout = DEFAULT_REPLY_TIMEOUT; diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h index e9581a6..9af9a9a 100644 --- a/libmultipath/defaults.h +++ b/libmultipath/defaults.h @@ -28,11 +28,13 @@ #define DEFAULT_RETRIGGER_DELAY 10 #define DEFAULT_RETRIGGER_TRIES 3 #define DEFAULT_UEV_WAIT_TIMEOUT 30 -#define DEFAULT_PRIO "const" +#define DEFAULT_PRIO PRIO_CONST #define DEFAULT_PRIO_ARGS "" #define DEFAULT_CHECKER TUR #define DEFAULT_FLUSH FLUSH_DISABLED #define DEFAULT_USER_FRIENDLY_NAMES USER_FRIENDLY_NAMES_OFF +#define DEFAULT_FORCE_SYNC 0 +#define DEFAULT_PARTITION_DELIM NULL #define DEFAULT_CHECKINT 5 #define MAX_CHECKINT(a) (a << 2)