Hello community,
here is the log from the commit of package multipath-tools for openSUSE:Factory
checked in at 2020-12-18 19:52:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/multipath-tools (Old)
and /work/SRC/openSUSE:Factory/.multipath-tools.new.5145 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "multipath-tools"
Fri Dec 18 19:52:21 2020 rev:127 rq:856457 version:0.8.5+12+suse.3b0e9ca
Changes:
--------
--- /work/SRC/openSUSE:Factory/multipath-tools/multipath-tools.changes
2020-09-21 17:07:49.599159585 +0200
+++
/work/SRC/openSUSE:Factory/.multipath-tools.new.5145/multipath-tools.changes
2020-12-18 19:52:23.925613911 +0100
@@ -1,0 +2,16 @@
+Wed Dec 16 12:11:07 UTC 2020 - [email protected]
+
+- Update to versioni 0.8.5+12+suse.3b0e9ca
+ * libmultipath: force map reload if udev incomplete
+ (bsc#1178662, bsc#1172157, bsc#1175454, bsc#1176406)
+- Fixes from upstream 0.8.5
+ * multipath-tools: add MacroSAN arrays to hwtable
+ * libmultipath: Allow discovery of USB devices
+ (add configuration option "allow_usb_devices")
+
+-------------------------------------------------------------------
+Fri Dec 4 11:27:54 UTC 2020 - Martin Wilck <[email protected]>
+
+- Remove compatibility code for SLE <= 12-SP2 from spec file
+
+-------------------------------------------------------------------
@@ -69 +85 @@
- * libmultipath: add device to hwtable.c (bsc#1174026)
+ * libmultipath: add device to hwtable.c (bsc#1174026) (ETERNUS AHB)
@@ -156,0 +173,2 @@
+ * kpartx: fix detection of dasd partition tables on loop devices
+ (bsc#1139775)
Old:
----
multipath-tools-0.8.4+192+suse.1bc10ad.obscpio
New:
----
multipath-tools-0.8.5+12+suse.3b0e9ca.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ multipath-tools.spec ++++++
--- /var/tmp/diff_new_pack.1aOPxN/_old 2020-12-18 19:52:25.685615850 +0100
+++ /var/tmp/diff_new_pack.1aOPxN/_new 2020-12-18 19:52:25.693615859 +0100
@@ -39,7 +39,7 @@
%define _sysdir usr/lib
Name: multipath-tools
-Version: 0.8.4+192+suse.1bc10ad
+Version: 0.8.5+12+suse.3b0e9ca
Release: 0
Summary: Tools to Manage Multipathed Devices with the device-mapper
License: GPL-2.0-only
@@ -214,10 +214,6 @@
%files
%defattr(-,root,root)
%doc README README.alua
-# SLE12-SP2 and earlier: dracut filesystem not own /usr/share/licenses
-%if 0%{?sle_version} && 0%{?sle_version} < 120300
-%dir %{_defaultlicensedir}
-%endif
%license LICENSES/GPL-2.0
%{_udevrulesdir}/11-dm-mpath.rules
%{_udevrulesdir}/56-multipath.rules
@@ -267,12 +263,6 @@
%{_udevrulesdir}/66-kpartx.rules
%{_udevrulesdir}/68-del-part-nodes.rules
/%{_sysdir}/udev/kpartx_id
-# SLE12-SP1 and earlier: dracut does not own /usr/lib/dracut/dracut.conf.d
-%if 0%{?sle_version}
-%if 0%{?sle_version} <= 120100
-%dir /%{_sysdir}/dracut/dracut.conf.d
-%endif
-%endif
/%{_sysdir}/dracut/dracut.conf.d/dm-parts.conf
%{_mandir}/man8/kpartx.8*
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.1aOPxN/_old 2020-12-18 19:52:25.749615920 +0100
+++ /var/tmp/diff_new_pack.1aOPxN/_new 2020-12-18 19:52:25.749615920 +0100
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/multipath-tools.git</param>
- <param
name="changesrevision">1bc10ad9aee9598a36ee7107371a78b813baf968</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">3b0e9cacfe6f016beea69b1e42b593961579ec34</param></service></servicedata>
\ No newline at end of file
++++++ multipath-tools-0.8.4+192+suse.1bc10ad.obscpio ->
multipath-tools-0.8.5+12+suse.3b0e9ca.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/kpartx/kpartx.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/kpartx/kpartx.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/kpartx/kpartx.c 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/kpartx/kpartx.c 2020-12-16
13:10:32.000000000 +0100
@@ -209,6 +209,23 @@
return 0;
}
+static void *
+xmalloc (size_t size) {
+ void *t;
+
+ if (size == 0)
+ return NULL;
+
+ t = malloc (size);
+
+ if (t == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ exit(1);
+ }
+
+ return t;
+}
+
int
main(int argc, char **argv){
int i, j, m, n, op, off, arg, c, d, ro=0;
@@ -383,7 +400,7 @@
mapname = device + off;
if (delim == NULL) {
- delim = malloc(DELIM_SIZE);
+ delim = xmalloc(DELIM_SIZE);
memset(delim, 0, DELIM_SIZE);
set_delimiter(mapname, delim);
}
@@ -670,23 +687,6 @@
return r;
}
-void *
-xmalloc (size_t size) {
- void *t;
-
- if (size == 0)
- return NULL;
-
- t = malloc (size);
-
- if (t == NULL) {
- fprintf(stderr, "Out of memory\n");
- exit(1);
- }
-
- return t;
-}
-
/*
* sseek: seek to specified sector
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmpathpersist/mpath_persist.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmpathpersist/mpath_persist.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmpathpersist/mpath_persist.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmpathpersist/mpath_persist.c
2020-12-16 13:10:32.000000000 +0100
@@ -323,7 +323,6 @@
{
int i;
struct multipath *mpp;
- char params[PARAMS_SIZE], status[PARAMS_SIZE];
vector_foreach_slot (curmp, mpp, i){
/*
@@ -341,14 +340,12 @@
if (refwwid && strncmp (mpp->alias, refwwid, WWID_SIZE - 1))
continue;
- dm_get_map(mpp->alias, &mpp->size, params);
- condlog(3, "params = %s", params);
- dm_get_status(mpp->alias, status);
- condlog(3, "status = %s", status);
- disassemble_map (pathvec, params, mpp);
- update_pathvec_from_dm(pathvec, mpp, DI_CHECKER);
- disassemble_status (status, mpp);
-
+ if (update_multipath_table(mpp, pathvec, DI_CHECKER) != DMP_OK
||
+ update_multipath_status(mpp) != DMP_OK) {
+ condlog(1, "error parsing map %s", mpp->wwid);
+ remove_map(mpp, pathvec, curmp, PURGE_VEC);
+ i--;
+ }
}
return MPATH_PR_SUCCESS ;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/Makefile
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/Makefile
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/Makefile
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/Makefile
2020-12-16 13:10:32.000000000 +0100
@@ -24,6 +24,10 @@
CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE
endif
+ifneq ($(call check_func,dm_task_get_errno,/usr/include/libdevmapper.h),0)
+ CFLAGS += -DLIBDM_API_GET_ERRNO
+endif
+
ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0)
CFLAGS += -DLIBDM_API_COOKIE
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/config.h
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/config.h
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/config.h
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/config.h
2020-12-16 13:10:32.000000000 +0100
@@ -158,6 +158,7 @@
unsigned int dev_loss;
int log_checker_err;
int allow_queueing;
+ int allow_usb_devices;
int find_multipaths;
uid_t uid;
gid_t gid;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/configure.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/configure.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/configure.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/configure.c
2020-12-16 13:10:32.000000000 +0100
@@ -388,6 +388,11 @@
marginal_pathgroups = conf->marginal_pathgroups;
pthread_cleanup_pop(1);
+ if (!mpp->features || !mpp->hwhandler || !mpp->selector) {
+ condlog(0, "%s: map select failed", mpp->alias);
+ return 1;
+ }
+
if (marginal_path_check_enabled(mpp))
start_io_err_stat_thread(vecs);
@@ -539,6 +544,7 @@
{
struct udev_enumerate *part_enum;
struct udev_list_entry *item;
+ const char *devtype;
part_enum = udev_enumerate_new(udev);
if (!part_enum)
@@ -559,7 +565,8 @@
if (!part)
continue;
- if (!strcmp("partition", udev_device_get_devtype(part))) {
+ devtype = udev_device_get_devtype(part);
+ if (devtype && !strcmp("partition", devtype)) {
condlog(4, "%s: triggering %s event for %s", __func__,
action, syspath);
sysfs_attr_set_value(part, "uevent", action, len);
@@ -689,12 +696,11 @@
return err;
}
-static void
-select_reload_action(struct multipath *mpp, const struct multipath *cmpp,
- const char *reason)
+static bool is_udev_ready(struct multipath *cmpp)
{
struct udev_device *mpp_ud;
const char *env;
+ bool rc;
/*
* MPATH_DEVICE_READY != 1 can mean two things:
@@ -706,14 +712,20 @@
*/
mpp_ud = get_udev_for_mpp(cmpp);
+ if (!mpp_ud)
+ return true;
env = udev_device_get_property_value(mpp_ud, "MPATH_DEVICE_READY");
- if ((!env || strcmp(env, "1")) && count_active_paths(mpp) > 0)
- mpp->force_udev_reload = 1;
+ rc = (env != NULL && !strcmp(env, "1"));
udev_device_unref(mpp_ud);
+ condlog(4, "%s: %s: \"%s\" -> %d\n", __func__, cmpp->alias, env, rc);
+ return rc;
+}
+
+static void
+select_reload_action(struct multipath *mpp, const char *reason)
+{
mpp->action = ACT_RELOAD;
- condlog(3, "%s: set ACT_RELOAD (%s%s)", mpp->alias,
- mpp->force_udev_reload ? "forced, " : "",
- reason);
+ condlog(3, "%s: set ACT_RELOAD (%s)", mpp->alias, reason);
}
void select_action (struct multipath *mpp, const struct _vector *curmp,
@@ -782,10 +794,18 @@
return;
}
+ if (!is_udev_ready(cmpp) && count_active_paths(mpp) > 0) {
+ mpp->force_udev_reload = 1;
+ mpp->action = ACT_RELOAD;
+ condlog(3, "%s: set ACT_RELOAD (udev incomplete)",
+ mpp->alias);
+ return;
+ }
+
if (mpp->no_path_retry != NO_PATH_RETRY_UNDEF &&
!!strstr(mpp->features, "queue_if_no_path") !=
!!strstr(cmpp->features, "queue_if_no_path")) {
- select_reload_action(mpp, cmpp, "no_path_retry change");
+ select_reload_action(mpp, "no_path_retry change");
return;
}
if ((mpp->retain_hwhandler != RETAIN_HWHANDLER_ON ||
@@ -793,7 +813,7 @@
(strlen(cmpp->hwhandler) != strlen(mpp->hwhandler) ||
strncmp(cmpp->hwhandler, mpp->hwhandler,
strlen(mpp->hwhandler)))) {
- select_reload_action(mpp, cmpp, "hwhandler change");
+ select_reload_action(mpp, "hwhandler change");
return;
}
@@ -801,7 +821,7 @@
!!strstr(mpp->features, "retain_attached_hw_handler") !=
!!strstr(cmpp->features, "retain_attached_hw_handler") &&
get_linux_version_code() < KERNEL_VERSION(4, 3, 0)) {
- select_reload_action(mpp, cmpp, "retain_hwhandler change");
+ select_reload_action(mpp, "retain_hwhandler change");
return;
}
@@ -813,7 +833,7 @@
remove_feature(&cmpp_feat, "queue_if_no_path");
remove_feature(&cmpp_feat, "retain_attached_hw_handler");
if (strncmp(mpp_feat, cmpp_feat, PARAMS_SIZE)) {
- select_reload_action(mpp, cmpp, "features change");
+ select_reload_action(mpp, "features change");
FREE(cmpp_feat);
FREE(mpp_feat);
return;
@@ -824,19 +844,19 @@
if (!cmpp->selector || strncmp(cmpp->selector, mpp->selector,
strlen(mpp->selector))) {
- select_reload_action(mpp, cmpp, "selector change");
+ select_reload_action(mpp, "selector change");
return;
}
if (cmpp->minio != mpp->minio) {
- select_reload_action(mpp, cmpp, "minio change");
+ select_reload_action(mpp, "minio change");
return;
}
if (!cmpp->pg || VECTOR_SIZE(cmpp->pg) != VECTOR_SIZE(mpp->pg)) {
- select_reload_action(mpp, cmpp, "path group number change");
+ select_reload_action(mpp, "path group number change");
return;
}
if (pgcmp(mpp, cmpp)) {
- select_reload_action(mpp, cmpp, "path group topology change");
+ select_reload_action(mpp, "path group topology change");
return;
}
if (cmpp->nextpg != mpp->bestpg) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/devmapper.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/devmapper.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/devmapper.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/devmapper.c
2020-12-16 13:10:32.000000000 +0100
@@ -119,6 +119,8 @@
int v[3];
#if defined(LIBDM_API_HOLD_CONTROL)
int minv[3] = {1, 2, 111};
+#elif defined(LIBDM_API_GET_ERRNO)
+ int minv[3] = {1, 2, 99};
#elif defined(LIBDM_API_DEFERRED)
int minv[3] = {1, 2, 89};
#elif defined(DM_SUBSYSTEM_UDEV_FLAG0)
@@ -1315,7 +1317,7 @@
map = dm_task_get_name(dmt);
if (map && strlen(map))
- response = STRDUP((const char *)dm_task_get_name(dmt));
+ response = STRDUP((const char *)map);
dm_task_destroy(dmt);
return response;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/devmapper.h
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/devmapper.h
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/devmapper.h
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/devmapper.h
2020-12-16 13:10:32.000000000 +0100
@@ -85,6 +85,11 @@
((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \
)
+#ifndef LIBDM_API_GET_ERRNO
+#include <errno.h>
+#define dm_task_get_errno(x) errno
+#endif
+
#define dm_log_error(lvl, cmd, dmt) \
condlog(lvl, "%s: libdm task=%d error: %s", __func__, \
cmd, strerror(dm_task_get_errno(dmt))) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/dict.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/dict.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/dict.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/dict.c
2020-12-16 13:10:32.000000000 +0100
@@ -543,6 +543,9 @@
declare_def_handler(checker_timeout, set_int)
declare_def_snprint(checker_timeout, print_nonzero)
+declare_def_handler(allow_usb_devices, set_yes_no)
+declare_def_snprint(allow_usb_devices, print_yes_no)
+
declare_def_handler(flush_on_last_del, set_yes_no_undef)
declare_def_snprint_defint(flush_on_last_del, print_yes_no_undef,
DEFAULT_FLUSH)
declare_ovr_handler(flush_on_last_del, set_yes_no_undef)
@@ -1759,6 +1762,7 @@
install_keyword("no_path_retry", &def_no_path_retry_handler,
&snprint_def_no_path_retry);
install_keyword("queue_without_daemon",
&def_queue_without_daemon_handler, &snprint_def_queue_without_daemon);
install_keyword("checker_timeout", &def_checker_timeout_handler,
&snprint_def_checker_timeout);
+ install_keyword("allow_usb_devices", &def_allow_usb_devices_handler,
&snprint_def_allow_usb_devices);
install_keyword("pg_timeout", &deprecated_handler, &snprint_deprecated);
install_keyword("flush_on_last_del", &def_flush_on_last_del_handler,
&snprint_def_flush_on_last_del);
install_keyword("user_friendly_names",
&def_user_friendly_names_handler, &snprint_def_user_friendly_names);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/discovery.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/discovery.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/discovery.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/discovery.c
2020-12-16 13:10:32.000000000 +0100
@@ -359,7 +359,7 @@
tgtdev = udev_device_get_parent(parent);
while (tgtdev) {
tgtname = udev_device_get_sysname(tgtdev);
- if (sscanf(tgtname, "end_device-%d:%d",
+ if (tgtname && sscanf(tgtname, "end_device-%d:%d",
&host, &tgtid) == 2)
break;
tgtdev = udev_device_get_parent(tgtdev);
@@ -378,11 +378,10 @@
while (tgtdev) {
value = udev_device_get_subsystem(tgtdev);
if (value && !strcmp(value, "usb")) {
- pp->sg_id.proto_id = SCSI_PROTOCOL_UNSPEC;
+ pp->sg_id.proto_id = SCSI_PROTOCOL_USB;
tgtname = udev_device_get_sysname(tgtdev);
strlcpy(node, tgtname, NODE_NAME_SIZE);
- condlog(3, "%s: skip USB device %s", pp->dev, node);
- return 1;
+ return 0;
}
tgtdev = udev_device_get_parent(tgtdev);
}
@@ -392,7 +391,7 @@
/* Check for FibreChannel */
tgtdev = udev_device_get_parent(parent);
value = udev_device_get_sysname(tgtdev);
- if (sscanf(value, "rport-%d:%d-%d",
+ if (value && sscanf(value, "rport-%d:%d-%d",
&host, &channel, &tgtid) == 3) {
tgtdev = udev_device_new_from_subsystem_sysname(udev,
"fc_remote_ports", value);
@@ -522,6 +521,11 @@
*/
value = udev_device_get_sysname(parent);
+ if (!value) {
+ udev_device_unref(hostdev);
+ return 1;
+ }
+
strncpy(pci_name, value, SLOT_NAME_SIZE);
udev_device_unref(hostdev);
return 0;
@@ -1471,6 +1475,8 @@
* host / bus / target / lun
*/
attr_path = udev_device_get_sysname(parent);
+ if (!attr_path)
+ return PATHINFO_FAILED;
pp->sg_id.lun = 0;
if (sscanf(attr_path, "%i.%i.%x",
&pp->sg_id.host_no,
@@ -2134,6 +2140,14 @@
if (rc != PATHINFO_OK)
return rc;
+
+ if (pp->bus == SYSFS_BUS_SCSI &&
+ pp->sg_id.proto_id == SCSI_PROTOCOL_USB &&
+ !conf->allow_usb_devices) {
+ condlog(3, "%s: skip USB device %s", pp->dev,
+ pp->tgt_node_name);
+ return PATHINFO_SKIPPED;
+ }
}
if (mask & DI_BLACKLIST && mask & DI_SYSFS) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/dmparser.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/dmparser.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/dmparser.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/dmparser.c
2020-12-16 13:10:32.000000000 +0100
@@ -66,7 +66,7 @@
int i, j;
int minio;
int nr_priority_groups, initial_pg_nr;
- char * p, * f;
+ char * p;
const char *const end = params + len;
char no_path_retry[] = "queue_if_no_path";
char retain_hwhandler[] = "retain_attached_hw_handler";
@@ -87,10 +87,9 @@
get_linux_version_code() < KERNEL_VERSION(4, 3, 0))
add_feature(&mp->features, retain_hwhandler);
- f = STRDUP(mp->features);
-
- APPEND(p, end, "%s %s %i %i", f, mp->hwhandler, nr_priority_groups,
- initial_pg_nr);
+ /* mp->features must not be NULL */
+ APPEND(p, end, "%s %s %i %i", mp->features, mp->hwhandler,
+ nr_priority_groups, initial_pg_nr);
vector_foreach_slot (mp->pg, pgp, i) {
pgp = VECTOR_SLOT(mp->pg, i);
@@ -111,12 +110,10 @@
}
}
- FREE(f);
condlog(4, "%s: assembled map [%s]", mp->alias, params);
return 0;
err:
- FREE(f);
return 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/foreign/nvme.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/foreign/nvme.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/foreign/nvme.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/foreign/nvme.c
2020-12-16 13:10:32.000000000 +0100
@@ -482,6 +482,7 @@
struct nvme_pathgroup *pg;
char real[PATH_MAX];
const char *ppath;
+ const char *psyspath;
int i;
ppath = realpath(syspath, real);
@@ -493,8 +494,8 @@
vector_foreach_slot(&map->pgvec, pg, i) {
struct nvme_path *path = nvme_pg_to_path(pg);
- if (!strcmp(ppath,
- udev_device_get_syspath(path->udev)))
+ psyspath = udev_device_get_syspath(path->udev);
+ if (psyspath && !strcmp(ppath, psyspath))
return path;
}
condlog(4, "%s: %s: %s not found", __func__, THIS, ppath);
@@ -538,6 +539,7 @@
struct udev_list_entry *item;
struct udev_device *blkdev = NULL;
struct udev_enumerate *enm = udev_enumerate_new(ctx->udev);
+ const char *devtype;
if (enm == NULL)
return NULL;
@@ -562,7 +564,9 @@
udev_list_entry_get_name(item));
if (tmp == NULL)
continue;
- if (!strcmp(udev_device_get_devtype(tmp), "disk")) {
+
+ devtype = udev_device_get_devtype(tmp);
+ if (devtype && !strcmp(devtype, "disk")) {
blkdev = tmp;
break;
} else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/foreign.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/foreign.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/foreign.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/foreign.c
2020-12-16 13:10:32.000000000 +0100
@@ -544,8 +544,8 @@
int buflen = MAX_LINE_LEN * MAX_LINES;
char *buf = NULL, *tmp = NULL;
- buf = malloc(buflen);
- buf[0] = '\0';
+ buf = calloc(1, buflen);
+
while (buf != NULL) {
char *c = buf;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/hwtable.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/hwtable.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/hwtable.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/hwtable.c
2020-12-16 13:10:32.000000000 +0100
@@ -745,26 +745,26 @@
.no_path_retry = (300 / DEFAULT_CHECKINT),
.prio_name = PRIO_ALUA,
},
- /*
- * Lenovo
- */
- {
- /*
+ /*
+ * Lenovo
+ */
+ {
+ /*
* DE Series
*
* Maintainer: NetApp RDAC team
<[email protected]>
*/
- .vendor = "LENOVO",
- .product = "DE_Series",
- .bl_product = "Universal Xport",
- .pgpolicy = GROUP_BY_PRIO,
- .checker_name = RDAC,
- .features = "2 pg_init_retries 50",
- .hwhandler = "1 rdac",
- .prio_name = PRIO_RDAC,
- .pgfailback = -FAILBACK_IMMEDIATE,
- .no_path_retry = 30,
- },
+ .vendor = "LENOVO",
+ .product = "DE_Series",
+ .bl_product = "Universal Xport",
+ .pgpolicy = GROUP_BY_PRIO,
+ .checker_name = RDAC,
+ .features = "2 pg_init_retries 50",
+ .hwhandler = "1 rdac",
+ .prio_name = PRIO_RDAC,
+ .pgfailback = -FAILBACK_IMMEDIATE,
+ .no_path_retry = 30,
+ },
/*
* NetApp
*/
@@ -1279,6 +1279,18 @@
.prio_name = PRIO_ALUA,
},
/*
+ * MacroSAN Technologies
+ */
+ {
+ /* MS family */
+ .vendor = "MacroSAN",
+ .product = "LU",
+ .pgpolicy = GROUP_BY_PRIO,
+ .pgfailback = -FAILBACK_IMMEDIATE,
+ .prio_name = PRIO_ALUA,
+ .no_path_retry = 30,
+ },
+ /*
* EOL
*/
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/print.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/print.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/print.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/print.c
2020-12-16 13:10:32.000000000 +0100
@@ -684,6 +684,8 @@
return snprintf(buff, len, "scsi:adt");
case SCSI_PROTOCOL_ATA:
return snprintf(buff, len, "scsi:ata");
+ case SCSI_PROTOCOL_USB:
+ return snprintf(buff, len, "scsi:usb");
case SCSI_PROTOCOL_UNSPEC:
default:
return snprintf(buff, len, "scsi:unspec");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/structs.h
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/structs.h
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/structs.h
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/structs.h
2020-12-16 13:10:32.000000000 +0100
@@ -174,6 +174,7 @@
SCSI_PROTOCOL_SAS = 6,
SCSI_PROTOCOL_ADT = 7, /* Media Changers */
SCSI_PROTOCOL_ATA = 8,
+ SCSI_PROTOCOL_USB = 9, /* USB Attached SCSI (UAS), and others */
SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/structs_vec.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/structs_vec.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/structs_vec.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/structs_vec.c
2020-12-16 13:10:32.000000000 +0100
@@ -148,67 +148,49 @@
* uninitialized struct path to pgp->paths, with only
* pp->dev_t filled in. Thus if pp->udev is set here,
* we know that the path is in pathvec already.
+ * However, it's possible that the path in pathvec is
+ * different from the one the kernel still had in its
+ * map.
*/
if (pp->udev) {
if (pathinfo_flags & ~DI_NOIO) {
conf = get_multipath_config();
pthread_cleanup_push(put_multipath_config,
conf);
- pathinfo(pp, conf, pathinfo_flags);
+ pathinfo(pp, conf,
pathinfo_flags|DI_WWID);
pthread_cleanup_pop(1);
}
- continue;
- }
-
- /* If this fails, the device is not in sysfs */
- pp->udev = get_udev_device(pp->dev_t, DEV_DEVT);
- if (!pp->udev) {
- condlog(2, "%s: discarding non-existing path
%s",
- mpp->alias, pp->dev_t);
- vector_del_slot(pgp->paths, j--);
- free_path(pp);
- must_reload = true;
} else {
- int rc;
+ /* If this fails, the device is not in sysfs */
+ pp->udev = get_udev_device(pp->dev_t, DEV_DEVT);
- devt2devname(pp->dev, sizeof(pp->dev),
- pp->dev_t);
- conf = get_multipath_config();
- pthread_cleanup_push(put_multipath_config,
- conf);
- pp->checkint = conf->checkint;
- rc = pathinfo(pp, conf,
- DI_SYSFS|DI_WWID|DI_BLACKLIST|
- pathinfo_flags);
- pthread_cleanup_pop(1);
- if (rc != PATHINFO_OK) {
- condlog(1, "%s: error %d in pathinfo,
discarding path",
- pp->dev, rc);
+ if (!pp->udev) {
+ condlog(2, "%s: discarding non-existing
path %s",
+ mpp->alias, pp->dev_t);
vector_del_slot(pgp->paths, j--);
free_path(pp);
must_reload = true;
- } else if (mpp_has_wwid && pp->wwid[0] != '\0'
- && strcmp(mpp->wwid, pp->wwid)) {
- condlog(0, "%s: path %s WWID %s doesn't
match, removing from map",
- mpp->wwid, pp->dev_t, pp->wwid);
- /*
- * This path exists, but in the wrong
map.
- * We can't reload the map from here.
- * Make sure it isn't used in this map
- * any more, and let the checker re-add
- * it as it sees fit.
- */
- dm_fail_path(mpp->alias, pp->dev_t);
- vector_del_slot(pgp->paths, j--);
- orphan_path(pp, "WWID mismatch");
- pp->tick = 1;
- must_reload = true;
+ continue;
} else {
- if (mpp_has_wwid && !strlen(pp->wwid)) {
- condlog(3, "%s: setting wwid
from map: %s",
- pp->dev, mpp->wwid);
- strlcpy(pp->wwid, mpp->wwid,
- sizeof(pp->wwid));
+ int rc;
+
+ devt2devname(pp->dev, sizeof(pp->dev),
+ pp->dev_t);
+ conf = get_multipath_config();
+
pthread_cleanup_push(put_multipath_config,
+ conf);
+ pp->checkint = conf->checkint;
+ rc = pathinfo(pp, conf,
+
DI_SYSFS|DI_WWID|DI_BLACKLIST|
+ pathinfo_flags);
+ pthread_cleanup_pop(1);
+ if (rc != PATHINFO_OK) {
+ condlog(1, "%s: error %d in
pathinfo, discarding path",
+ pp->dev, rc);
+ vector_del_slot(pgp->paths,
j--);
+ free_path(pp);
+ must_reload = true;
+ continue;
}
condlog(2, "%s: adding new path %s",
mpp->alias, pp->dev);
@@ -216,6 +198,36 @@
pp->tick = 1;
}
}
+
+ /* We don't set the map WWID from paths here */
+ if (!mpp_has_wwid)
+ continue;
+
+ /*
+ * At this point, pp->udev is valid and and pp->wwid
+ * is the best we could get
+ */
+ if (*pp->wwid && strcmp(mpp->wwid, pp->wwid)) {
+ condlog(0, "%s: path %s WWID %s doesn't match,
removing from map",
+ mpp->wwid, pp->dev_t, pp->wwid);
+ /*
+ * This path exists, but in the wrong map.
+ * We can't reload the map from here.
+ * Make sure it isn't used in this map
+ * any more, and let the checker re-add
+ * it as it sees fit.
+ */
+ dm_fail_path(mpp->alias, pp->dev_t);
+ vector_del_slot(pgp->paths, j--);
+ orphan_path(pp, "WWID mismatch");
+ pp->tick = 1;
+ must_reload = true;
+ } else if (!*pp->wwid) {
+ condlog(3, "%s: setting wwid from map: %s",
+ pp->dev, mpp->wwid);
+ strlcpy(pp->wwid, mpp->wwid,
+ sizeof(pp->wwid));
+ }
}
if (VECTOR_SIZE(pgp->paths) != 0)
continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/sysfs.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/sysfs.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/sysfs.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/sysfs.c
2020-12-16 13:10:32.000000000 +0100
@@ -278,7 +278,11 @@
continue;
}
table_name = dm_mapname(major, table_minor);
-
+ if (!table_name) {
+ condlog(2, "%s: mapname not found for %d:%d", check_dev,
+ major, table_minor);
+ continue;
+ }
condlog(0, "%s: reassign table %s old %s new %s", check_dev,
table_name, check_devt, new_devt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/util.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/util.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/util.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/util.c
2020-12-16 13:10:32.000000000 +0100
@@ -34,6 +34,19 @@
return i;
}
+#ifndef __GLIBC__
+/*
+ * glibc's non-destructive version of basename()
+ * License: LGPL-2.1-or-later
+ */
+static const char *__basename(const char *filename)
+{
+ char *p = strrchr(filename, '/');
+ return p ? p + 1 : filename;
+}
+#define basename(x) __basename(x)
+#endif
+
int
basenamecpy (const char *src, char *dst, size_t size)
{
@@ -378,11 +391,13 @@
if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
condlog(0, "can't set open fds limit to "
"%lu/%lu : %s",
- fd_limit.rlim_cur, fd_limit.rlim_max,
+ (unsigned long)fd_limit.rlim_cur,
+ (unsigned long)fd_limit.rlim_max,
strerror(errno));
} else {
condlog(3, "set open fds limit to %lu/%lu",
- fd_limit.rlim_cur, fd_limit.rlim_max);
+ (unsigned long)fd_limit.rlim_cur,
+ (unsigned long)fd_limit.rlim_max);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/util.h
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/util.h
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/util.h
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/util.h
2020-12-16 13:10:32.000000000 +0100
@@ -56,6 +56,9 @@
};
void free_scandir_result(struct scandir_result *);
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(x, y) 0
+#endif
/*
* ffsll() is also available on glibc < 2.27 if _GNU_SOURCE is defined.
* But relying on that would require that every program using this header file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/version.h
new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/version.h
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/libmultipath/version.h
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/libmultipath/version.h
2020-12-16 13:10:32.000000000 +0100
@@ -20,8 +20,8 @@
#ifndef _VERSION_H
#define _VERSION_H
-#define VERSION_CODE 0x000804
-#define DATE_CODE 0x050414
+#define VERSION_CODE 0x000805
+#define DATE_CODE 0x0b0914
#define PROG "multipath-tools"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/mpathpersist/main.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/mpathpersist/main.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/mpathpersist/main.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/mpathpersist/main.c
2020-12-16 13:10:32.000000000 +0100
@@ -153,6 +153,37 @@
return ret;
}
+static struct prout_param_descriptor *
+alloc_prout_param_descriptor(int num_transportid)
+{
+ struct prout_param_descriptor *paramp;
+
+ if (num_transportid < 0 || num_transportid > MPATH_MX_TIDS)
+ return NULL;
+
+ paramp= malloc(sizeof(struct prout_param_descriptor) +
+ (sizeof(struct transportid *) *
num_transportid));
+
+ if (!paramp)
+ return NULL;
+
+ memset(paramp, 0, sizeof(struct prout_param_descriptor) +
+ (sizeof(struct transportid *) * num_transportid));
+ return paramp;
+}
+
+static void free_prout_param_descriptor(struct prout_param_descriptor *paramp)
+{
+ unsigned int i;
+ if (!paramp)
+ return;
+
+ for (i = 0; i < paramp->num_transportid; i++)
+ free(paramp->trnptid_list[i]);
+
+ free(paramp);
+}
+
static int handle_args(int argc, char * argv[], int nline)
{
int c;
@@ -177,10 +208,8 @@
int prin = 1;
int prin_sa = -1;
int prout_sa = -1;
- int num_transport =0;
char *batch_fn = NULL;
void *resp = NULL;
- struct transportid * tmp;
memset(transportids, 0, MPATH_MX_TIDS * sizeof(struct transportid));
@@ -334,13 +363,13 @@
break;
case 'X':
- if (0 != construct_transportid(optarg,
transportids, num_transport)) {
+ if (0 != construct_transportid(optarg,
transportids, num_transportids)) {
fprintf(stderr, "bad argument to
'--transport-id'\n");
ret = MPATH_PR_SYNTAX_ERROR;
goto out;
}
- ++num_transport;
+ ++num_transportids;
break;
case 'l':
@@ -525,9 +554,12 @@
int j;
struct prout_param_descriptor *paramp;
- paramp= malloc(sizeof(struct prout_param_descriptor) +
(sizeof(struct transportid *)*(MPATH_MX_TIDS )));
-
- memset(paramp, 0, sizeof(struct prout_param_descriptor) +
(sizeof(struct transportid *)*(MPATH_MX_TIDS)));
+ paramp = alloc_prout_param_descriptor(num_transportids);
+ if (!paramp) {
+ fprintf(stderr, "malloc paramp failed\n");
+ ret = MPATH_PR_OTHER;
+ goto out_fd;
+ }
for (j = 7; j >= 0; --j) {
paramp->key[j] = (param_rk & 0xff);
@@ -544,13 +576,19 @@
if (param_aptpl)
paramp->sa_flags |= MPATH_F_APTPL_MASK;
- if (num_transport)
+ if (num_transportids)
{
paramp->sa_flags |= MPATH_F_SPEC_I_PT_MASK;
- paramp->num_transportid = num_transport;
- for (j = 0 ; j < num_transport; j++)
+ paramp->num_transportid = num_transportids;
+ for (j = 0 ; j < num_transportids; j++)
{
paramp->trnptid_list[j] = (struct transportid
*)malloc(sizeof(struct transportid));
+ if (!paramp->trnptid_list[j]) {
+ fprintf(stderr, "malloc
paramp->trnptid_list[%d] failed.\n", j);
+ ret = MPATH_PR_OTHER;
+ free_prout_param_descriptor(paramp);
+ goto out_fd;
+ }
memcpy(paramp->trnptid_list[j],
&transportids[j],sizeof(struct transportid));
}
}
@@ -558,12 +596,7 @@
/* PROUT commands other than 'register and move' */
ret = __mpath_persistent_reserve_out (fd, prout_sa, 0,
prout_type,
paramp, noisy);
- for (j = 0 ; j < num_transport; j++)
- {
- tmp = paramp->trnptid_list[j];
- free(tmp);
- }
- free(paramp);
+ free_prout_param_descriptor(paramp);
}
if (ret != MPATH_PR_SUCCESS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipath/main.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipath/main.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipath/main.c 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipath/main.c 2020-12-16
13:10:32.000000000 +0100
@@ -251,7 +251,6 @@
struct path *pp;
char *mapname;
vector pathvec = NULL;
- char params[PARAMS_SIZE], status[PARAMS_SIZE];
dev_t devt;
int r = 1, i, j;
@@ -285,11 +284,9 @@
if (mpp == NULL)
goto free;
- dm_get_map(mpp->alias, &mpp->size, params);
- dm_get_status(mpp->alias, status);
- disassemble_map(pathvec, params, mpp);
- update_pathvec_from_dm(pathvec, mpp, 0);
- disassemble_status(status, mpp);
+ if (update_multipath_table(mpp, pathvec, 0) != DMP_OK ||
+ update_multipath_status(mpp) != DMP_OK)
+ goto free;
vector_foreach_slot (mpp->pg, pg, i) {
vector_foreach_slot (pg->paths, pp, j) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipath/multipath.conf.5
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipath/multipath.conf.5
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipath/multipath.conf.5
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipath/multipath.conf.5
2020-12-16 13:10:32.000000000 +0100
@@ -205,6 +205,11 @@
(Since 2.6.31 kernel) Choose the path for the next bunch of I/O based on the
amount
of outstanding I/O to the path and its relative throughput.
.TP
+.I "historical-service-time 0"
+(Since 5.8 kernel) Choose the path for the next bunch of IOs based on the
+estimation of future service time based on the history of previous I/O
submitted
+to each path.
+.TP
The default is: \fBservice-time 0\fR
.RE
.
@@ -649,6 +654,18 @@
.RE
.
.
+.TP
+.B allow_usb_devices
+If set to
+.I no
+, all USB devices will be skipped during path discovery. If you intend to use
+multipath on USB attached devices, set this to \fIyes\fR.
+.RS
+.TP
+The default is: \fBno\fR
+.RE
+.
+.
.TP
.B flush_on_last_del
If set to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/Makefile
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/Makefile
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/Makefile
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/Makefile
2020-12-16 13:10:32.000000000 +0100
@@ -1,5 +1,9 @@
include ../Makefile.inc
+ifneq ($(call check_func,dm_task_get_errno,/usr/include/libdevmapper.h),0)
+ CFLAGS += -DLIBDM_API_GET_ERRNO
+endif
+
#
# debugging stuff
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/cli_handlers.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/cli_handlers.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/cli_handlers.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/cli_handlers.c
2020-12-16 13:10:32.000000000 +0100
@@ -820,7 +820,7 @@
{
struct vectors * vecs = (struct vectors *)data;
char * param = get_keyparam(v, MAP);
- int major, minor;
+ int major = -1, minor = -1;
char dev_path[PATH_SIZE];
char *refwwid, *alias = NULL;
int rc, count = 0;
@@ -1531,6 +1531,8 @@
return 1;
*reply = malloc(26);
+ if (!*reply)
+ return 1;
if (!get_be64(mpp->reservation_key)) {
sprintf(*reply, "none\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/main.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/main.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/main.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/main.c 2020-12-16
13:10:32.000000000 +0100
@@ -3361,7 +3361,6 @@
if (resp->prin_descriptor.prin_readkeys.additional_length == 0 )
{
condlog(1, "%s: No key found. Device may not be registered.",
pp->dev);
- ret = MPATH_PR_SUCCESS;
goto out;
}
condlog(2, "Multipath reservation_key: 0x%" PRIx64 " ",
@@ -3383,12 +3382,13 @@
{
condlog(0, "%s: Either device not registered or ", pp->dev);
condlog(0, "host is not authorised for registration. Skip
path");
- ret = MPATH_PR_OTHER;
goto out;
}
- param= malloc(sizeof(struct prout_param_descriptor));
- memset(param, 0 , sizeof(struct prout_param_descriptor));
+ param = (struct prout_param_descriptor *)MALLOC(sizeof(struct
prout_param_descriptor));
+ if (!param)
+ goto out;
+
param->sa_flags = mpp->sa_flags;
memcpy(param->sa_key, &mpp->reservation_key, 8);
param->num_transportid = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/waiter.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/waiter.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/multipathd/waiter.c
2020-09-16 22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/multipathd/waiter.c
2020-12-16 13:10:32.000000000 +0100
@@ -64,7 +64,7 @@
return;
condlog(3, "%s: stop event checker thread (%lu)", mpp->alias,
- mpp->waiter);
+ (unsigned long)mpp->waiter);
thread = mpp->waiter;
mpp->waiter = (pthread_t)0;
pthread_cleanup_push(cleanup_lock, &waiter_lock);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/Makefile
new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/Makefile
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/Makefile 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/Makefile 2020-12-16
13:10:32.000000000 +0100
@@ -14,6 +14,7 @@
TESTS := uevent parser util dmevents hwtable blacklist unaligned vpd pgpolicy \
alias directio valid devt
+HELPERS := test-lib.o test-log.o
.SILENT: $(TESTS:%=%.o)
.PRECIOUS: $(TESTS:%=%-test)
@@ -62,8 +63,8 @@
$(CC) $(CFLAGS) $($*-test_FLAGS) -c -o $@ $<
lib/libchecktur.so:
- mkdir lib
- ln -t lib ../libmultipath/{checkers,prioritizers,foreign}/*.so
+ mkdir -p lib
+ ln ../libmultipath/*/*.so lib
%.out: %-test lib/libchecktur.so
@echo == running $< ==
@@ -74,7 +75,7 @@
@LD_LIBRARY_PATH=$(multipathdir):$(mpathcmddir) \
valgrind --leak-check=full --error-exitcode=128 ./$< >$@ 2>&1
-OBJS = $(TESTS:%=%.o) test-lib.o
+OBJS = $(TESTS:%=%.o) $(HELPERS)
test_clean:
$(RM) $(TESTS:%=%.out) $(TESTS:%=%.vgr)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/alias.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/alias.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/alias.c 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/alias.c 2020-12-16
13:10:32.000000000 +0100
@@ -712,7 +712,7 @@
will_return(__wrap_write, strlen(ln) - 1);
expect_value(__wrap_ftruncate, length, offset);
will_return(__wrap_ftruncate, 0);
- expect_condlog(0, "Cannot write binding to bindings file : Success\n");
+ expect_condlog(0, "Cannot write binding to bindings file :");
alias = allocate_binding(0, "WWIDa", 1, "MPATH");
assert_ptr_equal(alias, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/test-log.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/test-log.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/test-log.c 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/test-log.c 2020-12-16
13:10:32.000000000 +0100
@@ -2,6 +2,7 @@
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
+#include <string.h>
#include <cmocka.h>
#include "log.h"
#include "test-log.h"
@@ -11,12 +12,14 @@
{
char buff[MAX_MSG_SIZE];
va_list ap;
+ char *expected;
check_expected(prio);
va_start(ap, fmt);
vsnprintf(buff, MAX_MSG_SIZE, fmt, ap);
va_end(ap);
- assert_string_equal(buff, mock_ptr_type(char *));
+ expected = mock_ptr_type(char *);
+ assert_memory_equal(buff, expected, strlen(expected));
}
void expect_condlog(int prio, char *string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/util.c
new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/util.c
--- old/multipath-tools-0.8.4+192+suse.1bc10ad/tests/util.c 2020-09-16
22:32:07.000000000 +0200
+++ new/multipath-tools-0.8.5+12+suse.3b0e9ca/tests/util.c 2020-12-16
13:10:32.000000000 +0100
@@ -617,6 +617,7 @@
const int sz = sizeof(src_str);
tst = malloc(sz);
+ assert_non_null(tst);
memset(tst, 'f', sizeof(src_str));
rc = strlcpy(tst, src_str, sz);
@@ -634,6 +635,7 @@
const int sz = sizeof(src_str);
tst = malloc(sz + 2);
+ assert_non_null(tst);
memset(tst, 'f', sz + 2);
rc = strlcpy(tst, src_str, sz + 2);
++++++ multipath-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.1aOPxN/_old 2020-12-18 19:52:26.001616198 +0100
+++ /var/tmp/diff_new_pack.1aOPxN/_new 2020-12-18 19:52:26.005616202 +0100
@@ -1,5 +1,5 @@
name: multipath-tools
-version: 0.8.4+192+suse.1bc10ad
-mtime: 1600288327
-commit: 1bc10ad9aee9598a36ee7107371a78b813baf968
+version: 0.8.5+12+suse.3b0e9ca
+mtime: 1608120632
+commit: 3b0e9cacfe6f016beea69b1e42b593961579ec34
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives:
https://lists.opensuse.org/archives/list/[email protected]