multipath-tools/.git
9 months agoBump version code to 0.6.2 0.6.2
Christophe Varoqui [Fri, 22 Jul 2016 09:38:14 +0000 (11:38 +0200)]
Bump version code to 0.6.2

9 months agomultipath-tools: replace <wait.h> with <sys/wait.h>
Xose Vazquez Perez [Thu, 21 Jul 2016 22:01:15 +0000 (00:01 +0200)]
multipath-tools: replace <wait.h> with <sys/wait.h>

The standard place of wait.h is under /usr/include/sys/
Spotted by musl libc.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace <sys/poll.h> with <poll.h>
Xose Vazquez Perez [Thu, 21 Jul 2016 19:29:28 +0000 (21:29 +0200)]
multipath-tools: replace <sys/poll.h> with <poll.h>

The standard place of poll.h is in /usr/include/
Spotted by musl libc.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: memory.h is referred to the local header
Xose Vazquez Perez [Wed, 20 Jul 2016 13:15:49 +0000 (15:15 +0200)]
multipath-tools: memory.h is referred to the local header

It could be removed from these files because it's already included in
the hierarchy of the headers. As it's shown in the headers tree,
(multipathd/cli.c): https://drive.google.com/file/d/0B_B6YmEmO7cDeWVaMDViekRldW8

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: regex.h and errno.h are standard headers
Xose Vazquez Perez [Tue, 19 Jul 2016 20:54:35 +0000 (22:54 +0200)]
multipath-tools: regex.h and errno.h are standard headers

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: memory.h is a local header in libmultipath/checkers/emc_clariion.c
Xose Vazquez Perez [Tue, 19 Jul 2016 18:10:45 +0000 (20:10 +0200)]
multipath-tools: memory.h is a local header in libmultipath/checkers/emc_clariion.c

Added in 57a6c5c7.
But it could be removed because it's already included in "checkers.h"

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: memory.h is a local header in multipathd/uxclnt.c
Xose Vazquez Perez [Tue, 19 Jul 2016 17:53:45 +0000 (19:53 +0200)]
multipath-tools: memory.h is a local header in multipathd/uxclnt.c

If it is removed, the compiler warns: "undefined reference to `FREE'"

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: put a space between #include and the header file
Xose Vazquez Perez [Mon, 18 Jul 2016 14:58:14 +0000 (16:58 +0200)]
multipath-tools: put a space between #include and the header file

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
9 months agomultipath-tools: replace <> with "" for local headers
Xose Vazquez Perez [Mon, 18 Jul 2016 14:42:32 +0000 (16:42 +0200)]
multipath-tools: replace <> with "" for local headers

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
9 months agomultipath-tools: remove final \ in fprintf
Xose Vazquez Perez [Mon, 18 Jul 2016 13:23:59 +0000 (15:23 +0200)]
multipath-tools: remove final \ in fprintf

Useless.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace leading spaces with tabs
Xose Vazquez Perez [Mon, 18 Jul 2016 12:27:07 +0000 (14:27 +0200)]
multipath-tools: replace leading spaces with tabs

replace ^8x(1,2,3,4,5,6 and 7) spaces with tabs.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agoDocument the new detect_prio behaviour wrt sysfs alua files
Christophe Varoqui [Fri, 22 Jul 2016 09:23:57 +0000 (11:23 +0200)]
Document the new detect_prio behaviour wrt sysfs alua files

This part of Hannes patch needed rebasing.

9 months agomultipathd: fix memory leak in reconfigure()
tang.junhui [Mon, 18 Jul 2016 12:14:31 +0000 (20:14 +0800)]
multipathd: fix memory leak in reconfigure()

Problem:
Memory leak exists in reconfigure() when multipathd command reconfigure is executed.

Reasons:
 * The following judgment condition is not satisfied when there is no path,
   free_pathvec() is not called to free the vector of vecs->pathvec:
       if (VECTOR_SIZE(vecs->pathvec))
           free_pathvec(vecs->pathvec, FREE_PATHS);
 * Then the vecs->pathvec is set to NULL, so the vector memory which
   vecs->pathvec pointed to is leaked:
       vecs->pathvec = NULL;

Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
9 months agomultipathd: Add 'sysfs' prioritizer
Hannes Reinecke [Fri, 15 Jul 2016 06:48:57 +0000 (08:48 +0200)]
multipathd: Add 'sysfs' prioritizer

Recent kernels have an 'access_state' attribute which allows
us to read the asymmetric access state directly from sysfs.

Signed-off-by: Hannes Reinecke <hare@suse.de>
9 months agoalua prioritizer: Fix typo 'perf'
Hannes Reinecke [Fri, 15 Jul 2016 06:48:56 +0000 (08:48 +0200)]
alua prioritizer: Fix typo 'perf'

