From patchwork Fri May 3 06:59:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 2515961 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork1.kernel.org (Postfix) with ESMTP id 1D01A3FD1A for ; Fri, 3 May 2013 07:03:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r436xE9P007211; Fri, 3 May 2013 02:59:16 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r436xDII025425 for ; Fri, 3 May 2013 02:59:13 -0400 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r436xDSR022056 for ; Fri, 3 May 2013 02:59:13 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r436xBDv009992 for ; Fri, 3 May 2013 02:59:12 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 608A3A5557 for ; Fri, 3 May 2013 08:59:11 +0200 (CEST) Message-ID: <5183603F.5000003@suse.de> Date: Fri, 03 May 2013 08:59:11 +0200 From: Hannes Reinecke User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: dm-devel@redhat.com References: <1367531197-8987-1-git-send-email-bmarzins@redhat.com> <1367531197-8987-12-git-send-email-bmarzins@redhat.com> In-Reply-To: <1367531197-8987-12-git-send-email-bmarzins@redhat.com> X-Enigmail-Version: 1.6a1pre X-RedHat-Spam-Score: -8.772 (BAYES_00, DCC_REPUT_00_12, FRT_OFFER2, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.21 X-loop: dm-devel@redhat.com Subject: Re: [dm-devel] [PATCH 11/16] Fix max path checker timing X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com On 05/02/2013 11:46 PM, Benjamin Marzinski wrote: > Due to some code being placed inside the wrong block, the number of > seconds to wait between path checks (pp->tick), was only getting set to > the path's individual check interval if that wasn't equal to the max > check interval. Otherwise it was using the default for a failed path. > This patch makes sure that pp->ticks always always gets set correctly > for active paths. > > Signed-off-by: Benjamin Marzinski > --- > multipathd/main.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/multipathd/main.c b/multipathd/main.c > index 440d254..df1c5b9 100644 > --- a/multipathd/main.c > +++ b/multipathd/main.c > @@ -1219,11 +1219,10 @@ check_path (struct vectors * vecs, struct path * pp) > pp->checkint = 2 * pp->checkint; > else > pp->checkint = conf->max_checkint; > - > - pp->tick = pp->checkint; > - condlog(4, "%s: delay next check %is", > - pp->dev_t, pp->tick); > } > + pp->tick = pp->checkint; > + condlog(4, "%s: delay next check %is", > + pp->dev_t, pp->tick); > } > } > else if (newstate == PATH_DOWN) { > But then the message is wrong, isn't it? We should be printing the 'delay next check' message only if the check was actually delayed, ie inside the block. So I think something like this should be more appropriate (minus line-breaks, of course): } else if (newstate == PATH_DOWN) { Cheers, Hannes diff --git a/multipathd/main.c b/multipathd/main.c index 6471d24..9901b02 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1235,10 +1235,10 @@ check_path (struct vectors * vecs, struct path * pp) else pp->checkint = conf->max_checkint; - pp->tick = pp->checkint; condlog(4, "%s: delay next check %is", pp->dev_t, pp->tick); } + pp->tick = pp->checkint; }