Whamcloud - gitweb
LU-7486 obdclass: health_check to report unhealthy upon LBUG
[fs/lustre-release.git] / lustre / obdclass / linux / linux-module.c
index c019863..37cbd24 100644 (file)
@@ -73,7 +73,6 @@
 #include <lprocfs_status.h>
 #include <lustre_ioctl.h>
 #include <lustre_ver.h>
-#include <lustre/lustre_build_version.h>
 
 int proc_version;
 
@@ -215,9 +214,7 @@ struct miscdevice obd_psdev = {
 #ifdef CONFIG_PROC_FS
 static int obd_proc_version_seq_show(struct seq_file *m, void *v)
 {
-       seq_printf(m, "lustre: %s\nkernel: %s\nbuild:  %s\n",
-                  LUSTRE_VERSION_STRING, "patchless_client",
-                  BUILD_VERSION);
+       seq_printf(m, "lustre: %s", LUSTRE_VERSION_STRING);
        return 0;
 }
 LPROC_SEQ_FOPS_RO(obd_proc_version);
@@ -248,8 +245,10 @@ static int obd_proc_health_seq_show(struct seq_file *m, void *data)
        bool healthy = true;
        int i;
 
-       if (libcfs_catastrophe)
+       if (libcfs_catastrophe) {
                seq_printf(m, "LBUG\n");
+               healthy = false;
+       }
 
        read_lock(&obd_dev_lock);
        for (i = 0; i < class_devno_max(); i++) {
@@ -278,8 +277,8 @@ static int obd_proc_health_seq_show(struct seq_file *m, void *data)
 
        if (healthy)
                seq_puts(m, "healthy\n");
-
-       seq_printf(m, "NOT HEALTHY\n");
+       else
+               seq_puts(m, "NOT HEALTHY\n");
        return 0;
 }
 LPROC_SEQ_FOPS_RO(obd_proc_health);