From patchwork Wed Jul 29 15:46:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 38177 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6TFlJTu012286 for ; Wed, 29 Jul 2009 15:47:20 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 342A86198D4; Wed, 29 Jul 2009 11:47:19 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n6TFlHH7016328 for ; Wed, 29 Jul 2009 11:47:18 -0400 Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6TFlH31013638 for ; Wed, 29 Jul 2009 11:47:17 -0400 Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id n6TFl04r007396 for ; Wed, 29 Jul 2009 11:47:01 -0400 Received: from source ([147.145.40.20]) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKSnBu9HYDt2u6eMeJdTGf6CgMzj5dVk72@postini.com; Wed, 29 Jul 2009 08:47:01 PDT Received: from milmhbs0.lsil.com (mhbs.lsil.com [147.145.1.30]) by mail0.lsil.com (8.12.11/8.12.11) with ESMTP id n6TFknpQ011312 for ; Wed, 29 Jul 2009 08:46:49 -0700 (PDT) Received: from coscas01.lsi.com (coscas01.co.lsil.com [172.21.36.60]) by milmhbs0.lsil.com (8.12.11/8.12.11) with ESMTP id n6TFkqiU027406 for ; Wed, 29 Jul 2009 08:46:52 -0700 Received: from cosmail01.lsi.com ([172.21.36.24]) by coscas01.lsi.com ([172.21.36.60]) with mapi; Wed, 29 Jul 2009 09:46:48 -0600 From: "Moger, Babu" To: "dm-devel@redhat.com" Date: Wed, 29 Jul 2009 09:46:48 -0600 Thread-Topic: [PATCH] dm mpath: Skip calling activate_path if the path is already failed Thread-Index: AcoQY8g5zJrLbEcQREaOV8tuc7B29A== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.32 X-Scanned-By: MIMEDefang 2.39 X-RedHat-Spam-Score: -3.769 X-MIME-Autoconverted: from quoted-printable to 8bit by listman.util.phx.redhat.com id n6TFlHH7016328 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH] dm mpath: Skip calling activate_path if the path is already failed X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 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 This patch adds a check to skip failed paths while calling activate_path. If the path is already failed then activate_path will fail for sure. We don't have to call in that case. Signed-off-by: Babu Moger Acked-by: Hannes Reinecke --- -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel --- linux-2.6.31-rc3/drivers/md/dm-mpath.c.orig 2009-07-27 10:30:39.000000000 -0500 +++ linux-2.6.31-rc3/drivers/md/dm-mpath.c 2009-07-27 10:35:50.000000000 -0500 @@ -454,6 +454,10 @@ static void process_queued_ios(struct wo m->pg_init_count++; m->pg_init_required = 0; list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) { + /* Skip failed paths */ + if (!tmp->is_active) + continue; + if (queue_work(kmpath_handlerd, &tmp->activate_path)) m->pg_init_in_progress++; }