device-mapper-multipath/0008-RH-multipathd-blacklist-all-by-default.patch
Benjamin Marzinski 91daccef68 Updated to latest upstream 0.4.9 code : multipath-tools-120613.tgz
(git commit id: cb0f7127ba90ab5e8e71fc534a0a16cdbe96a88f)
Add 0001-RH-remove_callout.patch
  * multipath no longer uses the getuid callout.  It now gets the
    wwid from the udev database or the environment variables
Add 0004-RH-fix-cciss-names.patch
  * convert cciss device names from cciss/cXdY to sysfs style cciss!cXdY
Split 0009-RH-add-find-multipaths.patch into 0002-RH-add-wwids-file.patch
      and 0010-RH-add-find-multipaths.patch
Add 0016-RH-change-configs.patch
  * default fast_io_fail to 5 and don't set the path selector in the
    builtin configs.
Resolves: bz #831978
2012-06-28 12:41:03 -05:00

65 lines
2.1 KiB
Diff

From 61b2002c6b2752c15b431e400cd614edc8c5b039 Mon Sep 17 00:00:00 2001
From: Fabio M. Di Nitto <fdinitto@redhat.com>
Date: Mon, 19 Oct 2009 07:05:45 +0200
Subject: [PATCH 09/12] RH: multipathd blacklist all by default
If there is no configuration installed on the system, blacklist
everything by default.
BZ#528059
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 e7e962e... 5aa1ab0... M libmultipath/config.c
:100644 100644 86b1320... 7e90e75... M libmultipath/config.h
libmultipath/config.c | 16 ++++++++++++++++
libmultipath/config.h | 1 +
2 files changed, 17 insertions(+)
Index: multipath-tools-120518/libmultipath/config.c
===================================================================
--- multipath-tools-120518.orig/libmultipath/config.c
+++ multipath-tools-120518/libmultipath/config.c
@@ -21,6 +21,7 @@
#include "defaults.h"
#include "prio.h"
#include "devmapper.h"
+#include "version.h"
static int
hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2)
@@ -549,6 +550,21 @@ load_config (char * file)
} else {
init_keywords();
+ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
+ condlog(0, "A default multipath.conf file is located at");
+ condlog(0, "/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf", MULTIPATH_VERSION(VERSION_CODE));
+ if (conf->blist_devnode == NULL) {
+ conf->blist_devnode = vector_alloc();
+ if (!conf->blist_devnode) {
+ condlog(0, "cannot allocate blacklist\n");
+ goto out;
+ }
+ }
+ if (store_ble(conf->blist_devnode, strdup(".*"),
+ ORIGIN_NO_CONFIG)) {
+ condlog(0, "cannot store default no-config blacklist\n");
+ goto out;
+ }
}
/*
Index: multipath-tools-120518/libmultipath/config.h
===================================================================
--- multipath-tools-120518.orig/libmultipath/config.h
+++ multipath-tools-120518/libmultipath/config.h
@@ -6,6 +6,7 @@
#define ORIGIN_DEFAULT 0
#define ORIGIN_CONFIG 1
+#define ORIGIN_NO_CONFIG 2
/*
* In kernel, fast_io_fail == 0 means immediate failure on rport delete.