From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbdA2AOY (ORCPT ); Sat, 28 Jan 2017 19:14:24 -0500 Received: from [160.91.203.10] ([160.91.203.10]:49022 "EHLO smtp1.ccs.ornl.gov" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752875AbdA2AKQ (ORCPT ); Sat, 28 Jan 2017 19:10:16 -0500 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , Bruno Faccini , James Simmons Subject: [PATCH 13/60] staging: lustre: obdclass: health_check to report unhealthy upon LBUG Date: Sat, 28 Jan 2017 19:04:41 -0500 Message-Id: <1485648328-2141-14-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1485648328-2141-1-git-send-email-jsimmons@infradead.org> References: <1485648328-2141-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bruno Faccini When a LBUG has occurred, without panic_on_lbug being set, health_check sysfs file must return an unhealthy state. Signed-off-by: Bruno Faccini Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7486 Reviewed-on: http://review.whamcloud.com/17981 Reviewed-by: Bobi Jam Reviewed-by: Niu Yawei Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 22e6d1f..ef25db6 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -224,8 +224,10 @@ static ssize_t pinger_show(struct kobject *kobj, struct attribute *attr, int i; size_t len = 0; - if (libcfs_catastrophe) - return sprintf(buf, "LBUG\n"); + if (libcfs_catastrophe) { + len = sprintf(buf, "LBUG\n"); + healthy = false; + } read_lock(&obd_dev_lock); for (i = 0; i < class_devno_max(); i++) { -- 1.8.3.1