FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 12-14-2007, 11:27 PM
 
Default multipath-tools libmultipath/config.c libmulti ...

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2007-12-15 00:27:40

Modified files:
libmultipath : config.c config.h dict.c
multipathd : Makefile main.c
Added files:
multipathd : clone_platform.h copy.c copy.h

Log message:
Add private namespace and callout cache support back to multipath. This seems
less invasive than the libprio work in upstream, which will go into the next
major release. Fixes bz #355961

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.19.2.3&r2=1.19.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.18.2.1&r2=1.18.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.17.2.2&r2=1.17.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/clone_platform.h.diff?cvsroot=dm&only_with_tag=RHE L5_FC6&r1=NONE&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/copy.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= NONE&r2=1.5.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/copy.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= NONE&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/Makefile.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.14&r2=1.14.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.69.2.2&r2=1.69.2.3

--- multipath-tools/libmultipath/config.c 2007/11/10 00:01:59 1.19.2.3
+++ multipath-tools/libmultipath/config.c 2007/12/15 00:27:39 1.19.2.4
@@ -20,6 +20,57 @@
#include "blacklist.h"
#include "defaults.h"

+/*
+ * helper function to draw a list of callout binaries found in the config file
+ */
+extern int
+push_callout(char * callout)
+{
+#if DAEMON
+ int i;
+ char *bin;
+ char *p;
+
+ /*
+ * purge command line arguments
+ */
+ p = callout;
+
+ while (*p != ' ' && *p != '')
+ p++;
+
+ if (!conf->binvec)
+ conf->binvec = vector_alloc();
+
+
+ if (!conf->binvec)
+ return 1;
+
+ /*
+ * if this callout is already stored in binvec, don't store it twice
+ */
+ vector_foreach_slot (conf->binvec, bin, i)
+ if (memcmp(bin, callout, p - callout) == 0)
+ return 0;
+
+ /*
+ * else, store it
+ */
+ bin = MALLOC((p - callout) + 1);
+
+ if (!bin)
+ return 1;
+
+ strncpy(bin, callout, p - callout);
+
+ if (!vector_alloc_slot(conf->binvec))
+ return 1;
+
+ vector_set_slot(conf->binvec, bin);
+#endif
+ return 0;
+}
+
static struct hwentry *
find_hwe_strmatch (vector hwtable, char * vendor, char * product)
{
@@ -255,10 +306,12 @@
if (!dhwe->product || !(hwe->product = set_param_str(dhwe->product)))
goto out;

- if (dhwe->getuid && !(hwe->getuid = set_param_str(dhwe->getuid)))
+ if (dhwe->getuid && (!(hwe->getuid = set_param_str(dhwe->getuid)) ||
+ push_callout(dhwe->getuid)))
goto out;

- if (dhwe->getprio && !(hwe->getprio = set_param_str(dhwe->getprio)))
+ if (dhwe->getprio && (!(hwe->getprio = set_param_str(dhwe->getprio)) ||
+ push_callout(dhwe->getprio)))
goto out;

if (dhwe->features && !(hwe->features = set_param_str(dhwe->features)))
@@ -337,6 +390,7 @@
free_mptable(conf->mptable);
free_hwtable(conf->hwtable);
free_keywords(conf->keywords);
+ free_strvec(conf->binvec);
FREE(conf);
}

@@ -435,8 +489,11 @@
if (conf->udev_dir == NULL)
conf->udev_dir = set_default(DEFAULT_UDEVDIR);

- if (conf->getuid == NULL)
+ if (conf->getuid == NULL){
conf->getuid = set_default(DEFAULT_GETUID);
+ if (push_callout(conf->getuid))
+ goto out;
+ }

if (conf->features == NULL)
conf->features = set_default(DEFAULT_FEATURES);
--- multipath-tools/libmultipath/config.h 2007/01/10 20:08:08 1.18.2.1
+++ multipath-tools/libmultipath/config.h 2007/12/15 00:27:39 1.18.2.2
@@ -76,6 +76,7 @@
vector keywords;
vector mptable;
vector hwtable;
+ vector binvec;

vector blist_devnode;
vector blist_wwid;
@@ -87,6 +88,8 @@

struct config * conf;

+extern int push_callout(char * callout);
+
struct hwentry * find_hwe (vector hwtable, char * vendor, char * product);
struct mpentry * find_mpe (char * wwid);
char * get_mpe_wwid (char * alias);
--- multipath-tools/libmultipath/dict.c 2007/11/10 00:01:59 1.17.2.2
+++ multipath-tools/libmultipath/dict.c 2007/12/15 00:27:39 1.17.2.3
@@ -78,7 +78,7 @@
if (!conf->getuid)
return 1;

- return 0;
+ return push_callout(conf->getuid);
}

static int
@@ -93,9 +93,10 @@
!strcmp(conf->getprio, "none")) {
FREE(conf->getprio);
conf->getprio = NULL;
+ return 0;
}

- return 0;
+ return push_callout(conf->getprio);
}

static int
@@ -510,7 +511,7 @@
if (!hwe->getuid)
return 1;

- return 0;
+ return push_callout(hwe->getuid);
}

static int
@@ -597,9 +598,10 @@
if (strlen(hwe->getprio) == 4 && !strcmp(hwe->getprio, "none")) {
FREE(hwe->getprio);
hwe->getprio = NULL;
+ return 0;
}

- return 0;
+ return push_callout(hwe->getprio);
}

static int
--- multipath-tools/multipathd/Makefile 2006/06/06 18:32:44 1.14
+++ multipath-tools/multipathd/Makefile 2007/12/15 00:27:39 1.14.2.1
@@ -19,7 +19,7 @@
#
# object files
#
-OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o
+OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o copy.o cli_handlers.o
$(MULTIPATHLIB)-glibc.a $(CHECKERSLIB)-glibc.a


