[dm-devel] [PATCH 2/4] libmultipath: warn if freeing path that holds mpp->hwe
mwilck at suse.com
mwilck at suse.com
Mon Jul 13 11:07:41 UTC 2020
From: Martin Wilck <mwilck at suse.com>
This just adds an error message to the previous patch.
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
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
More information about the dm-devel
mailing list