The bit is called the 'preferred_path' bit. Nothing do to with
performance.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath: call get_vpd_uid() if no uid_attribute is set
Hannes Reinecke [Fri, 15 Jul 2016 06:48:55 +0000 (08:48 +0200)]
libmultipath: call get_vpd_uid() if no uid_attribute is set

If the uid_attribute is unset we should be calling get_vpd_uid()
directly without waiting for retrigger udev events.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath:fix loop traversed partly
zhang.kai [Thu, 14 Jul 2016 12:09:33 +0000 (20:09 +0800)]
libmultipath:fix loop traversed partly

Problem:
With each iteration of the vector_foreach_slot() loop statement,
some slots couldn't be traversed when a slot is deleted from vector.

Reasons:
Currently,loop's index 'i' is not decremented correspondingly when a slot is
deleted from vector.Meanwhile, in the vector_foreach_slot() loop, mpp is assigned
from vector newmp directly, so find_slot() could be omitted.

Signed-off-by: zhang.kai <zhang.kai16@zte.com.cn>
9 months agokpartx: Fix check whether to detach loop device
Christian Kastner [Wed, 13 Jul 2016 17:23:02 +0000 (19:23 +0200)]
kpartx: Fix check whether to detach loop device

When invoking kpartx -d $FOO with $FOO being a regular file, the intention is
to also detach the loop device backing $FOO using del_loop(), but this
currently doesn't happen, as can be seen by calling losetup -a afterwards.

This is because the check for the type of $FOO, prior to the del_loop() call, is
broken. S_ISREG() is called on a buffer that initially did contain the status of
$FOO, but was later overwritten with the status of the backing loop device.

This replaces the S_ISREG() test with a check for whether the loop device path
is not NULL. If it isn't, then we know that it contains the correct path, and
del_loop() can be called safely on that.

Reported as Debian bug #829496; that bug also has more information.

Signed-off-by: Christian Kastner <ckk@kvr.at>
9 months agomultipath-tools: add template to add new hardware
Xose Vazquez Perez [Tue, 12 Jul 2016 14:41:47 +0000 (16:41 +0200)]
multipath-tools: add template to add new hardware

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete rr_weight attribute when it is equal to default value
Xose Vazquez Perez [Mon, 11 Jul 2016 21:42:47 +0000 (23:42 +0200)]
multipath-tools: delete rr_weight attribute when it is equal to default value

71                 .rr_weight     = RR_WEIGHT_NONE,

Defaul value is already RR_WEIGHT_NONE(uniform)

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: change default path_grouping_policy from failover to group_by_prio
Xose Vazquez Perez [Mon, 11 Jul 2016 21:12:02 +0000 (23:12 +0200)]
multipath-tools: change default path_grouping_policy from failover to group_by_prio

Default value is: failover
      5                 .pgpolicy      = GROUP_BY_SERIAL,
     23                 .pgpolicy      = MULTIBUS,
     48                 .pgpolicy      = GROUP_BY_PRIO,

failover is only used by 1 device:
IBM/3303 NVDISK

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: change default failback from manual to immediate
Xose Vazquez Perez [Mon, 11 Jul 2016 21:12:01 +0000 (23:12 +0200)]
multipath-tools: change default failback from manual to immediate

Default value is: manual
      1                 .pgfailback    = 15,
      2                 .pgfailback    = 30,
     24                 .pgfailback    = FAILBACK_UNDEF,
     50                 .pgfailback    = -FAILBACK_IMMEDIATE,

manual is not used by any device.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: order keywords in multipath.conf.5
Xose Vazquez Perez [Mon, 11 Jul 2016 21:05:17 +0000 (23:05 +0200)]
multipath-tools: order keywords in multipath.conf.5

Follow the same order as multipath output (libmultipath/dict.c)

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: Document retrigger_tries and retrigger_delay in multipath.conf.5
Xose Vazquez Perez [Mon, 11 Jul 2016 21:05:16 +0000 (23:05 +0200)]
multipath-tools: Document retrigger_tries and retrigger_delay in multipath.conf.5

Added in 688aa22bfa6efb1db0bd1fa6c4d5b6789eb1a911

Minimal info, a more detailed description should be nice.

Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace -shared with its variable
Xose Vazquez Perez [Sun, 10 Jul 2016 14:22:22 +0000 (16:22 +0200)]
multipath-tools: replace -shared with its variable

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete "$BUILD" from Makefile
Xose Vazquez Perez [Sun, 10 Jul 2016 12:40:40 +0000 (14:40 +0200)]
multipath-tools: delete "$BUILD" from Makefile

