libmultipath: get_prio(): really don't reset prio for inaccessible paths
PATCH 1/1 libmultipath: get_prio(): really don't reset prio for inaccessible paths
As pointed out by Ben Marzinski, my previous patch ebbb56f2 doesn't do what it pretends to do.
Fixes ebbb56f2 "libmultipath: get_prio(): don't reset prio for inaccessible
paths"
--- libmultipath/discovery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
libmultipath/discovery.c +3 -2
@@ -1648,10 +1648,11 @@ get_prio (struct path * pp)/* this changes pp->offline, but why not */ int state =path_offline (pp); -if (state ==PATH_DOWN || state ==PATH_PENDING ) +if (state ==PATH_DOWN || state ==PATH_PENDING ) { + pp->priority = old_prio;condlog (3 ,"%s: %s prio error in state %d, keeping prio = %d" , pp->dev,prio_name (p), state, pp->priority); -else { + }else {condlog (3 ,"%s: %s prio error in state %d" , pp->dev,prio_name (p), state); pp->priority =PRIO_UNDEF ;
Signature · 1 line
2.21.0
Quoted 5 lines · Martin Wilck
As pointed out by Ben Marzinski, my previous patch
ebbb56f2doesn't do what it pretends to do.Fixes ebbb56f2 "libmultipath: get_prio(): don't reset prio for inaccessiblepaths"
Reviewed-by Benjamin Marzinski <[email protected]>
Quoted 24 lines
--- libmultipath/discovery.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)libmultipath/discovery.c +3
-2@@ -1648,10 +1648,11 @@ get_prio (struct path * pp)/* this changes pp->offline, but why not */ int state =path_offline (pp); -if (state ==PATH_DOWN || state ==PATH_PENDING ) +if (state ==PATH_DOWN || state ==PATH_PENDING ) { + pp->priority = old_prio;condlog (3 ,"%s: %s prio error in state %d, keeping prio = %d" , pp->dev,prio_name (p), state, pp->priority); -else { + }else {condlog (3 ,"%s: %s prio error in state %d" , pp->dev,prio_name (p), state); pp->priority =PRIO_UNDEF ;Signature · 1 line
2.21.0