dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christophe Varoqui <christophe.varoqui@gmail.com>
Cc: Hannes Reinecke <hare@suse.com>, dm-devel@redhat.com
Subject: [PATCH 05/26] dmparser: use 'is_daemon' as argument for disassemble_map()
Date: Mon, 20 Jun 2016 10:08:52 +0200	[thread overview]
Message-ID: <1466410153-23896-6-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1466410153-23896-1-git-send-email-hare@suse.de>

Use 'is_daemon' as argument for disassemble_map() so that
dmparser.c doesn't need to access 'struct config' anymore.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 libmpathpersist/mpath_persist.c | 2 +-
 libmultipath/dmparser.c         | 6 +++---
 libmultipath/dmparser.h         | 2 +-
 libmultipath/structs_vec.c      | 2 +-
 multipath/main.c                | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index 35e8837..ad6aec9 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -395,7 +395,7 @@ get_mpvec (vector curmp, vector pathvec, char * refwwid)
 		condlog(3, "params = %s", params);
 		dm_get_status(mpp->alias, status);
 		condlog(3, "status = %s", status);
-		disassemble_map (pathvec, params, mpp);
+		disassemble_map (pathvec, params, mpp, conf->daemon);
 
 		/*
 		 * disassemble_map() can add new paths to pathvec.
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 98fb559..9e79ecd 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -13,7 +13,6 @@
 #include "structs.h"
 #include "util.h"
 #include "debug.h"
-#include "config.h"
 
 #define WORD_SIZE 64
 
@@ -142,7 +141,8 @@ assemble_map (struct multipath * mp, char * params, int len)
 }
 
 extern int
-disassemble_map (vector pathvec, char * params, struct multipath * mpp)
+disassemble_map (vector pathvec, char * params, struct multipath * mpp,
+		 int is_daemon)
 {
 	char * word;
 	char * p;
@@ -351,7 +351,7 @@ disassemble_map (vector pathvec, char * params, struct multipath * mpp)
 						WWID_SIZE - 1);
 				}
 				/* Only call this in multipath client mode */
-				if (!conf->daemon && store_path(pathvec, pp))
+				if (!is_daemon && store_path(pathvec, pp))
 					goto out1;
 			} else {
 				if (!strlen(pp->wwid) &&
diff --git a/libmultipath/dmparser.h b/libmultipath/dmparser.h
index 1b45df0..e1badb0 100644
--- a/libmultipath/dmparser.h
+++ b/libmultipath/dmparser.h
@@ -1,3 +1,3 @@
 int assemble_map (struct multipath *, char *, int);
-int disassemble_map (vector, char *, struct multipath *);
+int disassemble_map (vector, char *, struct multipath *, int);
 int disassemble_status (char *, struct multipath *);
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index b00832e..1b1a5f3 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -259,7 +259,7 @@ update_multipath_table (struct multipath *mpp, vector pathvec)
 		return 1;
 	}
 
-	if (disassemble_map(pathvec, params, mpp)) {
+	if (disassemble_map(pathvec, params, mpp, conf->daemon)) {
 		condlog(3, "%s: cannot disassemble map", mpp->alias);
 		return 1;
 	}
diff --git a/multipath/main.c b/multipath/main.c
index 0dbe281..30710ea 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -206,7 +206,7 @@ get_dm_mpvec (vector curmp, vector pathvec, char * refwwid)
 		dm_get_status(mpp->alias, status);
 		condlog(3, "status = %s", status);
 
-		disassemble_map(pathvec, params, mpp);
+		disassemble_map(pathvec, params, mpp, conf->daemon);
 
 		/*
 		 * disassemble_map() can add new paths to pathvec.
-- 
2.6.6

  parent reply	other threads:[~2016-06-20  8:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  8:08 [PATCH 00/26] Userspace-RCU for config accesses Hannes Reinecke
2016-06-20  8:08 ` [PATCH 01/26] Revert patch 'move filter_devnode() under vector lock' Hannes Reinecke
2016-06-20  8:08 ` [PATCH 02/26] Use 'mptable' as argument for find_mpe() and get_mpe_wwid() Hannes Reinecke
2016-07-01 19:48   ` Benjamin Marzinski
2016-06-20  8:08 ` [PATCH 03/26] config: set 'deferred_remove' defaults at correct call Hannes Reinecke
2016-06-20  8:08 ` [PATCH 04/26] devmapper: explicit config settings Hannes Reinecke
2016-06-20  8:08 ` Hannes Reinecke [this message]
2016-06-20  8:08 ` [PATCH 06/26] libmultipath: use 'is_daemon' as argument for domap() etc Hannes Reinecke
2016-06-20  8:08 ` [PATCH 07/26] libmultipath: drop 'daemon' configuration setting Hannes Reinecke
2016-06-20  8:08 ` [PATCH 08/26] libmultipath: Do not access 'conf->cmd' in domap() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 09/26] libmultipath: add 'cmd' as argument for get_refwwid() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 10/26] libmultipath: fallback to checking environment variable in get_udev_uid() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 11/26] multipath: make 'cmd' internal to multipath program Hannes Reinecke
2016-06-20  8:08 ` [PATCH 12/26] multipath: make 'dev_type' internal to the " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 13/26] multipath: make 'dev' " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 14/26] libmultipath: separate out 'udev' config entry Hannes Reinecke
2016-06-20  8:09 ` [PATCH 15/26] libmultipath: use 'checkint' as argument for sysfs_set_scsi_tmo() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 16/26] discovery: Pass in 'hwtable' for get_state() and scsi_sysfs_discovery() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 17/26] libmultipath: use 'struct config' as argument for pathinfo() Hannes Reinecke
2016-07-01 20:25   ` Benjamin Marzinski
2016-07-04  5:49     ` Hannes Reinecke
2016-06-20  8:09 ` [PATCH 18/26] checkers: use 'multipath_dir' as argument Hannes Reinecke
2016-06-20  8:09 ` [PATCH 19/26] prio: " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 20/26] libmultipath: use 'timeout' as argument for getprio() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 21/26] libmultipath: use explicit 'config' argument for configuration file parsing Hannes Reinecke
2016-06-20  8:09 ` [PATCH 22/26] libmultipath: use (get, put)_multipath_config() accessors Hannes Reinecke
2016-06-20  8:09 ` [PATCH 23/26] multipathd: Fixup commandline argument handling Hannes Reinecke
2016-06-20  8:09 ` [PATCH 24/26] multipath: make 'struct config' a local variable Hannes Reinecke
2016-06-20  8:09 ` [PATCH 25/26] multipathd: use userspace RCU to access configuration Hannes Reinecke
2016-06-20  8:09 ` [PATCH 26/26] libmultipath: Allocate keywords directly Hannes Reinecke
2016-07-01 20:44 ` [PATCH 00/26] Userspace-RCU for config accesses Benjamin Marzinski
  -- strict thread matches above, loose matches on Subject: below --
2016-07-04  7:08 [PATCHv2 " Hannes Reinecke
2016-07-04  7:08 ` [PATCH 05/26] dmparser: use 'is_daemon' as argument for disassemble_map() Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466410153-23896-6-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=christophe.varoqui@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).