From patchwork Sun Mar 8 03:31:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 5961081 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1D5099F373 for ; Sun, 8 Mar 2015 04:39:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 220102025B for ; Sun, 8 Mar 2015 04:39:35 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 086A220251 for ; Sun, 8 Mar 2015 04:39:33 +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 t284ahdg006991; Sat, 7 Mar 2015 23:36:43 -0500 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 t284ZaVj009407 for ; Sat, 7 Mar 2015 23:35:36 -0500 Received: from redhat.com (ask-08.lab.msp.redhat.com [10.15.85.8]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t284ZZTS005990; Sat, 7 Mar 2015 23:35:35 -0500 Received: by redhat.com (sSMTP sendmail emulation); Sat, 07 Mar 2015 21:32:02 -0600 From: "Benjamin Marzinski" To: device-mapper development Date: Sat, 7 Mar 2015 21:31:40 -0600 Message-Id: <1425785506-20419-10-git-send-email-bmarzins@redhat.com> In-Reply-To: <1425785506-20419-1-git-send-email-bmarzins@redhat.com> References: <1425785506-20419-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: dm-devel@redhat.com Cc: Christophe Varoqui Subject: [dm-devel] [PATCH 09/15] multipathd: read-only bindings X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Multipath already uses -B to run in a mode where it won't write the the bindings file (which can be useful in the initramfs). Its simple to make multipathd able to work this way as well. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 5 ++++- multipathd/multipathd.8 | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index bc21d04..7429f66 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1971,7 +1971,7 @@ main (int argc, char *argv[]) if (!conf) exit(1); - while ((arg = getopt(argc, argv, ":dsv:k::")) != EOF ) { + while ((arg = getopt(argc, argv, ":dsv:k::B")) != EOF ) { switch(arg) { case 'd': logsink = 0; @@ -1990,6 +1990,9 @@ main (int argc, char *argv[]) case 'k': uxclnt(optarg); exit(0); + case 'B': + conf->bindings_read_only = 1; + break; default: ; } diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8 index 358141d..7fe6597 100644 --- a/multipathd/multipathd.8 +++ b/multipathd/multipathd.8 @@ -28,6 +28,11 @@ Suppress timestamps. Do not prefix logging messages with a timestamp. .B -v "level" Verbosity level. Print additional information while running multipathd. A level of 0 means only print errors. A level of 3 or greater prints debugging information as well. .TP +.B -B +Read-only bindings file. Multipathd will not write to the user_friendly_names +bindings file. If a user_friendly_name doesn't already exist for a device, it +will use its WWID as its alias. +.TP .B -k multipathd will enter interactive mode. From this mode, the available commands can be viewed by entering "help". When you are finished entering commands, press CTRL-D to quit.