From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Benjamin Marzinski" Subject: Re: [PATCH] multipathd: restore paths after reconfigure Date: Thu, 21 Jul 2016 12:58:29 -0500 Message-ID: <20160721175829.GR8095@octiron.msp.redhat.com> References: <1467409569-16088-1-git-send-email-bmarzins@redhat.com> <758f2ab7-c8ed-06d9-f891-5cdaf893a5a7@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <758f2ab7-c8ed-06d9-f891-5cdaf893a5a7@sandisk.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Bart Van Assche Cc: device-mapper development , Christophe Varoqui List-Id: dm-devel.ids On Thu, Jul 21, 2016 at 09:29:37AM -0700, Bart Van Assche wrote: > 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? Oops! That was a typo. I'll send off a quick patch. Thanks for catching that. -Ben > > Thanks, > > Bart.