Useless.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: drop "BUILD = glibc" from libmpathpersist/Makefile
Xose Vazquez Perez [Sun, 10 Jul 2016 12:10:57 +0000 (14:10 +0200)]
multipath-tools: drop "BUILD = glibc" from libmpathpersist/Makefile

Useless.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete trailing white spaces
Xose Vazquez Perez [Sat, 9 Jul 2016 23:42:44 +0000 (01:42 +0200)]
multipath-tools: delete trailing white spaces

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clean stealth whitespaces for the rest
Xose Vazquez Perez [Sun, 10 Jul 2016 10:28:17 +0000 (12:28 +0200)]
multipath-tools: clean stealth whitespaces for the rest

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clean stealth whitespaces *.[ch]
Xose Vazquez Perez [Sun, 10 Jul 2016 10:28:16 +0000 (12:28 +0200)]
multipath-tools: clean stealth whitespaces *.[ch]

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete retain_hwhandler and detect_prio attributes when they are...
Xose Vazquez Perez [Sat, 9 Jul 2016 00:48:47 +0000 (02:48 +0200)]
multipath-tools: delete retain_hwhandler and detect_prio attributes when they are equal to default values

3          .retain_hwhandler = RETAIN_HWHANDLER_ON,
    3          .detect_prio   = DETECT_PRIO_ON,

Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: enable retain_hw_handler and detect_prio by default
Xose Vazquez Perez [Sat, 9 Jul 2016 00:48:46 +0000 (02:48 +0200)]
multipath-tools: enable retain_hw_handler and detect_prio by default

Based on previous Hannes's work.

He wrote:
"And for several versions (years, even) the linux kernel has the ability
to correctly detect the device handler, so we should be making
'retain_hw_handler' the default.
And if we do this we also want to enable 'detect_prio', to ensure
we pick the correct prioritizer."

Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete pgpolicy attribute when it is equal to default value
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:48 +0000 (01:58 +0200)]
multipath-tools: delete pgpolicy attribute when it is equal to default value

1                 .pgpolicy      = FAILOVER,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete fast_io_fail attribute when it is equal to default value
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:47 +0000 (01:58 +0200)]
multipath-tools: delete fast_io_fail attribute when it is equal to default value

2                 .fast_io_fail  = 5,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete minio_rq attribute when it is equal to default value
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:46 +0000 (01:58 +0200)]
multipath-tools: delete minio_rq attribute when it is equal to default value

1                 .minio_rq      = 1,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete no_path_retry attribute when it is equal to default value
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:45 +0000 (01:58 +0200)]
multipath-tools: delete no_path_retry attribute when it is equal to default value

28                 .no_path_retry = NO_PATH_RETRY_UNDEF,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete prio_args attribute when it is equal to default value
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:44 +0000 (01:58 +0200)]
multipath-tools: delete prio_args attribute when it is equal to default value

73                 .prio_args     = NULL,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete attributes with DEFAULT_* values in hwtable.c
Xose Vazquez Perez [Fri, 8 Jul 2016 23:58:43 +0000 (01:58 +0200)]
multipath-tools: delete attributes with DEFAULT_* values in hwtable.c

48                 .features      = DEFAULT_FEATURES,
     44                 .hwhandler     = DEFAULT_HWHANDLER,
     28                 .prio_name     = DEFAULT_PRIO,
      1                 .minio         = DEFAULT_MINIO,
      1                 .minio_rq      = DEFAULT_MINIO_RQ,

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agoRevert "multipath-tools: merge OPTFLAGS into CFLAGS"
Christophe Varoqui [Fri, 22 Jul 2016 08:53:14 +0000 (10:53 +0200)]
Revert "multipath-tools: merge OPTFLAGS into CFLAGS"

This reverts commit 97ab8ba5e22fa4e84ae6749e5ff5d948332377f1.

Hannes reports Suse buildsystem is using a distinct set of flags,
required by its build process. This patch broke their build.

9 months agomultipathd: fix typo that breaks failure path
Benjamin Marzinski [Thu, 21 Jul 2016 20:59:40 +0000 (15:59 -0500)]
multipathd: fix typo that breaks failure path

There wasn't supposed to be a semicolon after the "else" when checking
paths in checkerloop().

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
9 months agomultipath-tools: document uid_attribute for scsi and dasd devices
Xose Vazquez Perez [Fri, 8 Jul 2016 22:01:48 +0000 (00:01 +0200)]
multipath-tools: document uid_attribute for scsi and dasd devices

Default for SCSI devices is ID_SERIAL, a standard udev variable.
Default for DASD devices is ID_UID, returned by dasdinfo from 390-tools package.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete INSTALL_PROGRAM from libmpathpersist/Makefile
Xose Vazquez Perez [Fri, 8 Jul 2016 16:28:21 +0000 (18:28 +0200)]
multipath-tools: delete INSTALL_PROGRAM from libmpathpersist/Makefile

