On Thu, 2017-12-07 at 12:48 -0600, Benjamin Marzinski wrote:
> Right now multipath does some extra work to set the values for
> no_path_retry and retain_hwhandler on existing maps it reads in from
> the
> kernel.  This is so that select_action() can use these values to see
> if
> it needs to reload the devices. However, the way it works, the
> queue_if_no_path feature isn't always set correctly, and multipath
> has
> to go back afterwards and reset the value anyways.
> 
> It's simpler for select_action to just look at the values in the
> features line it read in from the kernel and the features line it
> would
> like the new map to have.  By comparing these, it also avoids the
> problem where the no_path_retry values match, so it doesn't reload,
> but
> the actual queue_if_no_path feature value is incorrect, so it has to
> go
> back and reset it. It can also skip calling setup_feature() entirely.
> 
> To do this, assemble_map() needs to update mp->features. This would
> otherwise partially happen when it had to reset the queue_if_no_path
> value.  retain_attached_hw_handler was never getting updated before,
> so
> the output when you created a map was incorrect.
> 
> Signed-off-by: Benjamin Marzinski <[email protected]>

I had something similar in mind, but this is actually cleaner.
Reviewed-by: Martin Wilck <[email protected]>
-- 
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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

Reply via email to