--- multipath-tools/multipathd/main.c 2007/06/15 19:03:02 1.69.2.2
+++ multipath-tools/multipathd/main.c 2007/12/15 00:27:40 1.69.2.3
@@ -10,6 +10,7 @@
#include <wait.h>
#include <sys/mman.h>
#include <sys/types.h>
+#include <sys/mount.h>
#include <fcntl.h>
#include <errno.h>

@@ -57,10 +58,14 @@
#include "cli_handlers.h"
#include "lock.h"
#include "waiter.h"
+#include "clone_platform.h"
+#include "copy.h"

#define FILE_NAME_SIZE 256
#define CMDSIZE 160

+#define CALLOUT_DIR "/var/cache/multipathd"
+
#define LOG_MSG(a,b)
if (strlen(b)) condlog(a, "%s: %s", pp->dev, b);

@@ -746,6 +751,9 @@
if (status != 0)
fprintf(stderr, "bad exit status. see daemon.log
");

+ condlog(3, "umount ramfs");
+ umount(CALLOUT_DIR);
+
condlog(3, "unlink pidfile");
unlink(DEFAULT_PIDFILE);

@@ -1179,6 +1187,108 @@
return NULL;
}

+
+#ifdef CLONE_NEWNS
+static int
+prepare_namespace(void)
+{
+ mode_t mode = S_IRWXU;
+ struct stat * buf;
+ char ramfs_args[64];
+ int i;
+ int fd;
+ char * bin;
+ size_t size = 10;
+ struct stat statbuf;
+
+ if (!conf->binvec)
+ return 0;
+ buf = (struct stat *)MALLOC(sizeof(struct stat));
+
+ /*
+ * create a temp mount point for ramfs
+ */
+ if (stat(CALLOUT_DIR, buf) < 0) {
+ if (mkdir(CALLOUT_DIR, mode) < 0) {
+ condlog(0, "cannot create " CALLOUT_DIR);
+ FREE(buf);
+ return -1;
+ }
+ condlog(4, "created " CALLOUT_DIR);
+ }
+ FREE(buf);
+
+ /*
+ * compute the optimal ramdisk size
+ */
+ vector_foreach_slot (conf->binvec, bin,i) {
+ if ((fd = open(bin, O_RDONLY)) < 0) {
+ condlog(0, "cannot open %s : %s
", bin,
+ strerror(errno));
+ continue;
+ }
+ if (fstat(fd, &statbuf) < 0) {
+ condlog(0, "cannot stat %s", bin);
+ return -1;
+ }
+ size += statbuf.st_size;
+ close(fd);
+ }
+ condlog(3, "ramfs maxsize is %u", (unsigned int) size);
+
+ /*
+ * mount the ramfs
+ */
+ if (safe_sprintf(ramfs_args, "maxsize=%u", (unsigned int) size)) {
+ condlog(0, "ramfs_args too small
");
+ return -1;
+ }
+ if (mount(NULL, CALLOUT_DIR, "ramfs", MS_SYNCHRONOUS, ramfs_args) < 0) {
+ condlog(0, "cannot mount ramfs on " CALLOUT_DIR);
+ return -1;
+ }
+ condlog(4, "mount ramfs on " CALLOUT_DIR);
+
+ /*
+ * populate the ramfs with callout binaries
+ */
+ vector_foreach_slot (conf->binvec, bin,i) {
+ if (copytodir(bin, CALLOUT_DIR) < 0) {
+ condlog(0, "cannot copy %s in ramfs : %s", bin,
+ strerror(errno));
+ continue;
+ }
+ condlog(4, "cp %s in ramfs", bin);
+ }
+ free_strvec(conf->binvec);
+ conf->binvec = NULL;
+
+ /*
+ * bind the ramfs to :
+ * /sbin : default home of multipath ...
+ * /bin : default home of scsi_id ...
+ * /tmp : home of scsi_id temp files
+ */
+ if (mount(CALLOUT_DIR, "/sbin", NULL, MS_BIND, NULL) < 0) {
+ condlog(0, "cannot bind ramfs on /sbin");
+ return -1;
+ }
+ condlog(4, "bind ramfs on /sbin");
+ if (mount(CALLOUT_DIR, "/bin", NULL, MS_BIND, NULL) < 0) {
+ condlog(0, "cannot bind ramfs on /bin");
+ return -1;
+ }
+ condlog(4, "bind ramfs on /bin");
+ if (mount(CALLOUT_DIR, "/tmp", NULL, MS_BIND, NULL) < 0) {
+ condlog(0, "cannot bind ramfs on /tmp");
+ return -1;
+ }
+ condlog(4, "bind ramfs on /tmp");
+
+ return 0;
+}
+#endif
+
static void *
signal_set(int signo, void (*func) (int))
{
@@ -1263,13 +1373,46 @@
fclose(fp);
}

+static void
+setup_daemon(void)
+{
+ int in_fd, out_fd;
+
+ in_fd = open("/dev/null", O_RDONLY);
+ if (in_fd < 0){
+ fprintf(stderr, "cannot open /dev/null for input : %s
",
+ strerror(errno));
+ _exit(0);
+ }
+ out_fd = open("/dev/console", O_WRONLY);
+ if (out_fd < 0){
+ fprintf(stderr, "cannot open /dev/console for output : %s
",
+ strerror(errno));
+ _exit(0);
+ }
+
+ close(STDIN_FILENO);
+ dup(in_fd);
+ close(STDOUT_FILENO);
+ dup(out_fd);
+ close(STDERR_FILENO);
+ dup(out_fd);
+
+ close(in_fd);
+ close(out_fd);
+ chdir("/");
+ umask(0);
+}
+
static int
child (void * param)
{
pthread_t check_thr, uevent_thr, uxlsnr_thr;
pthread_attr_t attr;
struct vectors * vecs;
+ unsigned long new_ns = (unsigned long)param;

+ setup_daemon();
mlockall(MCL_CURRENT | MCL_FUTURE);

if (logsink)
@@ -1309,6 +1452,12 @@
condlog(0, "can not find sysfs mount point");
exit(1);
}
+#ifdef CLONE_NEWNS
+ if (new_ns && prepare_namespace() < 0) {
+ condlog(0, "cannot prepare namespace");
+ exit(1);
+ }
+#endif

/*
* fetch and configure both paths and multipaths
@@ -1376,7 +1525,9 @@
daemonize(void)
{
int pid;
- int in_fd, out_fd;
+#ifdef CLONE_NEWNS
+ void *child_stack;
+#endif

if( (pid = fork()) < 0){
fprintf(stderr, "Failed first fork : %s
", strerror(errno));
@@ -1387,36 +1538,37 @@

setsid();

- if ( (pid = fork()) < 0)
- fprintf(stderr, "Failed second fork : %s
", strerror(errno));
- else if (pid != 0)
- _exit(0);
+#ifdef CLONE_NEWNS

- in_fd = open("/dev/null", O_RDONLY);
- if (in_fd < 0){
- fprintf(stderr, "cannot open /dev/null for input : %s
",
+ child_stack = (void *)malloc(CHILD_STACK_SIZE);
+ if (!child_stack) {
+ fprintf(stderr, "Failed to allocate child stack : %s
",
strerror(errno));
- _exit(0);
+ _exit(1);
}
- out_fd = open("/dev/console", O_WRONLY);
- if (out_fd < 0){
- fprintf(stderr, "cannot open /dev/console for output : %s
",
- strerror(errno));
- _exit(0);
+# if defined(__hppa__) || defined(__powerpc64__)
+ pid = clone(child, child_stack, CLONE_NEWNS, (void *)1);
+# elif defined(__ia64__)
+ pid = clone2(child, child_stack, CHILD_STACK_SIZE, CLONE_NEWNS,
+ (void *)1, NULL, NULL, NULL);
+# else
+ pid = clone(child, child_stack + CHILD_STACK_SIZE, CLONE_NEWNS,
+ (void *)1);
+# endif
+ if (pid < 0) {
+ fprintf(stderr, "Clone failed : %s
", strerror(errno));
+ _exit(1);
+ }
+ _exit(0);
+#else
+ if ( (pid = fork()) < 0){
+ fprintf(stderr, "Failed second fork : %s
", strerror(errno));
+ _exit(1);
}
-
- close(STDIN_FILENO);
- dup(in_fd);
- close(STDOUT_FILENO);
- dup(out_fd);
- close(STDERR_FILENO);
- dup(out_fd);
-
- close(in_fd);
- close(out_fd);
- chdir("/");
- umask(0);
- return 0;
+ if (pid != 0)
+ _exit(0);
+ return child((void *)0);
+#endif
}

int
@@ -1466,18 +1618,14 @@
}

if (!logsink)
- err = 0;
- else
+ return child((void *)0);
+ else{
err = daemonize();
+ }

if (err < 0)
- /* error */
- exit(1);
- else if (err > 0)
- /* parent dies */
- exit(0);
- else
- /* child lives */
- return (child(NULL));
+ return 1;
+ /* parent dies */
+ return 0;
}


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 10-27-2011, 09:36 PM
 