It's already taken from "include ../Makefile.inc"

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: merge OPTFLAGS into CFLAGS
Xose Vazquez Perez [Fri, 8 Jul 2016 16:28:20 +0000 (18:28 +0200)]
multipath-tools: merge OPTFLAGS into CFLAGS

OPTFLAGS is not used anywhere, but maybe it's intrusive for distributions.

Cc: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
Cc: Dragan Stancevic <dragan.stancevic@canonical.com>
Cc: Louis Bouchard <louis.bouchard@canonical.com>
Cc: Ritesh Raj Sarraf <rrs@debian.org>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: install libs in a standard way
Xose Vazquez Perez [Fri, 8 Jul 2016 16:28:19 +0000 (18:28 +0200)]
multipath-tools: install libs in a standard way

Drop full path of libmpathpersist when linking,
and add a link for libmultipath.so

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: minor edit of multipath/multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:59 +0000 (19:49 +0200)]
multipath-tools: minor edit of multipath/multipath.conf.5

Add final colons and dots, acronyms in uppercase, s/1/One, ...

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add undocumented features to multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:58 +0000 (19:49 +0200)]
multipath-tools: add undocumented features to multipath.conf.5

pg_init_retries - kernel commit c9e45581a
pg_init_delay_msecs - kernel commit 4e2d19e46

Cc: Dave Wysochanski <dwysocha@redhat.com>
Cc: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: list undocumented prioritizers in multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:57 +0000 (19:49 +0200)]
multipath-tools: list undocumented prioritizers in multipath.conf.5

Some text is needed.

Cc: Olivier Lambert <lambert.olivier@gmail.com>
Cc: Manon Goo <manon.goo@dg-i.net>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add cciss_tur path_checker to multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:56 +0000 (19:49 +0200)]
multipath-tools: add cciss_tur path_checker to multipath.conf.5

cciss_tur is for HP/COMPAQ Smart Array(CCISS) controllers.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add default value for hardware_handler in multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:55 +0000 (19:49 +0200)]
multipath-tools: add default value for hardware_handler in multipath.conf.5

It's unset.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: mark hardware-dependent features in multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:54 +0000 (19:49 +0200)]
multipath-tools: mark hardware-dependent features in multipath.conf.5

Some features are hardware-dependent.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clarify HP/COMPAQ/DEC Active/Standby arrays info at multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:53 +0000 (19:49 +0200)]
multipath-tools: clarify HP/COMPAQ/DEC Active/Standby arrays info at multipath.conf.5

Options only valid for HSG80 and MSA/HSV 1x0 arrays with Active/Standby mode
exclusively, their firmware can not be upgraded to support ALUA.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clarify RDAC class info at multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:52 +0000 (19:49 +0200)]
multipath-tools: clarify RDAC class info at multipath.conf.5

RDAC(Redundant Dual Active Controller) done by LSI/Engenio/NetApp
are NetApp E-Series/F-Series and OEM arrays from IBM DELL SGI STK
and SUN.

Cc: Sean Stewart <sean.stewart@netapp.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clarify ONTAP class info at multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:51 +0000 (19:49 +0200)]
multipath-tools: clarify ONTAP class info at multipath.conf.5

ontap prio is *exclusively* for NetApp ONTAP class and OEM arrays,
as IBM NSeries.

Cc: Martin George <marting@netapp.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: clarify DGC/EMC arrays info at multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:50 +0000 (19:49 +0200)]
multipath-tools: clarify DGC/EMC arrays info at multipath.conf.5

DGC(Data General Corporation) arrays are exclusively
CLARiiON CX/AX and EMC VNX families.

Cc: Edward Goggin <egoggin@emc.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: correct and add default values in multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:49 +0000 (19:49 +0200)]
multipath-tools: correct and add default values in multipath.conf.5

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add partition_delimiter to multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:48 +0000 (19:49 +0200)]
multipath-tools: add partition_delimiter to multipath.conf.5

It was missing in defaults section.

Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add alias_prefix to multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:47 +0000 (19:49 +0200)]
multipath-tools: add alias_prefix to multipath.conf.5

It was missing in defaults section.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace bold<->italic in multipath.conf.5
Xose Vazquez Perez [Fri, 8 Jul 2016 17:49:46 +0000 (19:49 +0200)]
multipath-tools: replace bold<->italic in multipath.conf.5

Do it more readable.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipathd: fix waiter_attr resource leak
kai zhang [Wed, 6 Jul 2016 08:08:04 +0000 (16:08 +0800)]
multipathd: fix waiter_attr resource leak

As a global variable waiter_attr of thread attribute was set up in the
daemon,
however,it hasn't been destroyed when the daemon exited.
We need deinitialize waiter_attr.

