[dm-devel] [PATCH] multipathd: restore paths after reconfigure
Bart Van Assche
bart.vanassche at sandisk.com
Thu Jul 21 16:29:37 UTC 2016
On 07/01/2016 02:46 PM, Benjamin Marzinski wrote:
> multipathd has code to finish gathering the information of paths that
> were not active at the time they were discovered. When the checker loop
> goes to check a path, and notices that it wasn't fully initialized, it
> is supposed to complete the initialization. However the code is broken.
> This means that if you reconfigure multipathd while paths are down, they
> will no longer be usable. This patch makes sure that check_path will
> actually rerun pathinfo to finish setting up the path, so that after the
> path comes back up, it will be usable again.
> [ ... ]
> @@ -1779,7 +1785,13 @@ checkerloop (void *ap)
> lock(vecs->lock);
> pthread_testcancel();
> vector_foreach_slot (vecs->pathvec, pp, i) {
> - num_paths += check_path(vecs, pp, ticks);
> + rc = check_path(vecs, pp, ticks);
> + if (rc < 0) {
> + vector_del_slot(vecs->pathvec, i);
> + free_path(pp);
> + i--;
> + } else;
> + num_paths += rc;
> }
> lock_cleanup_pop(vecs->lock);
> }
Hi Ben,
Was the semicolon after the "else" intended or was it a typo?
Thanks,
Bart.
More information about the dm-devel
mailing list