From: Benjamin Marzinski Subject: Re: [PATCH 44/54] libmultipath: adopt_paths(): don't bail out on single path failure Date: Mon, 10 Aug 2020 18:53:01 -0500 Message-ID: <20200810235301.GQ19233@octiron.msp.redhat.com> References: <20200709103623.8302-1-mwilck@suse.com> <20200709103623.8302-3-mwilck@suse.com> <20200717212525.GR11089@octiron.msp.redhat.com> <7a92c06bdbfdcfd3530607f4b8dbce7a5c9330a5.camel@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7a92c06bdbfdcfd3530607f4b8dbce7a5c9330a5.camel@suse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Content-Disposition: inline To: Martin Wilck Cc: dm-devel@redhat.com List-Id: dm-devel.ids On Wed, Aug 05, 2020 at 02:05:00PM +0200, Martin Wilck wrote: > On Fri, 2020-07-17 at 16:25 -0500, Benjamin Marzinski wrote: > > On Thu, Jul 09, 2020 at 12:36:13PM +0200, mwilck@suse.com wrote: > > > From: Martin Wilck > > > > > > If pathinfo fails for one path to be adopted, we currently > > > fail the entire function. This may cause ev_add_path() for a valid > > > path to fail because some other path is broken. Fix it by just > > > skipping paths that don't look healthy. > > > > This looks problematic to me. While I agree that we shouldn't make > > ev_add_path fail because some other path failed, but what about if > > the > > path we are trying to add fails in pathinfo(). In this case > > multipathd > > won't orphan the path and it will report "path added to devmap", even > > though it wasn't. Also what is the correct response for when you try > > to create a multipath device but none of the paths can be added. > > Should multipathd create a device with no paths? > > There are 3 callers of adopt_path(): > > 1 add_map_with_path() > 2 ev_add_path() > 3 update_map() > > adopt_paths() only ever adds new paths to a map, so in case 3), the map > would not come out without paths unless it had been empty before > already. For this caller, my patch is definitely an improvement. > > For 1) and 2), we are adding a specific path, so we should test in the > caller whether that specific path was successfully added, and fail > otherwise. Would that address your concern? That sounds reasonable -Ben > > Regards, > Martin > >