9 months agolibmultipath: remove DEFAULT_CHECKER checker_name settings from hwtable
Christophe Varoqui [Fri, 8 Jul 2016 12:57:58 +0000 (14:57 +0200)]
libmultipath: remove DEFAULT_CHECKER checker_name settings from hwtable

As suggested by Xose and Hannes, no need to explicitly set to the
default value.

9 months agomultipah: fix 'multipath -p' with invalid policy
kai zhang [Wed, 6 Jul 2016 06:21:03 +0000 (14:21 +0800)]
multipah: fix 'multipath -p' with invalid policy

hi,

When we excute 'multipath -p' with invalid policy, get_pgpolicy_id()
returns IOPOLICY_UNDEF.
We should compare conf->pgpolicy_flag with IOPOLICY_UNDEF, otherwise, it
couldn't get what we want.

 ---
 multipath/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

9 months agomultipath-tools: fix dm- device filtering
Dragan Stancevic [Tue, 5 Jul 2016 20:46:57 +0000 (15:46 -0500)]
multipath-tools: fix dm- device filtering

During "service multipath-tools start" /sbin/multipath is
called on dm- devices that are filtered but due to a condition
conf->dev_type == DEV_DEVNODE in filtering code multipath
binary wasn't dropping out when hitting a dm- device. This
was due to the fact that in this case conf->dev_type is
set to DEV_UEVENT.

This is causing the logs to be filled with following
messages:

multipath: dm-6: failed to get udev uid: Invalid argument
multipath: dm-6: failed to get sysfs uid: Invalid argument
multipath: dm-6: failed to get sgio uid: No such file or directory

This change alows the filtering to happen.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Dragan Stancevic <dragan.stancevic@canonical.com>
9 months agoreadsector0: the length of the buffer wrong
kai zhang [Tue, 5 Jul 2016 11:48:53 +0000 (19:48 +0800)]
readsector0: the length of the buffer wrong

hi,

The length of the buffer is 4096, not 4069 in sg_read().

9 months agomultipathd: restore paths after reconfigure
Benjamin Marzinski [Fri, 1 Jul 2016 21:46:09 +0000 (16:46 -0500)]
multipathd: restore paths after reconfigure

multipathd has code to finish gathering the information of paths that
were not active at the time they were discovered. When the checker loop
goes to check a path, and notices that it wasn't fully initialized, it
is supposed to complete the initialization.  However the code is broken.
This means that if you reconfigure multipathd while paths are down, they
will no longer be usable. This patch makes sure that check_path will
actually rerun pathinfo to finish setting up the path, so that after the
path comes back up, it will be usable again.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
9 months agomultipath-tools: make defaults values more visible in multipath.conf.5
Xose Vazquez Perez [Sat, 2 Jul 2016 23:06:19 +0000 (01:06 +0200)]
multipath-tools: make defaults values more visible in multipath.conf.5

Put them in a new paragraph, and in bold.

Easier to read and cleaner layout.

man page in PDF at: https://drive.google.com/file/d/0B_B6YmEmO7cDVTl2djM1YkZMNFE

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace ln with a variable in makefiles
Xose Vazquez Perez [Fri, 1 Jul 2016 17:17:30 +0000 (19:17 +0200)]
multipath-tools: replace ln with a variable in makefiles

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace install with its variable in makefiles
Xose Vazquez Perez [Fri, 1 Jul 2016 17:17:29 +0000 (19:17 +0200)]
multipath-tools: replace install with its variable in makefiles

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace rm with a variable in makefiles
Xose Vazquez Perez [Fri, 1 Jul 2016 17:17:28 +0000 (19:17 +0200)]
multipath-tools: replace rm with a variable in makefiles

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace COPYING with a fresh copy from gnu.org
Xose Vazquez Perez [Thu, 30 Jun 2016 14:39:53 +0000 (16:39 +0200)]
multipath-tools: replace COPYING with a fresh copy from gnu.org

https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt
Same licence and version, with some corrections(mainly fsf address)

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace FSF address with a www pointer
Xose Vazquez Perez [Thu, 30 Jun 2016 14:39:52 +0000 (16:39 +0200)]
multipath-tools: replace FSF address with a www pointer

less prone to future modifications, new FSF licences point
exactly to this url: <http://www.gnu.org/licenses/>

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: make uninstall leaves traces behind
Xose Vazquez Perez [Thu, 30 Jun 2016 13:42:16 +0000 (15:42 +0200)]
multipath-tools: make uninstall leaves traces behind

delete mpath_persist.h and libmpathpersist.so

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: don't create /etc/init.d from make install
Xose Vazquez Perez [Thu, 30 Jun 2016 13:42:15 +0000 (15:42 +0200)]
multipath-tools: don't create /etc/init.d from make install

