Hello community,
here is the log from the commit of package multipath-tools for openSUSE:Factory
checked in at 2019-03-13 09:07:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/multipath-tools (Old)
and /work/SRC/openSUSE:Factory/.multipath-tools.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "multipath-tools"
Wed Mar 13 09:07:47 2019 rev:110 rq:682522 version:0.7.9+139+suse.ed9d450
Changes:
--------
--- /work/SRC/openSUSE:Factory/multipath-tools/multipath-tools.changes
2019-01-29 14:44:11.991129586 +0100
+++
/work/SRC/openSUSE:Factory/.multipath-tools.new.28833/multipath-tools.changes
2019-03-13 09:08:10.763430403 +0100
@@ -1,0 +2,27 @@
+Thu Mar 07 15:09:30 UTC 2019 - [email protected]
+
+- Update to version 0.7.9+139+suse.ed9d450:
+ * multipath-tools: Build: properly parse systemd's version
+
+-------------------------------------------------------------------
+Tue Mar 5 14:12:54 UTC 2019 - Martin Wilck <[email protected]>
+
+- Add kmod(xyz) style dependencies for SLE15-SP1
+ (jsc#SLE-3853, fate#326579, bsc#1119414)
+
+-------------------------------------------------------------------
+Tue Mar 05 09:29:04 UTC 2019 - [email protected]
+
+- Update to version 0.7.9+138+suse.0edd0a2:
+- Include reviewed fixes from upstream
+ * libmutipath: continue to use old state on PATH_PENDING
+ * libmultipath: disable user_friendly_names for NetApp
+ * multipath: blacklist zram devices
+ * various fixes for martinal path code
+- Bug fixes:
+ * multipathd: Fix miscounting active paths (bsc#1125043)
+ * multipathd: avoid null pointer dereference in LOG_MSG
+ (bsc#1127873)
+ * minor fixes suggested by coverity (bsc#1127879)
+
+-------------------------------------------------------------------
Old:
----
multipath-tools-0.7.9+111+suse.b4232b7.tar.xz
New:
----
multipath-tools-0.7.9+139+suse.ed9d450.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ multipath-tools.spec ++++++
--- /var/tmp/diff_new_pack.8zN2b4/_old 2019-03-13 09:08:13.439430127 +0100
+++ /var/tmp/diff_new_pack.8zN2b4/_new 2019-03-13 09:08:13.443430126 +0100
@@ -50,7 +50,7 @@
Name: multipath-tools
Url: http://christophe.varoqui.free.fr/
-Version: 0.7.9+111+suse.b4232b7
+Version: 0.7.9+139+suse.ed9d450
Release: 0
Summary: Tools to Manage Multipathed Devices with the device-mapper
License: GPL-2.0-only AND LGPL-2.0-or-later
@@ -82,6 +82,14 @@
Requires: device-mapper >= 1.2.78
Requires: kpartx
Requires: sg3_utils
+# Generate kmod(xyz)-style dependencies for modules that we put
+# in modules-load.d. Use the modules.d file (Source1) as input to avoid
+# maintaining these dependencies in several places.
+# This feature is to be enabled for SLE15-SP1, and some time in the
+# near future, for Factory.
+%if 0%{?sle_version} >= 150100
+%(sed 's/^\s*//;s/\s*$//;/^#/d;/^$/d;s/^/Requires: kmod(/;s/$/)/;' %{S:1})
+%endif
Obsoletes: multipath-tools-rbd <= %{version}
PreReq: coreutils grep
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.8zN2b4/_old 2019-03-13 09:08:13.483430122 +0100
+++ /var/tmp/diff_new_pack.8zN2b4/_new 2019-03-13 09:08:13.483430122 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/multipath-tools.git</param>
- <param
name="changesrevision">b4232b74b6fcc722cdc16286fabe8b7e339be05f</param></service><service
name="tar_scm">
+ <param
name="changesrevision">ed9d45084265bdd23b816fcb69dc52c1b321fef5</param></service><service
name="tar_scm">
<param
name="url">https://github.com/mwilck/multipath-tools.git</param>
<param
name="changesrevision">08a969b7fce0db769b63bdbfead2a452dc417d58</param></service></servicedata>
\ No newline at end of file
++++++ multipath-tools-0.7.9+111+suse.b4232b7.tar.xz ->
multipath-tools-0.7.9+139+suse.ed9d450.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/multipath-tools-0.7.9+111+suse.b4232b7/Makefile.inc
new/multipath-tools-0.7.9+139+suse.ed9d450/Makefile.inc
--- old/multipath-tools-0.7.9+111+suse.b4232b7/Makefile.inc 2019-01-09
15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/Makefile.inc 2019-03-07
15:50:20.000000000 +0100
@@ -36,8 +36,13 @@
endif
ifndef SYSTEMD
- ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1)
- SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n
's/systemd \([0-9]*\)/\1/p')
+ ifeq ($(shell pkg-config --modversion libsystemd >/dev/null 2>&1 &&
echo 1), 1)
+ SYSTEMD = $(shell pkg-config --modversion libsystemd)
+ else
+ ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1)
+ SYSTEMD = $(shell systemctl --version 2> /dev/null | \
+ sed -n 's/systemd \([0-9]*\).*/\1/p')
+ endif
endif
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/multipath-tools-0.7.9+111+suse.b4232b7/kpartx/dasd.c
new/multipath-tools-0.7.9+139+suse.ed9d450/kpartx/dasd.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/kpartx/dasd.c 2019-01-09
15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/kpartx/dasd.c 2019-03-07
15:50:20.000000000 +0100
@@ -137,7 +137,7 @@
/* Not a DASD */
return -1;
} else {
- fd_dasd = fd;
+ fd_dasd = dup(fd);
}
if (ioctl(fd_dasd, BIODASDINFO, (unsigned long)&info) != 0) {
@@ -190,7 +190,7 @@
memcpy (&vlabel, data, sizeof(vlabel));
else {
bzero(&vlabel,4);
- memcpy (&vlabel.vollbl, data, sizeof(vlabel) - 4);
+ memcpy ((char *)&vlabel + 4, data, sizeof(vlabel) - 4);
}
vtoc_ebcdic_dec(vlabel.vollbl, type, 4);
@@ -288,7 +288,6 @@
out:
if (data != NULL)
free(data);
- if (fd_dasd != -1 && fd_dasd != fd)
- close(fd_dasd);
+ close(fd_dasd);
return retval;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathcmd/mpath_cmd.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathcmd/mpath_cmd.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathcmd/mpath_cmd.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathcmd/mpath_cmd.c
2019-03-07 15:50:20.000000000 +0100
@@ -133,6 +133,10 @@
errno = EIO;
return -1;
}
+ if (len <= 0 || len >= MAX_REPLY_LEN) {
+ errno = ERANGE;
+ return -1;
+ }
return len;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathcmd/mpath_cmd.h
new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathcmd/mpath_cmd.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathcmd/mpath_cmd.h
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathcmd/mpath_cmd.h
2019-03-07 15:50:20.000000000 +0100
@@ -20,6 +20,12 @@
#ifndef LIB_MPATH_CMD_H
#define LIB_MPATH_CMD_H
+/*
+ * This should be sufficient for json output for >10000 maps,
+ * and >60000 paths.
+ */
+#define MAX_REPLY_LEN (32 * 1024 * 1024)
+
#ifdef __cplusplus
extern "C" {
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathpersist/mpath_pr_ioctl.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathpersist/mpath_pr_ioctl.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmpathpersist/mpath_pr_ioctl.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmpathpersist/mpath_pr_ioctl.c
2019-03-07 15:50:20.000000000 +0100
@@ -211,7 +211,8 @@
unsigned char *p;
char *ppbuff;
uint32_t additional_length;
-
+ char tempbuff[MPATH_MAX_PARAM_LEN];
+ struct prin_fulldescr fdesc;
convert_be32_to_cpu(&pr_buff->prin_descriptor.prin_readfd.prgeneration);
convert_be32_to_cpu(&pr_buff->prin_descriptor.prin_readfd.number_of_descriptor);
@@ -223,9 +224,12 @@
}
additional_length =
pr_buff->prin_descriptor.prin_readfd.number_of_descriptor;
+ if (additional_length > MPATH_MAX_PARAM_LEN) {
+ condlog(3, "PRIN length %u exceeds max length %d",
additional_length,
+ MPATH_MAX_PARAM_LEN);
+ return;
+ }
- char tempbuff[MPATH_MAX_PARAM_LEN];
- struct prin_fulldescr fdesc;
memset(&fdesc, 0, sizeof(struct prin_fulldescr));
memcpy( tempbuff,
pr_buff->prin_descriptor.prin_readfd.private_buffer,MPATH_MAX_PARAM_LEN );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/blacklist.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/blacklist.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/blacklist.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/blacklist.c
2019-03-07 15:50:20.000000000 +0100
@@ -192,7 +192,7 @@
char * str;
int i;
- str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]");
+ str = STRDUP("^(ram|zram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]");
if (!str)
return 1;
if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/callout.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/callout.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/callout.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/callout.c
2019-03-07 15:50:20.000000000 +0100
@@ -68,19 +68,20 @@
switch(pid) {
case 0:
/* child */
- close(STDOUT_FILENO);
/* dup write side of pipe to STDOUT */
- if (dup(fds[1]) < 0)
+ if (dup2(fds[1], STDOUT_FILENO) < 0) {
+ condlog(1, "failed to dup2 stdout: %m");
return -1;
+ }
+ close(fds[0]);
+ close(fds[1]);
/* Ignore writes to stderr */
null_fd = open("/dev/null", O_WRONLY);
if (null_fd > 0) {
- int err_fd __attribute__ ((unused));
-
- close(STDERR_FILENO);
- err_fd = dup(null_fd);
+ if (dup2(null_fd, STDERR_FILENO) < 0)
+ condlog(1, "failed to dup2 stderr: %m");
close(null_fd);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/checkers.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/checkers.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/checkers.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/checkers.c
2019-03-07 15:50:20.000000000 +0100
@@ -261,13 +261,6 @@
return r;
}
-int checker_selected(const struct checker *c)
-{
- if (!c)
- return 0;
- return c->cls != NULL;
-}
-
const char *checker_name(const struct checker *c)
{
if (!c || !c->cls)
@@ -295,7 +288,7 @@
{
int id;
- if (!c || c->msgid < 0 ||
+ if (!c || !c->cls || c->msgid < 0 ||
(c->msgid >= CHECKER_GENERIC_MSGTABLE_SIZE &&
c->msgid < CHECKER_FIRST_MSGID))
goto bad_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/checkers.h
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/checkers.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/checkers.h
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/checkers.h
2019-03-07 15:50:20.000000000 +0100
@@ -129,6 +129,11 @@
you want to stuff data in. */
};
+static inline int checker_selected(const struct checker *c)
+{
+ return c != NULL && c->cls != NULL;
+}
+
const char *checker_state_name(int);
int init_checkers(const char *);
void cleanup_checkers (void);
@@ -142,7 +147,6 @@
void checker_enable (struct checker *);
void checker_disable (struct checker *);
int checker_check (struct checker *, int);
-int checker_selected(const struct checker *);
int checker_is_sync(const struct checker *);
const char *checker_name (const struct checker *);
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/configure.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/configure.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/configure.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/configure.c
2019-03-07 15:50:20.000000000 +0100
@@ -1042,7 +1042,7 @@
if (recv_packet(fd, &reply, timeout) != 0)
goto out;
- if (strstr(reply, "shutdown"))
+ if (reply && strstr(reply, "shutdown"))
goto out_free;
ret = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/dict.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/dict.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/dict.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/dict.c
2019-03-07 15:50:20.000000000 +0100
@@ -327,7 +327,7 @@
int i;
if (set_yes_no_undef(strvec, &conf->find_multipaths) == 0 &&
- conf->find_multipaths != YNU_UNDEF)
+ conf->find_multipaths != FIND_MULTIPATHS_UNDEF)
return 0;
buff = set_value(strvec);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/discovery.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/discovery.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/discovery.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/discovery.c
2019-03-07 15:50:20.000000000 +0100
@@ -520,7 +520,7 @@
/* Parse error, ignore */
return 0;
}
- return preferred;
+ return !!preferred;
}
static void
@@ -711,7 +711,7 @@
int dev_loss_tmo = mpp->dev_loss;
if (mpp->no_path_retry > 0) {
- uint64_t no_path_retry_tmo = mpp->no_path_retry * checkint;
+ uint64_t no_path_retry_tmo = (uint64_t)mpp->no_path_retry *
checkint;
if (no_path_retry_tmo > MAX_DEV_LOSS_TMO)
no_path_retry_tmo = MAX_DEV_LOSS_TMO;
@@ -1914,11 +1914,12 @@
if (path_state == PATH_REMOVED)
goto blank;
else if (mask & DI_NOIO) {
- /*
- * Avoid any IO on the device itself.
- * Behave like DI_CHECKER in the "path unavailable" case.
- */
- pp->chkrstate = pp->state = path_state;
+ if (mask & DI_CHECKER)
+ /*
+ * Avoid any IO on the device itself.
+ * simply use the path_offline() return as its state
+ */
+ pp->chkrstate = pp->state = path_state;
return PATHINFO_OK;
}
@@ -1945,8 +1946,11 @@
if (mask & DI_CHECKER) {
if (path_state == PATH_UP) {
- pp->chkrstate = pp->state = get_state(pp, conf, 0,
- path_state);
+ int newstate = get_state(pp, conf, 0, path_state);
+ if (newstate != PATH_PENDING ||
+ pp->state == PATH_UNCHECKED ||
+ pp->state == PATH_WILD)
+ pp->chkrstate = pp->state = newstate;
if (pp->state == PATH_TIMEOUT)
pp->state = PATH_DOWN;
if (pp->state == PATH_UP && !pp->size) {
@@ -1966,8 +1970,12 @@
if ((mask & DI_WWID) && !strlen(pp->wwid)) {
get_uid(pp, path_state, pp->udev);
if (!strlen(pp->wwid)) {
- pp->initialized = INIT_MISSING_UDEV;
- pp->tick = conf->retrigger_delay;
+ if (pp->bus == SYSFS_BUS_UNDEF)
+ return PATHINFO_SKIPPED;
+ if (pp->initialized != INIT_FAILED) {
+ pp->initialized = INIT_MISSING_UDEV;
+ pp->tick = conf->retrigger_delay;
+ }
return PATHINFO_OK;
}
else
@@ -2000,7 +2008,7 @@
* Recoverable error, for example faulty or offline path
*/
pp->chkrstate = pp->state = PATH_DOWN;
- if (pp->initialized == INIT_FAILED)
+ if (pp->initialized == INIT_NEW || pp->initialized == INIT_FAILED)
memset(pp->wwid, 0, WWID_SIZE);
return PATHINFO_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/foreign/nvme.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/foreign/nvme.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/foreign/nvme.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/foreign/nvme.c
2019-03-07 15:50:20.000000000 +0100
@@ -249,8 +249,10 @@
devt = udev_device_get_devnum(np->udev);
return snprintf(buff, len, "%u:%u", major(devt), minor(devt));
case 'o':
- sysfs_attr_get_value(np->ctl, "state", fld, sizeof(fld));
- return snprintf(buff, len, "%s", fld);
+ if (sysfs_attr_get_value(np->ctl, "state",
+ fld, sizeof(fld)) > 0)
+ return snprintf(buff, len, "%s", fld);
+ break;
case 'T':
if (sysfs_attr_get_value(np->udev, "ana_state", fld,
sizeof(fld)) > 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/hwtable.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/hwtable.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/hwtable.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/hwtable.c
2019-03-07 15:50:20.000000000 +0100
@@ -719,6 +719,7 @@
.flush_on_last_del = FLUSH_ENABLED,
.dev_loss = MAX_DEV_LOSS_TMO,
.prio_name = PRIO_ONTAP,
+ .user_friendly_names = USER_FRIENDLY_NAMES_OFF,
},
{
/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/io_err_stat.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/io_err_stat.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/io_err_stat.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/io_err_stat.c
2019-03-07 15:50:20.000000000 +0100
@@ -41,7 +41,7 @@
#define CONCUR_NR_EVENT 32
#define PATH_IO_ERR_IN_CHECKING -1
-#define PATH_IO_ERR_IN_POLLING_RECHECK -2
+#define PATH_IO_ERR_WAITING_TO_CHECK -2
#define io_err_stat_log(prio, fmt, args...) \
condlog(prio, "io error statistic: " fmt, ##args)
@@ -254,7 +254,6 @@
* return value
* 0: enqueue OK
* 1: fails because of internal error
- * 2: fails because of existing already
*/
static int enqueue_io_err_stat_by_path(struct path *path)
{
@@ -264,7 +263,7 @@
p = find_err_path_by_dev(paths->pathvec, path->dev);
if (p) {
pthread_mutex_unlock(&paths->mutex);
- return 2;
+ return 0;
}
pthread_mutex_unlock(&paths->mutex);
@@ -284,24 +283,6 @@
vector_set_slot(paths->pathvec, p);
pthread_mutex_unlock(&paths->mutex);
- if (!path->io_err_disable_reinstate) {
- /*
- *fail the path in the kernel for the time of the to make
- *the test more reliable
- */
- io_err_stat_log(3, "%s: fail dm path %s before checking",
- path->mpp->alias, path->dev);
- path->io_err_disable_reinstate = 1;
- dm_fail_path(path->mpp->alias, path->dev_t);
- update_queue_mode_del_path(path->mpp);
-
- /*
- * schedule path check as soon as possible to
- * update path state to delayed state
- */
- path->tick = 1;
-
- }
io_err_stat_log(2, "%s: enqueue path %s to check",
path->mpp->alias, path->dev);
return 0;
@@ -318,7 +299,6 @@
int io_err_stat_handle_pathfail(struct path *path)
{
struct timespec curr_time;
- int res;
if (uatomic_read(&io_err_thread_running) == 0)
return 1;
@@ -333,8 +313,6 @@
if (!path->mpp)
return 1;
- if (path->mpp->nr_active <= 1)
- return 1;
if (path->mpp->marginal_path_double_failed_time <= 0 ||
path->mpp->marginal_path_err_sample_time <= 0 ||
path->mpp->marginal_path_err_recheck_gap_time <= 0 ||
@@ -372,17 +350,33 @@
}
path->io_err_pathfail_cnt++;
if (path->io_err_pathfail_cnt >= FLAKY_PATHFAIL_THRESHOLD) {
- res = enqueue_io_err_stat_by_path(path);
- if (!res)
- path->io_err_pathfail_cnt = PATH_IO_ERR_IN_CHECKING;
- else
- path->io_err_pathfail_cnt = 0;
+ path->io_err_disable_reinstate = 1;
+ path->io_err_pathfail_cnt = PATH_IO_ERR_WAITING_TO_CHECK;
+ /* enqueue path as soon as it comes up */
+ path->io_err_dis_reinstate_time = 0;
+ if (path->state != PATH_DOWN) {
+ struct config *conf;
+ int oldstate = path->state;
+ int checkint;
+
+ conf = get_multipath_config();
+ checkint = conf->checkint;
+ put_multipath_config(conf);
+ io_err_stat_log(2, "%s: mark as failed", path->dev);
+ path->mpp->stat_path_failures++;
+ path->state = PATH_DOWN;
+ path->dmstate = PSTATE_FAILED;
+ if (oldstate == PATH_UP || oldstate == PATH_GHOST)
+ update_queue_mode_del_path(path->mpp);
+ if (path->tick > checkint)
+ path->tick = checkint;
+ }
}
return 0;
}
-int hit_io_err_recheck_time(struct path *pp)
+int need_io_err_check(struct path *pp)
{
struct timespec curr_time;
int r;
@@ -393,7 +387,7 @@
io_err_stat_log(2, "%s: recover path early", pp->dev);
goto recover;
}
- if (pp->io_err_pathfail_cnt != PATH_IO_ERR_IN_POLLING_RECHECK)
+ if (pp->io_err_pathfail_cnt != PATH_IO_ERR_WAITING_TO_CHECK)
return 1;
if (clock_gettime(CLOCK_MONOTONIC, &curr_time) != 0 ||
(curr_time.tv_sec - pp->io_err_dis_reinstate_time) >
@@ -401,13 +395,6 @@
io_err_stat_log(4, "%s: reschedule checking after %d seconds",
pp->dev,
pp->mpp->marginal_path_err_recheck_gap_time);
- /*
- * to reschedule io error checking again
- * if the path is good enough, we claim it is good
- * and can be reinsated as soon as possible in the
- * check_path routine.
- */
- pp->io_err_dis_reinstate_time = curr_time.tv_sec;
r = enqueue_io_err_stat_by_path(pp);
/*
* Enqueue fails because of internal error.
@@ -418,9 +405,8 @@
io_err_stat_log(3, "%s: enqueue fails, to recover",
pp->dev);
goto recover;
- } else if (!r) {
+ } else
pp->io_err_pathfail_cnt = PATH_IO_ERR_IN_CHECKING;
- }
}
return 1;
@@ -428,7 +414,6 @@
recover:
pp->io_err_pathfail_cnt = 0;
pp->io_err_disable_reinstate = 0;
- pp->tick = 1;
return 0;
}
@@ -496,10 +481,10 @@
*/
path->tick = 1;
- } else if (path->mpp && path->mpp->nr_active > 1) {
+ } else if (path->mpp && path->mpp->nr_active > 0) {
io_err_stat_log(3, "%s: keep failing the dm path %s",
path->mpp->alias, path->dev);
- path->io_err_pathfail_cnt = PATH_IO_ERR_IN_POLLING_RECHECK;
+ path->io_err_pathfail_cnt = PATH_IO_ERR_WAITING_TO_CHECK;
path->io_err_disable_reinstate = 1;
path->io_err_dis_reinstate_time = currtime.tv_sec;
io_err_stat_log(3, "%s: disable reinstating of %s",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/io_err_stat.h
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/io_err_stat.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/io_err_stat.h
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/io_err_stat.h
2019-03-07 15:50:20.000000000 +0100
@@ -10,6 +10,6 @@
int start_io_err_stat_thread(void *data);
void stop_io_err_stat_thread(void);
int io_err_stat_handle_pathfail(struct path *path);
-int hit_io_err_recheck_time(struct path *pp);
+int need_io_err_check(struct path *pp);
#endif /* _IO_ERR_STAT_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/structs.h
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/structs.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/structs.h
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/structs.h
2019-03-07 15:50:20.000000000 +0100
@@ -202,6 +202,7 @@
};
enum initialized_states {
+ INIT_NEW,
INIT_FAILED,
INIT_MISSING_UDEV,
INIT_REQUESTED_UDEV,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/util.c
new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/util.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/libmultipath/util.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/libmultipath/util.c
2019-03-07 15:50:20.000000000 +0100
@@ -176,6 +176,7 @@
if (stat("/sys/dev/block", &statbuf) == 0) {
/* Newer kernels have /sys/dev/block */
sprintf(block_path,"/sys/dev/block/%u:%u", major, minor);
+ dev[FILE_NAME_SIZE - 1] = '\0';
if (lstat(block_path, &statbuf) == 0) {
if (S_ISLNK(statbuf.st_mode) &&
readlink(block_path, dev, FILE_NAME_SIZE-1) > 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipath/main.c
new/multipath-tools-0.7.9+139+suse.ed9d450/multipath/main.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipath/main.c 2019-01-09
15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipath/main.c 2019-03-07
15:50:20.000000000 +0100
@@ -356,7 +356,7 @@
pp->udev = get_udev_device(pp->dev_t, DEV_DEVT);
if (pp->udev == NULL)
continue;
- if (pathinfo(pp, conf, DI_SYSFS|DI_NOIO) != PATHINFO_OK)
+ if (pathinfo(pp, conf, DI_SYSFS|DI_NOIO|DI_CHECKER) !=
PATHINFO_OK)
continue;
if (pp->state == PATH_UP &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipath/multipath.conf.5
new/multipath-tools-0.7.9+139+suse.ed9d450/multipath/multipath.conf.5
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipath/multipath.conf.5
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipath/multipath.conf.5
2019-03-07 15:50:20.000000000 +0100
@@ -1225,7 +1225,7 @@
.RS
.PP
The default \fIblacklist\fR consists of the regular expressions
-"^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]" and
+"^(ram|zram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]" and
"^(td|hd|vd)[a-z]". This causes virtual devices, non-disk devices, and some
other
device types to be excluded from multipath handling by default.
.RE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli.c
new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli.c 2019-01-09
15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli.c 2019-03-07
15:50:20.000000000 +0100
@@ -13,7 +13,9 @@
#include "version.h"
#include <readline/readline.h>
+#include "mpath_cmd.h"
#include "cli.h"
+#include "debug.h"
static vector keys;
static vector handlers;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli.h
new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli.h 2019-01-09
15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli.h 2019-03-07
15:50:20.000000000 +0100
@@ -96,6 +96,12 @@
do { \
if ((a)) { \
char *tmp = (r); \
+ \
+ if (m >= MAX_REPLY_LEN) { \
+ condlog(1, "Warning: max reply length
exceeded"); \
+ free(tmp); \
+ r = NULL; \
+ } \
(r) = REALLOC((r), (m) * 2); \
if ((r)) { \
memset((r) + (m), 0, (m)); \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli_handlers.c
new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli_handlers.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/cli_handlers.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/cli_handlers.c
2019-03-07 15:50:20.000000000 +0100
@@ -26,6 +26,7 @@
#include "prkey.h"
#include "propsel.h"
#include "main.h"
+#include "mpath_cmd.h"
#include "cli.h"
#include "uevent.h"
#include "foreign.h"
@@ -876,7 +877,7 @@
return 1;
}
- return reload_map(vecs, mpp, 0, 1);
+ return update_path_groups(mpp, vecs, 0);
}
int resize_map(struct multipath *mpp, unsigned long long size,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/main.c
new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/main.c
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/main.c
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/main.c
2019-03-07 15:50:20.000000000 +0100
@@ -92,7 +92,8 @@
#define LOG_MSG(lvl, verb, pp) \
do { \
- if (lvl <= verb) { \
+ if (pp->mpp && checker_selected(&pp->checker) && \
+ lvl <= verb) { \
if (pp->offline) \
condlog(lvl, "%s: %s - path offline", \
pp->mpp->alias, pp->dev); \
@@ -242,10 +243,11 @@
else if (running_state != DAEMON_IDLE) {
struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- ts.tv_sec += 1;
- rc = pthread_cond_timedwait(&config_cond,
- &config_lock, &ts);
+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
+ ts.tv_sec += 1;
+ rc = pthread_cond_timedwait(&config_cond,
+ &config_lock, &ts);
+ }
}
if (!rc && (running_state != DAEMON_SHUTDOWN)) {
running_state = state;
@@ -390,7 +392,8 @@
default:
if (mpp->nr_active > 0) {
mpp->retry_tick = 0;
- dm_queue_if_no_path(mpp->alias, 1);
+ if (!is_queueing)
+ dm_queue_if_no_path(mpp->alias, 1);
} else if (is_queueing && mpp->retry_tick == 0)
enter_recovery_mode(mpp);
break;
@@ -1268,10 +1271,13 @@
else {
if (ro == 1)
pp->mpp->force_readonly = 1;
- retval = reload_map(vecs, mpp, 0, 1);
- pp->mpp->force_readonly = 0;
- condlog(2, "%s: map %s reloaded (retval %d)",
- uev->kernel, mpp->alias, retval);
+ retval = update_path_groups(mpp, vecs, 0);
+ if (retval == 2)
+ condlog(2, "%s: map removed during
reload", pp->dev);
+ else {
+ pp->mpp->force_readonly = 0;
+ condlog(2, "%s: map %s reloaded (retval
%d)", uev->kernel, mpp->alias, retval);
+ }
}
}
}
@@ -1827,7 +1833,7 @@
dm_lib_release();
if (setup_multipath(vecs, mpp) != 0)
- return 1;
+ return 2;
sync_map_state(mpp);
return 0;
@@ -2016,7 +2022,8 @@
}
if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
- condlog(2, "%s: unusable path - checker failed", pp->dev);
+ condlog(2, "%s: unusable path (%s) - checker failed",
+ pp->dev, checker_state_name(newstate));
LOG_MSG(2, verbosity, pp);
conf = get_multipath_config();
pthread_cleanup_push(put_multipath_config, conf);
@@ -2025,7 +2032,9 @@
return 1;
}
if (!pp->mpp) {
- if (!strlen(pp->wwid) && pp->initialized == INIT_FAILED &&
+ if (!strlen(pp->wwid) &&
+ (pp->initialized == INIT_FAILED ||
+ pp->initialized == INIT_NEW) &&
(newstate == PATH_UP || newstate == PATH_GHOST)) {
condlog(2, "%s: add missing path", pp->dev);
conf = get_multipath_config();
@@ -2067,6 +2076,7 @@
/* if update_multipath_strings orphaned the path, quit early */
if (!pp->mpp)
return 0;
+ set_no_path_retry(pp->mpp);
if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
check_path_reinstate_state(pp)) {
@@ -2074,7 +2084,8 @@
return 1;
}
- if (pp->io_err_disable_reinstate && hit_io_err_recheck_time(pp)) {
+ if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
+ pp->io_err_disable_reinstate && need_io_err_check(pp)) {
pp->state = PATH_SHAKY;
/*
* to reschedule as soon as possible,so that this path can
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/main.h
new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/main.h
--- old/multipath-tools-0.7.9+111+suse.b4232b7/multipathd/main.h
2019-01-09 15:41:54.000000000 +0100
+++ new/multipath-tools-0.7.9+139+suse.ed9d450/multipathd/main.h
2019-03-07 15:50:20.000000000 +0100
@@ -43,5 +43,7 @@
int reset);
#define setup_multipath(vecs, mpp) __setup_multipath(vecs, mpp, 1)
int update_multipath (struct vectors *vecs, char *mapname, int reset);
+int update_path_groups(struct multipath *mpp, struct vectors *vecs,
+ int refresh);
#endif /* MAIN_H */