[dm-devel] [PATCH] multipathd: fix mpp->hwe handling when paths are freed

Martin Wilck mwilck at suse.de
Wed Nov 21 09:16:33 UTC 2018


On Tue, 2018-11-20 at 22:24 -0600, Benjamin Marzinski wrote:
> Commit 1f962693 didn't deal with all of cases where a path that was
> part
> of a multipath device could be removed. verify_paths() removes any
> path
> that no longer exists in sysfs.  mpp->hwe needs to be updated here as
> well, since verify_paths() could remove the path whose hwe vector is
> pointed to by mpp->hwe.  Also, now that extract_hwe_from_path() is
> called in verify_paths(), the extract_hwe_from_path() calls that
> happened immediately after verify_paths() can be dropped.
> 
> The other part of this fix is mostly cosmetic. In ev_add_path(), if
> domap() fails after the path is added to the multipath device and
> verify_paths() is called, the code can loop back to the rescan label.
> If
> the size of the path or the multipath device changed in the interim,
> ev_add_path() would remove the path, without updating mpp->hwe; but
> there is no way for the size to change. Just to make that clearer in
> the
> code, I've moved the size check to before the rescan label so it only
> happens once.
> 
> Fixes: 1f962693 "multipathd: fix mpp->hwe handling on path removal"
> Cc: Martin Wilck <mwilck at suse.com>
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

Thanks!
Reviewed-by: Martin Wilck <mwilck at suse.com>

Martin





More information about the dm-devel mailing list