Default multipath-tools libmultipath/config.c libmulti ...

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2011-10-27 21:36:20

Modified files:
libmultipath : config.c config.h dict.c print.c
multipathd : main.c

Log message:
fix for bz #703277. When checking for mounts to keep in the multipathd
namespace, check if a necessary directory is a symlink, and if so, keep mounts
at its target, or at any parent directories. Also add a new default option,
keep_dir, to allow users to manually select directories to keep. Mounts at
these, or their parent directories will also be kept. Not applicable upstream.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.19.2.10&r2=1.19.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.18.2.15&r2=1.18.2.16
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.17.2.21&r2=1.17.2.22
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/print.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1 =1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.69.2.38&r2=1.69.2.39

--- multipath-tools/libmultipath/config.c 2011/04/05 18:41:45 1.19.2.10
+++ multipath-tools/libmultipath/config.c 2011/10/27 21:36:19 1.19.2.11
@@ -394,6 +394,7 @@
free_hwtable(conf->hwtable);
free_keywords(conf->keywords);
free_strvec(conf->binvec);
+ free_strvec(conf->keep_dirs);
FREE(conf);
}

@@ -418,6 +419,9 @@
conf->attribute_flags = 0;
conf->flush_on_last_del = 0;
conf->file_timeout = DEFAULT_FILE_TIMEOUT;
+ conf->keep_dirs = vector_alloc();
+ if (!conf->keep_dirs)
+ goto out;

/*
* read the config file
--- multipath-tools/libmultipath/config.h 2011/04/05 18:41:45 1.18.2.15
+++ multipath-tools/libmultipath/config.h 2011/10/27 21:36:20 1.18.2.16
@@ -103,6 +103,7 @@
vector mptable;
vector hwtable;
vector binvec;
+ vector keep_dirs;

vector blist_devnode;
vector blist_wwid;
--- multipath-tools/libmultipath/dict.c 2011/10/10 04:18:38 1.17.2.21
+++ multipath-tools/libmultipath/dict.c 2011/10/27 21:36:20 1.17.2.22
@@ -524,6 +524,24 @@
return 0;
}

+static int
+keep_dir_handler(vector strvec)
+{
+ char * buff;
+
+ buff = set_value(strvec);
+ if (!buff)
+ return 1;
+
+ if (!vector_alloc_slot(conf->keep_dirs)) {
+ free(buff);
+ return 1;
+ }
+ vector_set_slot(conf->keep_dirs, buff);
+
+ return 0;
+}
+
/*
* blacklist block handlers
*/
@@ -2117,6 +2135,16 @@
}

