libmultipath: coalesce_paths: fix size mismatch handling
authorMartin Wilck <mwilck@suse.com>
Mon, 10 Dec 2018 09:49:51 +0000 (10:49 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 10 Dec 2018 23:40:58 +0000 (00:40 +0100)
commite32d521d3009c902e0794c08692140d8cabe4b5d
treedf964922945b965eb41b04877e11c7280dd46ba7
parent3d0471456a0c8e1cbffd83ef5a267f7da33a8eff
libmultipath: coalesce_paths: fix size mismatch handling

When there are paths with the same WWID but different sizes, and
coalesce_paths() walks the pathvec, it checks paths _after_
the current one for size mismatch and sets ACT_REJECT. However,
these paths will be reached in the main loop later, and this time
the already handled paths will not be checked for size mismatch;
thus a map could be created, possibly even with mismatching
devices.

Fix that by tracking which paths were already discarded, and
skipping them in the main loop later.

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/configure.c
libmultipath/util.h