From patchwork Wed Oct 19 18:16:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xose Vazquez Perez X-Patchwork-Id: 9385121 X-Patchwork-Delegate: snitzer@redhat.com 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 47D03607D0 for ; Wed, 19 Oct 2016 18:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D9CC29576 for ; Wed, 19 Oct 2016 18:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 322092957E; Wed, 19 Oct 2016 18:19:17 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (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 1DCF029576 for ; Wed, 19 Oct 2016 18:19:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9JIGOW2046855; Wed, 19 Oct 2016 14:16:25 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9JIGMwf019002 for ; Wed, 19 Oct 2016 14:16:22 -0400 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9JIGMdJ030158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 19 Oct 2016 14:16:22 -0400 Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72CAA85545; Wed, 19 Oct 2016 18:16:21 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id l131so3324780lfl.0; Wed, 19 Oct 2016 11:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=rPHNm8XeWVyaJKhj0nshFvOr2CsZGEEv048clZJrf+U=; b=hW17P4uErNM/0jYBEYJ693Kiz96zxCpz+XA1rQlJ0ZQ1DgeeUHCV+wAI8uI5ew3CJt 3SyB25cN2Zzpgua0yVfNhtHoXwsPzcD3/sPrhZQX79RjoMT7ljilcbjKDi8V2Mir3ELt IILpiEbYFwzUmE4bDV0UyzYAIJRswJVqjdXlLdFEaOvmpgwr7c6SsbBs9HsLWXDn8Y3u DTXLE3U0AurEzf4NzGooAFF75ZMYT/IhHJHG5+XPY6E0OgL/kG3XiNpb+C+gjB9cHNeA ndQLpU0PuyRG6MzEgGWn2HYMBSHg2c4TL3mqBnBf5TPddiJ2Dhu4aNvVmHGZzOYMhJLZ 3psw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rPHNm8XeWVyaJKhj0nshFvOr2CsZGEEv048clZJrf+U=; b=NN1gZ55LqdSWyRZnLTDuKt5FLXNs0GKb0KFwNx3x6BNZ//eLRbJruZUd80sCvzofAz pRYmM8SJf66DdfjqiaPCtA7c7LgHoEjA8ldRxH/LQWkLf2EuHL+1C9UM3jTQBqBmNnTt 5rhNFAsWlYBbgJxtgm/cMIt9+2UpHhg5ynzI7Dd85InBWRQZGYzcQCDU34cPIEMohhym V8ahZyGzBNji8g/XRoMwpXMKIfiXdHTmhSmm4KR3CFtYF3vyTIFnm8nZvXvxIN0dbrDR V+TaIH5hsGxY/sDYLmbk3eiQXDRjLzm38tcXTXlpjNjw2/HdOBTWoMrxcHj1sZxOm5XW SQvA== X-Gm-Message-State: AA6/9RkGE/XSH9A9AWQEX8DH6KeHes4kVibRCzNgKhnm87WWKYdGByoUdizHRVDrwSHBBg== X-Received: by 10.28.197.67 with SMTP id v64mr3510579wmf.9.1476900979822; Wed, 19 Oct 2016 11:16:19 -0700 (PDT) Received: from localhost ([46.222.209.187]) by smtp.gmail.com with ESMTPSA id a7sm67842872wjj.22.2016.10.19.11.16.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 11:16:19 -0700 (PDT) From: Xose Vazquez Perez To: Date: Wed, 19 Oct 2016 20:16:17 +0200 Message-Id: <20161019181617.9147-1-xose.vazquez@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Oct 2016 18:16:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 19 Oct 2016 18:16:21 +0000 (UTC) for IP:'209.85.215.65' DOMAIN:'mail-lf0-f65.google.com' HELO:'mail-lf0-f65.google.com' FROM:'xose.vazquez@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.215.65 mail-lf0-f65.google.com 209.85.215.65 mail-lf0-f65.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-loop: dm-devel@redhat.com Cc: Xose Vazquez Perez , device-mapper development Subject: [dm-devel] [PATCH] 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 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)