sysv scripts were deleted time ago.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: don't create /usr/share/doc/mpathpersist/ from make install
Xose Vazquez Perez [Thu, 30 Jun 2016 13:42:14 +0000 (15:42 +0200)]
multipath-tools: don't create /usr/share/doc/mpathpersist/ from make install

Useless, it's empty.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: merge RPM_OPT_FLAGS into OPTFLAGS
Xose Vazquez Perez [Thu, 30 Jun 2016 13:42:13 +0000 (15:42 +0200)]
multipath-tools: merge RPM_OPT_FLAGS into OPTFLAGS

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: delete spec/rpm traces from Makefile
Xose Vazquez Perez [Thu, 30 Jun 2016 13:42:12 +0000 (15:42 +0200)]
multipath-tools: delete spec/rpm traces from Makefile

spec file was deleted time ago.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: new ONTAP maintainer
Xose Vazquez Perez [Thu, 23 Jun 2016 15:06:40 +0000 (17:06 +0200)]
multipath-tools: new ONTAP maintainer

Martin George is in charge of the ONTAP family.

Cc: Martin George <marting@netapp.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Martin George <marting@netapp.com>
9 months agolibmultipath: remove the DIRECTIO and TUR checker_name from hwtable
Christophe Varoqui [Fri, 8 Jul 2016 06:48:26 +0000 (08:48 +0200)]
libmultipath: remove the DIRECTIO and TUR checker_name from hwtable

so the corresponding devices inherit the new default TUR checker.

9 months agomultipath-tools: update path checker info in multipath.conf.5
Xose Vazquez Perez [Thu, 23 Jun 2016 13:42:18 +0000 (15:42 +0200)]
multipath-tools: update path checker info in multipath.conf.5

>From now on tur is by default, and warn about directio drawbacks.

Cc: Shyam Sundar <g.shyamsundar@yahoo.co.in>
Cc: Edward Goggin, EMC <egoggin@emc.com>
Cc: Matthias Rudolph <matthias.rudolph@hds.com>
Cc: Brian King, IBM <brking@linux.vnet.ibm.com>
Cc: Yacine Kheddache <yacine@alyseo.com>
Cc: Srinivasan Ramani <srinivas.ramani@oracle.com>
Cc: Bart Brooks, Pivot3 <bartb@pivot3.com>
Cc: Martin George <marting@netapp.com>
Cc: Sean Stewart <sean.stewart@netapp.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: change the default path checker from directio to tur
Xose Vazquez Perez [Thu, 23 Jun 2016 13:42:17 +0000 (15:42 +0200)]
multipath-tools: change the default path checker from directio to tur

change DEFAULT_CHECKER to TUR

Cc: Shyam Sundar <g.shyamsundar@yahoo.co.in>
Cc: Edward Goggin, EMC <egoggin@emc.com>
Cc: Matthias Rudolph <matthias.rudolph@hds.com>
Cc: Brian King, IBM <brking@linux.vnet.ibm.com>
Cc: Yacine Kheddache <yacine@alyseo.com>
Cc: Srinivasan Ramani <srinivas.ramani@oracle.com>
Cc: Bart Brooks, Pivot3 <bartb@pivot3.com>
Cc: Martin George <marting@netapp.com>
Cc: Sean Stewart <sean.stewart@netapp.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: minor edit in hwtable
Xose Vazquez Perez [Tue, 21 Jun 2016 00:36:04 +0000 (02:36 +0200)]
multipath-tools: minor edit in hwtable

delete empty lines and correct a NEC product.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: fix syntax in mpath_persistent_reserve_out.3
Xose Vazquez Perez [Tue, 21 Jun 2016 00:36:03 +0000 (02:36 +0200)]
multipath-tools: fix syntax in mpath_persistent_reserve_out.3

./libmpathpersist/mpath_persistent_reserve_out.3:91: warning: tab character in unquoted macro argument

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: tips on adding new devices with proprietary handlers
Xose Vazquez Perez [Tue, 21 Jun 2016 00:36:02 +0000 (02:36 +0200)]
multipath-tools: tips on adding new devices with proprietary handlers

kernel(SCSI) and multipath-tools should be in sync.
Currently in drivers/scsi/scsi_dh.c:

 {"DGC", "RAID",                 "clariion" },
 {"DGC", "DISK",                 "clariion" },
 {"DGC", "VRAID",                "clariion" },

 {"COMPAQ", "MSA1000 VOLUME",    "hp_sw" },
 {"COMPAQ", "HSV110",            "hp_sw" },
 {"HP", "HSV100",                "hp_sw"},
 {"DEC", "HSG80",                "hp_sw"},

 {"IBM", "1722",                 "rdac", },
 {"IBM", "1724",                 "rdac", },
 {"IBM", "1726",                 "rdac", },
 {"IBM", "1742",                 "rdac", },
 {"IBM", "1745",                 "rdac", },
 {"IBM", "1746",                 "rdac", },
 {"IBM", "1813",                 "rdac", }, -> missing in multipath-tools !!!

