From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Marzinski Subject: Re: [PATCH 02/11] libmultipath: copy mpp->hwe from pp->hwe Date: Fri, 25 Sep 2020 11:06:07 -0500 Message-ID: <20200925160607.GQ11108@octiron.msp.redhat.com> References: <20200924133644.14034-1-mwilck@suse.com> <20200924133644.14034-3-mwilck@suse.com> <20200924201245.GH11108@octiron.msp.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 Fri, Sep 25, 2020 at 06:01:26PM +0200, Martin Wilck wrote: > On Thu, 2020-09-24 at 15:12 -0500, Benjamin Marzinski wrote: > > On Thu, Sep 24, 2020 at 03:36:35PM +0200, mwilck@suse.com wrote: > > > From: Martin Wilck > > > > > > Since f0462f0 ("libmultipath: use vector for for pp->hwe and mp- > > > >hwe"), > > > we've been trying to fix issues caused by paths getting freed and > > > mpp->hwe > > > dangling. This approach couldn't work because we need mpp->hwe to > > > persist, > > > even if all paths are removed from the map. Before f0462f0, a > > > simple > > > assignment worked, because the lifetime of the hwe wasn't bound to > > > the > > > path. But now, we need to copy the vector. It turns out that we > > > need to set > > > mpp->hwe only in two places, add_map_with_path() and setup_map(), > > > and > > > that the code is simplified overall. > > > > Unless I'm missing someting, it looks like > > __mpath_persistent_reserve_out() will call select_all_tg_pt(), which > > uses mpp->hwe, without ever setting it. Granted, I don't see how > > this > > was supposed to work before your patch either. > > Right, it doesn't. Thanks for spotting it. > Ok to create a new, separate patch for it? Sure. Reviewed-by: Benjamin Marzinski > > Regards, > Martin >