From patchwork Tue Dec 17 07:04:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 3359511 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92537C0D4A for ; Tue, 17 Dec 2013 07:08:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB8B220375 for ; Tue, 17 Dec 2013 07:08:50 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mail.kernel.org (Postfix) with ESMTP id EF1DA20348 for ; Tue, 17 Dec 2013 07:08:49 +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 rBH758k7017277; Tue, 17 Dec 2013 02:05:09 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBH74Bfs012915 for ; Tue, 17 Dec 2013 02:04:11 -0500 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBH74AY6024323 for ; Tue, 17 Dec 2013 02:04:10 -0500 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 rBH749lu017626 for ; Tue, 17 Dec 2013 02:04:10 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4A580ABC6; Tue, 17 Dec 2013 07:04:09 +0000 (UTC) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 17 Dec 2013 08:04:04 +0100 Message-Id: <1387263848-73945-2-git-send-email-hare@suse.de> In-Reply-To: <1387263848-73945-1-git-send-email-hare@suse.de> References: <1387263848-73945-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.834 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 1/5] multipathd: document return values for check_path() 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: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP check_path() should return '1' if the path has been checked, and '0' otherwise. So fixup missing return values and document it properly. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index fd70b70..bf34a76 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1107,6 +1107,9 @@ int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh) return 0; } +/* + * Returns '1' if the path has been checked, '0' otherwise + */ int check_path (struct vectors * vecs, struct path * pp) { @@ -1131,7 +1134,7 @@ check_path (struct vectors * vecs, struct path * pp) if (newstate == PATH_REMOVED) { condlog(2, "%s: remove path (checker)", pp->dev); ev_remove_path(pp, vecs); - return; + return 0; } if (newstate == PATH_UP) newstate = get_state(pp, 1); @@ -1152,7 +1155,7 @@ check_path (struct vectors * vecs, struct path * pp) pp->tick = 1; } } - return; + return 0; } /* * Async IO in flight. Keep the previous path state