static int
+snprint_keep_dir(char * buff, int len, void * data)
+{
+ char *str = (char *)data;
+
+ if (!str || str[0] == '')
+ return 0;
+ return snprintf(buff, len, ""%s"", str);
+}
+
+static int
snprint_ble_simple (char * buff, int len, void * data)
{
struct blentry * ble = (struct blentry *)data;
@@ -2176,6 +2204,7 @@
install_keyword("fast_io_fail_tmo", &def_fast_io_fail_handler, &snprint_def_fast_io_fail);
install_keyword("dev_loss_tmo", &def_dev_loss_handler, &snprint_def_dev_loss);
install_keyword("file_timeout", &file_timeout_handler, &snprint_file_timeout);
+ install_keyword_multi("keep_dir", &keep_dir_handler, &snprint_keep_dir);
__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
__deprecated install_keyword("default_getuid_callout", &def_getuid_callout_handler, NULL);
--- multipath-tools/libmultipath/print.c 2008/08/22 21:55:43 1.5.2.3
+++ multipath-tools/libmultipath/print.c 2011/10/27 21:36:20 1.5.2.4
@@ -853,6 +853,20 @@
return len;

iterate_sub_keywords(rootkw, kw, i) {
+ if (strcmp(kw->string, "keep_dir") == 0) {
+ char *str;
+ int j;
+ if (!conf->keep_dirs)
+ continue;
+ vector_foreach_slot(conf->keep_dirs, str, j) {
+ fwd += snprint_keyword(buff + fwd, len - fwd,
+ " %k %v
", kw, str);
+ if (fwd > len)
+ return len;
+ }
+ continue;
+
+ }
fwd += snprint_keyword(buff + fwd, len - fwd, " %k %v
",
kw, NULL);
if (fwd > len)
--- multipath-tools/multipathd/main.c 2011/10/24 13:46:54 1.69.2.38
+++ multipath-tools/multipathd/main.c 2011/10/27 21:36:20 1.69.2.39
@@ -1336,6 +1336,43 @@
}

static int
+find_keep_dirs(void)
+{
+ int i, j, r;
+ char link_target[PATH_MAX];
+ char *dir;
+ char *needed_dirs[15] = { "/sbin", "/bin", "/tmp", "/usr", "/usr/lib",
+ "/etc", "/proc", "/sys", "/var", "/var/lib",
+ "/var/run", "/lib", "/lib64", "/usr/lib64",
+ "/ram" };
+ for (i = 0; i < 15; i++) {
+ r = readlink(needed_dirs[i], link_target, PATH_MAX - 1);
+ if (r <= 0)
+ continue;
+ link_target[r] = '';
+ vector_foreach_slot(conf->keep_dirs, dir, j)
+ if (strcmp(dir, link_target) == 0)
+ goto next;
+ dir = strdup(link_target);
+ if (!dir) {
+ condlog(0, "can't allocate symlink space for %s",
+ needed_dirs[i]);
+ return -1;
+ }
+ if (!vector_alloc_slot(conf->keep_dirs)) {
+ condlog(0, "can't store symlink for %s",
+ needed_dirs[i]);
+ free(dir);
+ return -1;
+ }
+ vector_set_slot(conf->keep_dirs, dir);
+next:
+ ;
+ }
+ return 0;
+}
+
+static int
unmount_extra_devs(void)
{
char buf[LINE_MAX];
@@ -1346,8 +1383,10 @@
condlog(0, "couldn't open /proc/mounts : %s", strerror(errno));
return -1;
}
-
+ find_keep_dirs();
while (fgets(buf, LINE_MAX, file)) {
+ int i;
+ char *keep;
char *end, *mnt = strchr(buf, ' ');
if (!mnt)
continue;
@@ -1358,6 +1397,17 @@
continue;
}
*end = '';
+ if (conf->keep_dirs) {
+ vector_foreach_slot(conf->keep_dirs, keep, i) {
+ int mnt_len = strlen(mnt);
+ int keep_len = strlen(keep);
+ if (strncmp(mnt, keep, mnt_len) == 0 &&
+ (mnt_len == keep_len ||
+ (mnt_len < keep_len &&
+ keep[mnt_len] == '/')))
+ goto next;
+ }
+ }
if (strcmp(mnt, "/") == 0 || strcmp(mnt, "/sbin") == 0 ||
strcmp(mnt, "/bin") == 0 || strcmp(mnt, "/tmp") == 0 ||
strcmp(mnt, "/usr") == 0 || strncmp(mnt, "/usr/lib", 8) == 0 ||
@@ -1368,9 +1418,11 @@
strncmp(mnt, "/lib64", 6) == 0 || strncmp(mnt, "/usr/lib64", 10) == 0 ||
strncmp(mnt, "/ram", 4) == 0)
continue;
- if (umount2(mnt, MNT_DETACH) < 0 && errno != ENOENT) {
- condlog(0, "failed to umount '%s' (%s). skipping", mnt, strerror(errno));
- }
+ if (umount2(mnt, MNT_DETACH) < 0 && errno != ENOENT)
+ condlog(0, "failed to umount '%s' (%s). skipping", mnt,
+ strerror(errno));
+next:
+ ;
}
fclose(file);
return 0;

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-11-2012, 11:03 PM
 
Default multipath-tools libmultipath/config.c libmulti ...

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2012-07-11 23:03:35

Modified files:
libmultipath : config.c config.h dict.c hwtable.c propsel.c
structs.h
multipathd : cli.c cli.h cli_handlers.c cli_handlers.h
main.c multipathd.init.redhat
path_priority/pp_alua: mpath_prio_alua.8

Log message:
Fix for bzs #644989, #799847, #833193, and #744231

Backport RHEL6 config changes.
Yet another fix to the ramfs.
Fixup mpath_prio_alua man page

Not applicable upstream

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.19.2.11&r2=1.19.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.18.2.17&r2=1.18.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.17.2.22&r2=1.17.2.23
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/hwtable.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6& r1=1.20.2.38&r2=1.20.2.39
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/propsel.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6& r1=1.11.2.7&r2=1.11.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/structs.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6& r1=1.18.2.10&r2=1.18.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1 .5.2.4&r2=1.5.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1 .5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli_handlers.c.diff?cvsroot=dm&only_with_tag=RHEL5 _FC6&r1=1.6.2.4&r2=1.6.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli_handlers.h.diff?cvsroot=dm&only_with_tag=RHEL5 _FC6&r1=1.3.2.3&r2=1.3.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1= 1.69.2.41&r2=1.69.2.42
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_t ag=RHEL5_FC6&r1=1.2.4.6&r2=1.2.4.7
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/path_priority/pp_alua/mpath_prio_alua.8.diff?cvsroot=dm&only_with_tag=RH EL5_FC6&r1=1.2&r2=1.2.2.1

--- multipath-tools/libmultipath/config.c 2011/10/27 21:36:19 1.19.2.11
+++ multipath-tools/libmultipath/config.c 2012/07/11 23:03:34 1.19.2.12
@@ -332,6 +332,11 @@
hwe->no_path_retry = dhwe->no_path_retry;
hwe->minio = dhwe->minio;
hwe->checker = dhwe->checker;
+ hwe->pg_timeout = dhwe->pg_timeout;
+ hwe->flush_on_last_del = dhwe->flush_on_last_del;
+ hwe->fast_io_fail = dhwe->fast_io_fail;
+ hwe->dev_loss = dhwe->dev_loss;
+ hwe->user_friendly_names = dhwe->user_friendly_names;

if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product)))
goto out;
@@ -415,7 +420,7 @@

