Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   multipath: better check for daemon mode (http://www.linux-archive.org/device-mapper-development/586023-multipath-better-check-daemon-mode.html)

Benjamin Marzinski 10-11-2011 03:16 AM

multipath: better check for daemon mode
 
With the existing check, if a multipath device gets created with a
blacklisted path (because, for instance, the path was unblacklisted,
but multipathd was not reconfigured), multipathd will crash. This is
because multipathd will add the path when it adds the multipath device,
but it won't have all the necessary information to use the path. The
new check makes sure multipathd won't add blacklisted paths, simply
because they are part of a multipath device.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/dmparser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: multipath-tools-110713/libmultipath/dmparser.c
================================================== =================
--- multipath-tools-110713.orig/libmultipath/dmparser.c
+++ multipath-tools-110713/libmultipath/dmparser.c
@@ -13,6 +13,7 @@
#include "structs.h"
#include "util.h"
#include "debug.h"
+#include "config.h"

#define WORD_SIZE 64

@@ -330,7 +331,7 @@ disassemble_map (vector pathvec, char *
strncpy(pp->dev_t, word, BLK_DEV_SIZE);

/* Only call this in multipath client mode */
- if (!mpp->waiter && store_path(pathvec, pp))
+ if (!conf->daemon && store_path(pathvec, pp))
goto out1;
}
FREE(word);

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 12:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.