Added in 4df01b. It's an IBM DCS3860.

 {"IBM", "1814",                 "rdac", },
 {"IBM", "1815",                 "rdac", },
 {"IBM", "1818",                 "rdac", },
 {"IBM", "3526",                 "rdac", },
 {"SGI", "TP9",                  "rdac", },
 {"SGI", "IS",                   "rdac", },
 {"STK", "OPENstorage D280",     "rdac", },
 {"STK", "FLEXLINE 380",         "rdac", },
 {"SUN", "CSM",                  "rdac", },
 {"SUN", "LCSM100",              "rdac", },
 {"SUN", "STK6580_6780",         "rdac", },
 {"SUN", "SUN_6180",             "rdac", },
 {"SUN", "ArrayStorage",         "rdac", }, -> missing in multipath-tools !!!

Added in 66195f. Unknown device, too generic name.

 {"DELL", "MD3",                 "rdac", },
 {"NETAPP", "INF-01-00",         "rdac", },
 {"LSI", "INF-01-00",            "rdac", },
 {"ENGENIO", "INF-01-00",        "rdac", },

Cc: Babu Moger <Babu.Moger@netapp.com>
Cc: Sean Stewart <sean.stewart@netapp.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: do not track temp vim files and patches
Xose Vazquez Perez [Tue, 21 Jun 2016 00:36:01 +0000 (02:36 +0200)]
multipath-tools: do not track temp vim files and patches

add *.swp and *.patch to .gitignore

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add DELL MD34xx/MD38xx
Xose Vazquez Perez [Tue, 21 Jun 2016 00:36:00 +0000 (02:36 +0200)]
multipath-tools: add DELL MD34xx/MD38xx

New MD34xx/MD38xx family based also on RDAC:
http://downloads.dell.com/manuals/common/md34xx_md38xx_support%20matrix2_en-us.pdf

MD3400   12 Gbps direct attached SAS storage array with 12 drives (3.5 inch)
MD3420   12 Gbps direct attached SAS storage array with 24 drives (2.5 inch)
MD3460   12 Gbps direct attached SAS storage dense array
MD3800i  10 Gbps iSCSI network storage array with 12 drives (3.5 inch)
MD3820i  10 Gbps iSCSI network storage array with 24 drives (2.5 inch)
MD3860i  10 Gbps iSCSI network storage dense array
MD3800f  16 Gbps FC network storage array with 12 drives (3.5 inch)
MD3820f  16 Gbps FC network storage array with 24 drives (2.5 inch)
MD3860f  16 Gbps FC network storage dense array

Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: unify DELL MD32xx and MD36xx
Xose Vazquez Perez [Tue, 21 Jun 2016 00:35:59 +0000 (02:35 +0200)]
multipath-tools: unify DELL MD32xx and MD36xx

They belong same family and share FW:
https://downloads.dell.com/manuals/common/md32xx_md36xx_supportmatrix2_en-us.pdf

The main differences are:
MD3200   6 Gbps direct attached SAS storage array with 12 drives (3.5 inch)
MD3220   6 Gbps direct attached SAS storage array with 24 drives (2.5 inch)
MD3260   6 Gbps direct Attached SAS storage dense array
MD3200i  1 Gbps iSCSI network storage array with 12 drives (3.5 inch)
MD3600i 10 Gbps iSCSI network storage array with 12 drives (3.5 inch)
MD3220i  1 Gbps iSCSI network storage array with 24 drives (2.5 inch)
MD3620i 10 Gbps iSCSI network storage array with 24 drives (2.5 inch)
MD3260i  1 Gbps iSCSI network storage dense array
MD3660i 10 Gbps iSCSI network storage dense array
MD3600f  8 Gbps fibre channel network storage array with 12 drives (3.5 inch)
MD3620f  8 Gbps fibre channel network storage array with 24 drives (2.5 inch)
MD3660f  8 Gbps fibre channel network storage dense array

A mandatory ACK from Hannes is required, as he was reluctant to unify them.

Cc: Hannes Reinecke <hare@suse.de>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: reduce regex for DGC CLARiiON CX/AX and EMC VNX
Xose Vazquez Perez [Tue, 21 Jun 2016 00:35:58 +0000 (02:35 +0200)]
multipath-tools: reduce regex for DGC CLARiiON CX/AX and EMC VNX