conf->dev_type = DEV_NONE;
conf->minio = 1000;
- conf->max_fds = 0;
+ conf->max_fds = MAX_FDS_MAX;
conf->attribute_flags = 0;
conf->flush_on_last_del = 0;
conf->file_timeout = DEFAULT_FILE_TIMEOUT;
--- multipath-tools/libmultipath/config.h 2012/06/14 21:56:47 1.18.2.17
+++ multipath-tools/libmultipath/config.h 2012/07/11 23:03:34 1.18.2.18
@@ -32,6 +32,7 @@
int flush_on_last_del;
int fast_io_fail;
unsigned int dev_loss;
+ int user_friendly_names;
struct checker * checker;
char * bl_product;
};
@@ -51,6 +52,7 @@
int pg_timeout;
int attribute_flags;
int flush_on_last_del;
+ int user_friendly_names;
uid_t uid;
gid_t gid;
mode_t mode;
--- multipath-tools/libmultipath/dict.c 2011/10/27 21:36:20 1.17.2.22
+++ multipath-tools/libmultipath/dict.c 2012/07/11 23:03:34 1.17.2.23
@@ -455,7 +455,7 @@
}

static int
-names_handler(vector strvec)
+def_names_handler(vector strvec)
{
char * buff;

@@ -466,10 +466,12 @@

if ((strlen(buff) == 2 && !strcmp(buff, "no")) ||
(strlen(buff) == 1 && !strcmp(buff, "0")))
- conf->user_friendly_names = 0;
+ conf->user_friendly_names = USER_FRIENDLY_NAMES_OFF;
else if ((strlen(buff) == 3 && !strcmp(buff, "yes")) ||
(strlen(buff) == 1 && !strcmp(buff, "1")))
- conf->user_friendly_names = 1;
+ conf->user_friendly_names = USER_FRIENDLY_NAMES_ON;
+ else
+ conf->user_friendly_names = USER_FRIENDLY_NAMES_UNDEF;

FREE(buff);
return 0;
@@ -1072,6 +1074,32 @@
return 0;
}

+static int
+hw_names_handler(vector strvec)
+{
+ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
+ char * buff;
+
+ if (!hwe)
+ return 1;
+
+ buff = set_value(strvec);
+ if (!buff)
+ return 1;
+
+ if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
+ (strlen(buff) == 1 && strcmp(buff, "0") == 0))
+ hwe->user_friendly_names = USER_FRIENDLY_NAMES_OFF;
+ else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+ (strlen(buff) == 1 && strcmp(buff, "1") == 0))
+ hwe->user_friendly_names = USER_FRIENDLY_NAMES_ON;
+ else
+ hwe->user_friendly_names = USER_FRIENDLY_NAMES_UNDEF;
+
+ FREE(buff);
+ return 0;
+}
+
/*
* multipaths block handlers
*/
@@ -1426,6 +1454,32 @@
return 0;
}

