multipath: update_prio fixes
cover multipath: update_prio fixes
Reworked Brian's patch, and added a small cleanup on top.
Brian Bunker (1):
multipathd: the local path change is not considered
Martin Wilck (1):
multipathd: make update_prio static, and rename refresh_all param
multipathd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/2 multipathd: the local path change is not considered
From: Brian Bunker <[email protected]>
When update_prio is called, there is a check to see if the local path has a priority change. Then all the remaining paths are simliarly checked.
Only the result of paths not matching the local path are considered in the calculation of 'changed'. In the case of failed paths becoming again available this can lead to multipath not reloading.
The result will look like this:3624a93703c9f34490f6140a100011010 dm-2 PURE,FlashArray size=3.0T features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active | |- 1:0:0:1 sdb 8:16 active ready running | |- 9:0:0:1 sdc 8:32 active ready running | |- 11:0:0:1 sdd 8:48 active ready running | `- 13:0:0:1 sdh 8:112 active ready running `-+- policy='service-time 0' prio=50 status=enabled |- 8:0:0:1 sde 8:64 active ready running |- 10:0:0:1 sdf 8:80 active ready running |- 12:0:0:1 sdg 8:96 active ready running
`- 14:0:0:1 sdi 8:128 active ready running
Where the path's priorities are updated, but the path group is not activated.
--- multipathd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
multipathd/main.c +3 -1
@@ -2115,7 +2115,9 @@ int update_prio(struct path *pp, int refresh_all)pthread_cleanup_pop (1 ); } -if (pp->priority == oldpriority && !refresh_all) +if (pp->priority != oldpriority) + changed =1 ; +else if (!refresh_all)return 0 ; vector_foreach_slot (pp->mpp->pg, pgp, i) {
Signature · 1 line
2.43.0
PATCH 2/2 multipathd: make update_prio static, and rename refresh_all param
In reply to Martin WilckRename the "refresh_all" parameter so that its semantic becomes more obvious. Commit 6ccd7b8 ("multipathd: only refresh priorities in update_prio()") explains it.
--- multipathd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
multipathd/main.c +2 -2
@@ -2099,7 +2099,7 @@ partial_retrigger_tick(vector pathvec) } } -int update_prio (struct path *pp,int refresh_all) +static int update_prio (struct path *pp,int force_refresh_all) {int oldpriority;struct path *pp1;
@@ -2117,7 +2117,7 @@ int update_prio(struct path *pp, int refresh_all)if (pp->priority != oldpriority) changed =1 ; -else if (!refresh_all) +else if (!force_refresh_all)return 0 ; vector_foreach_slot (pp->mpp->pg, pgp, i) {
Signature · 1 line
2.43.0
Quoted 1 line · Martin Wilck
Reworked Brian's patch, and added a small cleanup on top.
For the set:
Quoted 12 lines
Brian Bunker (1):
multipathd: the local path change is not consideredMartin Wilck (1):
multipathd: makeupdate_priostatic, and renamerefresh_allparammultipathd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Signature · 1 line
2.43.0