vendor="DGC" and product=".*" is tooooo broad.
Using same product labels as in drivers/scsi/scsi_dh.c

Field-tested with Clariion VNX7500.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: remove spaces in S390 devices
Xose Vazquez Perez [Tue, 21 Jun 2016 00:35:57 +0000 (02:35 +0200)]
multipath-tools: remove spaces in S390 devices

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: add iSCSI product id for TEGILE ZEBI
Xose Vazquez Perez [Tue, 21 Jun 2016 00:35:56 +0000 (02:35 +0200)]
multipath-tools: add iSCSI product id for TEGILE ZEBI

Devices running 2.x firmware has a different product id for iSCSI.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath-tools: replace spaces with tabs in defaults.h
Xose Vazquez Perez [Sat, 11 Jun 2016 22:14:40 +0000 (00:14 +0200)]
multipath-tools: replace spaces with tabs in defaults.h

replace spaces by tabs in defaults.h

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
9 months agomultipath/main.c fix a minor typo
Milan P. Gandhi [Fri, 1 Jul 2016 11:17:02 +0000 (16:47 +0530)]
multipath/main.c fix a minor typo

Hello, Below patch fixes a minor typo in multipath/main.c

Thanks,
Milan.

Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
9 months agolibmultipath: Allocate keywords directly
Hannes Reinecke [Tue, 14 Jun 2016 15:12:42 +0000 (17:12 +0200)]
libmultipath: Allocate keywords directly

There is no valid reason why we cannot allocate the keywords
structure within the configuration data directly.
So drop this weird pointer dance and use it directly.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agomultipathd: use userspace RCU to access configuration
Hannes Reinecke [Tue, 14 Jun 2016 14:36:30 +0000 (16:36 +0200)]
multipathd: use userspace RCU to access configuration

As the configuration is accessed from various threads at
various points in time any configuration change is tricky.
To avoid any race conditions this patch encapsulates any
configuration accesses via RCU, which will avoid any races
during reconfiguration.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agomultipath: make 'struct config' a local variable
Hannes Reinecke [Tue, 14 Jun 2016 12:56:09 +0000 (14:56 +0200)]
multipath: make 'struct config' a local variable

Instead of having a global 'struct config' we should be making
it a local variable. This enables us to track accesses and
will allow us a race-free configuration update.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agomultipathd: Fixup commandline argument handling
Hannes Reinecke [Wed, 15 Jun 2016 07:36:00 +0000 (09:36 +0200)]
multipathd: Fixup commandline argument handling

multipathd would attempt to store the commandline arguments in
an empty configuration, which would later be overwritten when
reading in the main configuration.
And it would not pass in the arguments correctly when using the
CLI interface.
So with this patch the commandline arguments are stored in
global variables, which then will always overwrite settings
from the configuration file.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath: use (get,put)_multipath_config() accessors
Hannes Reinecke [Tue, 14 Jun 2016 11:44:49 +0000 (13:44 +0200)]
libmultipath: use (get,put)_multipath_config() accessors

Use (get,put)_multipath_config() accessors to mark accesses
to the configuration.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath: use explicit 'config' argument for configuration file parsing
Hannes Reinecke [Tue, 14 Jun 2016 11:08:54 +0000 (13:08 +0200)]
libmultipath: use explicit 'config' argument for configuration file parsing

When parsing the configuration file we should be passing in
'struct config' as an explicit argument.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath: use 'timeout' as argument for getprio()
Hannes Reinecke [Tue, 14 Jun 2016 10:21:20 +0000 (12:21 +0200)]
libmultipath: use 'timeout' as argument for getprio()

Pass in the 'checker_timeout' as explicit argument when calling
getprio().

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agoprio: use 'multipath_dir' as argument
Hannes Reinecke [Tue, 14 Jun 2016 09:59:56 +0000 (11:59 +0200)]
prio: use 'multipath_dir' as argument

Pass in the 'multipath_dir' config setting as explicit argument
for init_prio() and prio_get().

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agocheckers: use 'multipath_dir' as argument
Hannes Reinecke [Tue, 14 Jun 2016 09:59:56 +0000 (11:59 +0200)]
checkers: use 'multipath_dir' as argument

Pass in the 'multipath_dir' config setting as explicit argument
for init_checkers() and checker_get(). With this we can remove
references to struct config.

Signed-off-by: Hannes Reinecke <hare@suse.com>
9 months agolibmultipath: use 'struct config' as argument for pathinfo()
Hannes Reinecke [Mon, 6 Jun 2016 13:30:53 +0000 (15:30 +0200)]
libmultipath: use 'struct config' as argument for pathinfo()

pathinfo() requires access to the entire configuration, not just
hwtable. So don't pretend this is the case.

Signed-off-by: Hannes Reinecke <hare@suse.com>