From: Martin Wilck <[email protected]>

This just adds an error message to the previous patch.

Signed-off-by: Martin Wilck <[email protected]>
---
 libmultipath/structs_vec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 9bbe5d1..0a73d2a 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -93,8 +93,11 @@ int adopt_paths(vector pathvec, struct multipath *mpp)
 void orphan_path(struct path *pp, const char *reason)
 {
        condlog(3, "%s: orphan path, %s", pp->dev, reason);
-       if (pp->mpp && pp->mpp->hwe == pp->hwe)
+       if (pp->mpp && pp->hwe && pp->mpp->hwe == pp->hwe) {
+               condlog(0, "BUG: orphaning path %s that holds hwe of %s",
+                       pp->dev, pp->mpp->alias);
                pp->mpp->hwe = NULL;
+       }
        pp->mpp = NULL;
        pp->dmstate = PSTATE_UNDEF;
        pp->uid_attribute = NULL;
-- 
2.26.2


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to