dm-multipath: blacklist NVMe devices

Multipath works at the request level and NVMe bypasses the request layer. So
multipath is not going to be supported for NVMe devices. Add NVMe to default
blacklist.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
multipathd: not skip paths not belonging to a mpp in check_path

commit bf4c80aee4e977e89d6925df569647acd3d5efef
multipathd: add path when transitioned from 'blocked' state
intends to check paths not belonging to a mpp usually because of
they are in 'blocked' state and we cannot get the path uuid.
So these paths ought not to be skipped at the start of the function.
It could be a fault when merge the original patch -
http://www.redhat.com/archives/dm-devel/2013-December/msg00085.html

Signed-off-by: Vaughan Cao <Vaughan.Cao@oracle.com>
Fix build failure with fomat-security. Specify the format type.

cc -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC
-DLIB_STRING=\"lib\" -I.. -c -o rdac.o rdac.c
rdac.c: In function 'libcheck_check':
rdac.c:311:3: error: format not a string literal and no format arguments
[-Werror=format-security]
   MSG(c, (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
   ^
rdac.c:311:3: error: format not a string literal and no format arguments
[-Werror=format-security]
cc1: some warnings being treated as errors
make[2]: *** [rdac.o] Error 1

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
Minor spelling error fixes

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
New udev rules to deal with stacked devices

This new rules file sets some DM_* udev environment variables to keep
device mapper for doing unnecessary work on multipath device uevents.
Previously, devices with no valid paths were being scanned. Also devices
were being rescanned on uevents caused by paths being added or removed.
These are now avoided.

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Mark reloads with udev flag

In order for the udev rules to be able to distinguish uevents generated by
reloads instead of creates, multipath now tags all the reload resumes with
MPATH_UDEV_RELOAD_FLAG, which is defined as the first multipath
dm subsystem udev flag.  11-dm-mpath.rules watches for multipath events
tag.

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Update FSF address

FSF moved to a different address, and our buildsystem complained.

Signed-off-by: Hannes Reinecke <hare@suse.de>
link against libsystemd, not libsystemd-daemon

With systemd version 210 libsystemd-daemon has been merged
into libsystemd.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Crafted ordering of child paths for round robin path selector

The default Linux bus scanning order is depth first. Due to this default
ordering of paths in priority group is by host. With round robin path selector
this will lead to i/o clumping on each host controller and starvation on other
host controller for certain duration before routing i/o to alternate one.
Even with multiple LUNs sharing same host controllers, it will not yield flat
evenly distributed i/o pattern. This will impact performance when more than
eight active paths are available per LUN. This will be even more worse when
repeat count is more than one.

This patch addresses this issue by re-ordering paths in priority group by
alternate host ports and even PCI adapters. This re-ordering is only necessary
for round-robin path selector. We have observed better IOPS and Throughput with
this crafted ordering of paths.

Paths belonging to same host are grouped into host groups and hosts from same
adapter are grouped into adapter groups. Later paths are selected to yield
crafted order to help route i/o to alternate host ports and adapters available
within priority group of LUN
Fix segfault when fast_io_fail_tmo is empty in config file.

If the option "fast_io_fail_tmo" is specified in multipath.conf, without a value, the command 'multipathd reconfigure' segfaults.
With the patch included here, multipathd returns "error parsing config file" and does not segfaults.

Signed-off-by: Jose Castillo <jcastillo@redhat.com>