Message ID | 20240713060506.2015463-16-bmarzins@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
Series | path checker refactor and misc fixes | expand |
On Sat, 2024-07-13 at 02:04 -0400, Benjamin Marzinski wrote: > reload_and_sync_map() needs to always resync the map after calling > reload_map(), because the mpp state may no longer match the kernel > state if reload_map() fails. > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Reviewed-by: Martin Wilck <mwilck@suse.com>
diff --git a/multipathd/main.c b/multipathd/main.c index c9cb9ac8..0f763e29 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -2188,13 +2188,15 @@ static int reload_map(struct vectors *vecs, struct multipath *mpp, int reload_and_sync_map(struct multipath *mpp, struct vectors *vecs) { + int ret = 0; + if (reload_map(vecs, mpp, 1)) - return 1; + ret = 1; if (setup_multipath(vecs, mpp) != 0) return 2; sync_map_state(mpp); - return 0; + return ret; } static int check_path_reinstate_state(struct path * pp) {
reload_and_sync_map() needs to always resync the map after calling reload_map(), because the mpp state may no longer match the kernel state if reload_map() fails. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- multipathd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)