+static int
+mp_names_handler(vector strvec)
+{
+ struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable);
+ char * buff;
+
+ if (!mpe)
+ return 1;
+
+ buff = set_value(strvec);
+ if (!buff)
+ return 1;
+
+ if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
+ (strlen(buff) == 1 && strcmp(buff, "0") == 0))
+ mpe->user_friendly_names = USER_FRIENDLY_NAMES_OFF;
+ else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+ (strlen(buff) == 1 && strcmp(buff, "1") == 0))
+ mpe->user_friendly_names = USER_FRIENDLY_NAMES_ON;
+ else
+ mpe->user_friendly_names = USER_FRIENDLY_NAMES_UNDEF;
+
+ FREE(buff);
+ return 0;
+}
+
/*
* config file keywords printing
*/
@@ -1613,6 +1667,19 @@
}

static int
+snprint_mp_user_friendly_names (char * buff, int len, void * data)
+{
+ struct mpentry * mpe = (struct mpentry *)data;
+
+ if (mpe->user_friendly_names == USER_FRIENDLY_NAMES_UNDEF)
+ return 0;
+ else if (mpe->user_friendly_names == USER_FRIENDLY_NAMES_OFF)
+ return snprintf(buff, len, "no");
+ else
+ return snprintf(buff, len, "yes");
+}
+
+static int
snprint_hw_fast_io_fail(char * buff, int len, void * data)
{
struct hwentry * hwe = (struct hwentry *)data;
@@ -1851,6 +1918,19 @@
}

