942c9b6ed8
Update Source to upstream version 0.8.2 * Previoud patches 0001-0017 & 0027 are included in this commit Rename files * Previous patches 0018-0026 & 0028 are not patches 0021-0030 Add 0001-libmultipath-make-vector_foreach_slot_backwards-work.patch Add 0002-libmultipath-add-marginal-paths-and-groups-infrastru.patch Add 0003-tests-add-path-grouping-policy-unit-tests.patch Add 0004-libmultipath-add-wrapper-function-around-pgpolicyfn.patch Add 0005-tests-update-pgpolicy-tests-to-work-with-group_paths.patch Add 0006-libmultipath-fix-double-free-in-pgpolicyfn-error-pat.patch Add 0007-libmultipath-consolidate-group_by_-functions.patch Add 0008-libmultipath-make-pgpolicyfn-take-a-paths-vector.patch Add 0009-libmultipath-make-group_paths-handle-marginal-paths.patch Add 0010-tests-add-tests-for-grouping-marginal-paths.patch Add 0011-libmultipath-add-marginal_pathgroups-config-option.patch Add 0012-libmutipath-deprecate-delay_-_checks.patch Add 0013-multipathd-use-marginal_pathgroups.patch Add 0014-multipath-update-man-pages.patch * The above 13 patches add the marinal_pathgroups option Add 0015-multipath.conf-add-enable_foreign-parameter.patch Add 0016-multipath.conf.5-document-foreign-library-support.patch * The above 2 patches add the enable_foreign option Add 0017-mpathpersist-remove-broken-unused-code.patch Add 0018-libmultipath-EMC-PowerMax-NVMe-device-config.patch Add 0019-mpathpersist-fix-leaks.patch Add 0020-libmultipath-fix-mpcontext-initialization.patch * The above 20 patches have been submitted upstream
52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
From 826c100b0cbe72c5d770614cea8898afec09628c Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Mon, 9 Sep 2019 16:18:33 -0500
|
|
Subject: [PATCH] mpathpersist: remove broken/unused code
|
|
|
|
The test for an empty pp->dev in updatepaths() dates back to when
|
|
disassemble_map() didn't fill in pp->dev for newly added paths, and it
|
|
was meant to catch paths that got added by disassemble_map(). With the
|
|
mpathpersist speedup code, all paths get added by disassemble_map().
|
|
However, disassemble_map() now calls devt2devname() to set pp->dev if
|
|
possible. This means that there is no point in calling devt2devname()
|
|
again in updatepaths(). If for some reason it did return success, the
|
|
current code would still fail, since it doesn't set pp->udev in this
|
|
code path. The best thing to do if disassemble_map() couldn't set
|
|
pp->dev is simply to fail the path.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmpathpersist/mpath_persist.c | 16 ++++------------
|
|
1 file changed, 4 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
|
|
index 53022f5b..603cfc3b 100644
|
|
--- a/libmpathpersist/mpath_persist.c
|
|
+++ b/libmpathpersist/mpath_persist.c
|
|
@@ -82,18 +82,10 @@ updatepaths (struct multipath * mpp)
|
|
|
|
vector_foreach_slot (pgp->paths, pp, j){
|
|
if (!strlen(pp->dev)){
|
|
- if (devt2devname(pp->dev, FILE_NAME_SIZE,
|
|
- pp->dev_t)){
|
|
- /*
|
|
- * path is not in sysfs anymore
|
|
- */
|
|
- pp->state = PATH_DOWN;
|
|
- continue;
|
|
- }
|
|
- pp->mpp = mpp;
|
|
- conf = get_multipath_config();
|
|
- pathinfo(pp, conf, DI_ALL);
|
|
- put_multipath_config(conf);
|
|
+ /*
|
|
+ * path is not in sysfs anymore
|
|
+ */
|
|
+ pp->state = PATH_DOWN;
|
|
continue;
|
|
}
|
|
pp->mpp = mpp;
|
|
--
|
|
2.17.2
|
|
|