From patchwork Tue Jan 8 13:54: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: 1946111 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork2.kernel.org (Postfix) with ESMTP id E0703DF23A for ; Tue, 8 Jan 2013 13:58:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DtnCt002205; Tue, 8 Jan 2013 08:55:49 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DsXfn004655 for ; Tue, 8 Jan 2013 08:54:33 -0500 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DsXHU010405 for ; Tue, 8 Jan 2013 08:54:33 -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 r08DsWdf022821 for ; Tue, 8 Jan 2013 08:54:32 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 3EC72A520A; Tue, 8 Jan 2013 14:54:29 +0100 (CET) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 8 Jan 2013 14:54:04 +0100 Message-Id: <1357653259-62650-27-git-send-email-hare@suse.de> In-Reply-To: <1357653259-62650-1-git-send-email-hare@suse.de> References: <1357653259-62650-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.299 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.21 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 26/42] Print log messages when updating tables failed 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 Add some logging messages to identify the case of failure. Signed-off-by: Hannes Reinecke --- libmultipath/structs_vec.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 6d36d58..384afb7 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -246,11 +246,15 @@ update_multipath_table (struct multipath *mpp, vector pathvec) if (!mpp) return 1; - if (dm_get_map(mpp->alias, &mpp->size, params)) + if (dm_get_map(mpp->alias, &mpp->size, params)) { + condlog(3, "%s: cannot get map", mpp->alias); return 1; + } - if (disassemble_map(pathvec, params, mpp)) + if (disassemble_map(pathvec, params, mpp)) { + condlog(3, "%s: cannot disassemble map", mpp->alias); return 1; + } return 0; } @@ -263,11 +267,15 @@ update_multipath_status (struct multipath *mpp) if (!mpp) return 1; - if(dm_get_status(mpp->alias, status)) + if (dm_get_status(mpp->alias, status)) { + condlog(3, "%s: cannot get status", mpp->alias); return 1; + } - if (disassemble_status(status, mpp)) + if (disassemble_status(status, mpp)) { + condlog(3, "%s: cannot disassemble status", mpp->alias); return 1; + } return 0; }