static int
+snprint_hw_user_friendly_names (char * buff, int len, void * data)
+{
+ struct hwentry * hwe = (struct hwentry *)data;
+
+ if (hwe->user_friendly_names == USER_FRIENDLY_NAMES_UNDEF)
+ return 0;
+ else if (hwe->user_friendly_names == USER_FRIENDLY_NAMES_OFF)
+ return snprintf(buff, len, "no");
+ else
+ return snprintf(buff, len, "yes");
+}
+
+static int
snprint_def_polling_interval (char * buff, int len, void * data)
{
return snprintf(buff, len, "%i", conf->checkint);
@@ -2053,10 +2133,12 @@
{
switch (conf->queue_without_daemon) {
case QUE_NO_DAEMON_OFF:
- return snprintf(buff, len, "no");
case QUE_NO_DAEMON_UNDEF:
+ return snprintf(buff, len, "no");
case QUE_NO_DAEMON_ON:
return snprintf(buff, len, "yes");
+ case QUE_NO_DAEMON_FORCE:
+ return snprintf(buff, len, "forced");
}
return 0;
}
@@ -2103,10 +2185,10 @@
static int
snprint_def_user_friendly_names (char * buff, int len, void * data)
{
- if (!conf->user_friendly_names)
+ if (conf->user_friendly_names == USER_FRIENDLY_NAMES_ON)
+ return snprintf(buff, len, "yes");
+ else
return snprintf(buff, len, "no");
-
- return snprintf(buff, len, "yes");
}

static int
@@ -2194,7 +2276,7 @@
install_keyword("flush_on_last_del", &def_flush_on_last_del_handler, &snprint_def_flush_on_last_del);
install_keyword("checker_timeout", &def_checker_timeout_handler, &snprint_def_checker_timeout);
install_keyword("pg_timeout", &def_pg_timeout_handler, &snprint_def_pg_timeout);
- install_keyword("user_friendly_names", &names_handler, &snprint_def_user_friendly_names);
+ install_keyword("user_friendly_names", &def_names_handler, &snprint_def_user_friendly_names);
install_keyword("pg_prio_calc", &def_pg_prio_calc_handler, &snprint_def_pg_prio_calc);
install_keyword("log_checker_err", &def_log_checker_err_handler, &snprint_def_log_checker_err);
install_keyword("bindings_file", &bindings_file_handler, &snprint_def_bindings_file);
@@ -2261,6 +2343,7 @@
install_keyword("pg_timeout", &hw_pg_timeout_handler, &snprint_hw_pg_timeout);
install_keyword("fast_io_fail_tmo", &hw_fast_io_fail_handler, &snprint_hw_fast_io_fail);
install_keyword("dev_loss_tmo", &hw_dev_loss_handler, &snprint_hw_dev_loss);
+ install_keyword("user_friendly_names", &hw_names_handler, &snprint_hw_user_friendly_names);
install_sublevel_end();

install_keyword_root("multipaths", &multipaths_handler);
@@ -2280,5 +2363,6 @@
install_keyword("mode", &mp_mode_handler, &snprint_mp_mode);
install_keyword("uid", &mp_uid_handler, &snprint_mp_uid);
install_keyword("gid", &mp_gid_handler, &snprint_mp_gid);
+ install_keyword("user_friendly_names", &mp_names_handler, &snprint_mp_user_friendly_names);
install_sublevel_end();
}
--- multipath-tools/libmultipath/hwtable.c 2012/06/14 21:56:47 1.20.2.38
+++ multipath-tools/libmultipath/hwtable.c 2012/07/11 23:03:34 1.20.2.39
@@ -716,7 +716,7 @@
.product = "LUN.*",
.getuid = DEFAULT_GETUID,
.getprio = "/sbin/mpath_prio_ontap /dev/%n",
- .features = "1 queue_if_no_path",
+ .features = "3 queue_if_no_path pg_init_retries 50",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
.pgpolicy = GROUP_BY_PRIO,
@@ -724,7 +724,7 @@
.rr_weight = RR_WEIGHT_NONE,
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = 128,
- .checker_name = DIRECTIO,
+ .checker_name = TUR,
},
/*
* IBM NSeries (NETAPP) controller family
--- multipath-tools/libmultipath/propsel.c 2012/06/14 21:56:47 1.11.2.7
+++ multipath-tools/libmultipath/propsel.c 2012/07/11 23:03:34 1.11.2.8
@@ -156,6 +156,18 @@
return 0;
}

+static int
+want_user_friendly_names(struct multipath * mp)
+{
+ if (mp->mpe &&
+ mp->mpe->user_friendly_names != USER_FRIENDLY_NAMES_UNDEF)
+ return (mp->mpe->user_friendly_names == USER_FRIENDLY_NAMES_ON);
+ if (mp->hwe &&
+ mp->hwe->user_friendly_names != USER_FRIENDLY_NAMES_UNDEF)
+ return (mp->hwe->user_friendly_names == USER_FRIENDLY_NAMES_ON);
+ return (conf->user_friendly_names == USER_FRIENDLY_NAMES_ON);
+}
+
extern int
select_alias (struct multipath * mp)
{
@@ -163,7 +175,7 @@
mp->alias = mp->mpe->alias;
else {
mp->alias = NULL;
- if (conf->user_friendly_names)
+ if (want_user_friendly_names(mp))
mp->alias = get_user_friendly_alias(mp->wwid,
conf->bindings_file,
conf->bindings_read_only);
--- multipath-tools/libmultipath/structs.h 2011/10/10 03:03:17 1.18.2.10
+++ multipath-tools/libmultipath/structs.h 2012/07/11 23:03:34 1.18.2.11
@@ -82,6 +82,7 @@
QUE_NO_DAEMON_UNDEF,
QUE_NO_DAEMON_OFF,
QUE_NO_DAEMON_ON,
+ QUE_NO_DAEMON_FORCE,
};

enum pg_prio_calc_states {
@@ -94,6 +95,12 @@
LOG_CHKR_ERR_ONCE,
};

+enum user_friendly_names_states {
+ USER_FRIENDLY_NAMES_UNDEF,
+ USER_FRIENDLY_NAMES_OFF,
+ USER_FRIENDLY_NAMES_ON,
+};
+
struct scsi_idlun {
int dev_id;
int host_unique_id;
--- multipath-tools/multipathd/cli.c 2009/05/06 17:26:44 1.5.2.4
+++ multipath-tools/multipathd/cli.c 2012/07/11 23:03:34 1.5.2.5
@@ -129,6 +129,7 @@
r += add_key(keys, "resume", RESUME, 0);
r += add_key(keys, "reinstate", REINSTATE, 0);
r += add_key(keys, "fail", FAIL, 0);
+ r += add_key(keys, "forcequeueing", FORCEQ, 0);
r += add_key(keys, "disablequeueing", DISABLEQ, 0);
r += add_key(keys, "restorequeueing", RESTOREQ, 0);
r += add_key(keys, "resize", RESIZE, 0);
@@ -140,6 +141,7 @@
r += add_key(keys, "multipath", MAP, 1);
r += add_key(keys, "group", GROUP, 1);
r += add_key(keys, "reconfigure", RECONFIGURE, 0);
+ r += add_key(keys, "daemon", MPATH_DAEMON, 0);
r += add_key(keys, "status", STATUS, 0);
r += add_key(keys, "stats", STATS, 0);
r += add_key(keys, "topology", TOPOLOGY, 0);
--- multipath-tools/multipathd/cli.h 2008/09/19 03:27:08 1.5.2.3
+++ multipath-tools/multipathd/cli.h 2012/07/11 23:03:34 1.5.2.4
@@ -7,6 +7,7 @@
__RESUME,
__REINSTATE,
__FAIL,
+ __FORCEQ,
__DISABLEQ,
__RESTOREQ,
__RESIZE,
@@ -16,6 +17,7 @@
__MAP,
__GROUP,
__RECONFIGURE,
+ __MPATH_DAEMON,
__STATUS,
__STATS,
__TOPOLOGY,
@@ -32,6 +34,7 @@
#define RESUME (1 << __RESUME)
#define REINSTATE (1 << __REINSTATE)
#define FAIL (1 << __FAIL)
+#define FORCEQ (1 << __FORCEQ)
#define DISABLEQ (1 << __DISABLEQ)
#define RESTOREQ (1 << __RESTOREQ)
#define RESIZE (1 << __RESIZE)
@@ -41,6 +44,7 @@
#define MAP (1 << __MAP)
#define GROUP (1 << __GROUP)
#define RECONFIGURE (1 << __RECONFIGURE)
+#define MPATH_DAEMON (1 << __MPATH_DAEMON)
#define STATUS (1 << __STATUS)
#define STATS (1 << __STATS)
#define TOPOLOGY (1 << __TOPOLOGY)
--- multipath-tools/multipathd/cli_handlers.c 2008/09/19 04:00:21 1.6.2.4
+++ multipath-tools/multipathd/cli_handlers.c 2012/07/11 23:03:34 1.6.2.5
@@ -338,6 +338,25 @@
}

int
+cli_force_no_daemon_q(void * v, char ** reply, int * len, void * data)
+{
+ condlog(2, "force queue_without_daemon (operator)");
+ if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF ||
+ conf->queue_without_daemon == QUE_NO_DAEMON_UNDEF)
+ conf->queue_without_daemon = QUE_NO_DAEMON_FORCE;
+ return 0;
+}
+
+int
+cli_restore_no_daemon_q(void * v, char ** reply, int * len, void * data)
+{
+ condlog(2, "restore queue_without_daemon (operator)");
+ if (conf->queue_without_daemon == QUE_NO_DAEMON_FORCE)
+ conf->queue_without_daemon = QUE_NO_DAEMON_OFF;
+ return 0;
+}
+
+int
cli_restore_queueing(void *v, char **reply, int *len, void *data)
{
struct vectors * vecs = (struct vectors *)data;
--- multipath-tools/multipathd/cli_handlers.h 2008/09/19 03:27:08 1.3.2.3
+++ multipath-tools/multipathd/cli_handlers.h 2012/07/11 23:03:34 1.3.2.4
@@ -15,6 +15,8 @@
int cli_reconfigure(void * v, char ** reply, int * len, void * data);
int cli_disable_queueing(void * v, char ** reply, int * len, void * data);
int cli_disable_all_queueing(void * v, char ** reply, int * len, void * data);
+int cli_force_no_daemon_q(void * v, char ** reply, int * len, void * data);
+int cli_restore_no_daemon_q(void * v, char ** reply, int * len, void * data);
int cli_restore_queueing(void * v, char ** reply, int * len, void * data);
int cli_restore_all_queueing(void * v, char ** reply, int * len, void * data);
int cli_resize(void * v, char ** reply, int * len, void * data);
--- multipath-tools/multipathd/main.c 2012/06/14 21:56:47 1.69.2.41
+++ multipath-tools/multipathd/main.c 2012/07/11 23:03:34 1.69.2.42
@@ -790,6 +790,8 @@
add_handler(RESUME+MAP, cli_resume);
add_handler(REINSTATE+PATH, cli_reinstate);
add_handler(FAIL+PATH, cli_fail);
+ add_handler(FORCEQ+MPATH_DAEMON, cli_force_no_daemon_q);
+ add_handler(RESTOREQ+MPATH_DAEMON, cli_restore_no_daemon_q);
add_handler(DISABLEQ+MAP, cli_disable_queueing);
add_handler(RESTOREQ+MAP, cli_restore_queueing);
add_handler(DISABLEQ+MAPS, cli_disable_all_queueing);
@@ -1423,7 +1425,8 @@
strcmp(mnt, "/usr") == 0 || strncmp(mnt, "/usr/lib", 8) == 0 ||
strcmp(mnt, "/etc") == 0 || strncmp(mnt, "/proc", 5) == 0 ||
strncmp(mnt, "/dev", 4) == 0 || strncmp(mnt, "/sys", 4) == 0 ||
- strcmp(mnt, "/var") == 0 || strncmp(mnt, "/var/lib", 8) == 0 ||
+ strcmp(mnt, "/var") == 0 || strcmp(mnt, "/var/lib") == 0 ||
+ strcmp(mnt, "/var/lib/multipath") == 0 ||
strncmp(mnt, "/var/run", 8) == 0 || strncmp(mnt, "/lib", 4) == 0 ||
strncmp(mnt, "/lib64", 6) == 0 || strncmp(mnt, "/usr/lib64", 10) == 0 ||
strncmp(mnt, "/ram", 4) == 0)
@@ -1529,6 +1532,9 @@
free_strvec(conf->binvec);
conf->binvec = NULL;

+ if (unmount_extra_devs() < 0)
+ return -1;
+
/*
* bind the ramfs to :
* /sbin : default home of multipath ...
@@ -1550,8 +1556,6 @@
return -1;
}
condlog(4, "bind ramfs on /tmp");
- if (unmount_extra_devs() < 0)
- return -1;
return 0;
}
#endif
@@ -1784,7 +1788,8 @@
block_signal(SIGHUP, NULL);
lock(vecs->lock);
exitting = 1;
- if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF)
+ if (conf->queue_without_daemon == QUE_NO_DAEMON_OFF ||
+ conf->queue_without_daemon == QUE_NO_DAEMON_UNDEF)
vector_foreach_slot(vecs->mpvec, mpp, i)
dm_queue_if_no_path(mpp->alias, 0);
remove_maps(vecs, stop_waiter_thread);
--- multipath-tools/multipathd/multipathd.init.redhat 2009/08/31 21:58:52 1.2.4.6
+++ multipath-tools/multipathd/multipathd.init.redhat 2012/07/11 23:03:34 1.2.4.7
@@ -70,14 +70,16 @@
echo
}

-stop() {
+check_root() {
root_dev=$(awk '{ if ($1 !~ /^[ ]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
dm_num=`dmsetup info -c --noheadings -o minor $root_dev 2> /dev/null`
if [ $? -eq 0 ]; then
root_dm_device="dm-$dm_num"
[ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
fi
+}

+stop() {
echo -n $"Stopping $prog daemon: "
killproc $DAEMON
RETVAL=$?
@@ -85,7 +87,12 @@
echo
}

+force_queue_without_daemon() {
+ $DAEMON -k"forcequeueing daemon"
+}
+
restart() {
+ force_queue_without_daemon
stop
start
}
@@ -103,6 +110,7 @@
start
;;
stop)
+ check_root
stop
;;
reload)
--- multipath-tools/path_priority/pp_alua/mpath_prio_alua.8 2006/08/02 21:37:23 1.2
+++ multipath-tools/path_priority/pp_alua/mpath_prio_alua.8 2012/07/11 23:03:34 1.2.2.1
@@ -122,7 +122,7 @@
group_by_prio
.TP
.B prio_callout
-"/sbin/mpath_prio_alua -d/tmp %d"
+"/sbin/mpath_prio_alua /dev/%n"
.TP
.B features
"1 queue_if_no_path"
@@ -144,12 +144,6 @@
.RB "characters long (for " vendor ") and 16 characters long (for " product ")."
The strings have to be padded with blanks if necessary.
.IP (bu
-If you are working with hotpluggable devices whose device nodes are created
-by udev you should use the %d flag in the
-.BR prio_callout " statement."
-This is because a short time elapses between the devices being available
-and udev creating the device nodes.
-.IP (bu
If under certain circumstances your storage subsystem temporarily reports
.RB "failures on all paths, you should use the " features " statement showed"
in the example.

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

Thread Tools




All times are GMT. The time now is 08:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org