From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 344C241C6D for ; Wed, 4 Sep 2024 18:51:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725475885; cv=none; b=O22YCE7Rpv9dABl9fiXC6R9PcVCv+9x3rU6tw1mNCJzRkomHZ4e+WJoE5OXyucYK32nHuO3jILF0DQHOFbUiDAyXjgCmtS97d6ufqlfXTpAC+9voC+AynI9pQgP2/1gwHRfmWdrOjdeleNxiu9TjjSvO6jM35YlE9hTQ5Y08JR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725475885; c=relaxed/simple; bh=UHRp3daSXWuCYQvJhkga59ZKjmwlydOMqXS3/UCm9Ys=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=oihn8FbZXb+Lbug01DMXzVJYvELlaKtA8bHE2tSQ6mW/tbvnCyPRjCTALWjQHJc7RQ6oeda6cbYyCehCvvUJCIzHf53oj65mcWSh8pV1Id4/RqyVnWniAsD44Xi0i6rNOce9XBc2xG31BvUQ0ZTw9eO/tCynKtxo4AcW9yQKJXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IKdn5v0y; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IKdn5v0y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725475883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG4rFrJsq4fS1qsAcLz5wQtXNn90zCKedlje3GTQbXY=; b=IKdn5v0yzt/SiRi37ca/2irP2ufmRmInLLEPa+J8CqkXF2INrjJ21u6j5jR86LfjzQuq22 +JgNrByjevWwVfHUYBpqmiL3SsGtlWpvlgXa5riD9e8vBIGLrwGrn65sj4tDl4bISan14c Df1YIWLEONs5YockWu5ywYUo4bPSsIQ= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-156-jR7vcUvgOcqY0z0BSzWC5w-1; Wed, 04 Sep 2024 14:51:21 -0400 X-MC-Unique: jR7vcUvgOcqY0z0BSzWC5w-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C76AC1956089; Wed, 4 Sep 2024 18:51:20 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 70A4F1956056; Wed, 4 Sep 2024 18:51:20 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 484IpJHL480584 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 4 Sep 2024 14:51:19 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 484IpJHj480583; Wed, 4 Sep 2024 14:51:19 -0400 Date: Wed, 4 Sep 2024 14:51:19 -0400 From: Benjamin Marzinski To: Martin Wilck Cc: Christophe Varoqui , device-mapper development Subject: Re: [PATCH 10/15] multipathd: split check_path into two functions Message-ID: References: <20240828221757.4060548-1-bmarzins@redhat.com> <20240828221757.4060548-11-bmarzins@redhat.com> <131273007ab11d8a866e395c1e3aa80598aa1dbe.camel@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <131273007ab11d8a866e395c1e3aa80598aa1dbe.camel@suse.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Sep 04, 2024 at 05:38:52PM +0200, Martin Wilck wrote: > On Wed, 2024-08-28 at 18:17 -0400, Benjamin Marzinski wrote: > > Split out the code that updates a path's state and sets up the next > > check time into its own function, update_path(). > > > > Signed-off-by: Benjamin Marzinski > > --- > >  multipathd/main.c | 31 ++++++++++++++++++++++--------- > >  1 file changed, 22 insertions(+), 9 deletions(-) > > > > diff --git a/multipathd/main.c b/multipathd/main.c > > index 94d4e421..300f8247 100644 > > --- a/multipathd/main.c > > +++ b/multipathd/main.c > > @@ -2390,6 +2390,7 @@ sync_mpp(struct vectors * vecs, struct > > multipath *mpp, unsigned int ticks) > >  } > >   > >  enum check_path_return { > > + CHECK_PATH_STARTED, > >   CHECK_PATH_CHECKED, > >   CHECK_PATH_SKIPPED, > >   CHECK_PATH_REMOVED, > > @@ -2629,13 +2630,10 @@ update_path_state (struct vectors * vecs, > > struct path * pp) > >  } > >   > >  static int > > -check_path (struct vectors * vecs, struct path * pp, unsigned int > > ticks, > > -     time_t start_secs) > > +check_path (struct path * pp, unsigned int ticks) > > check_path() used to be one of our core functions, and you now re- > introduce it with quite different semantics.  > > Perhaps choose a new name? Sure. Although the new check_path() is just the beginning part of the old check_path(), where we actually run the checker, so it seems reasonable to me. But your objection is also reasonable. I was just getting sick of coming up with new function names by this point. -Ben > > Martin