Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / lnet / libcfs / linux / linux-proc.c
index c317a5a..3be3bee 100644 (file)
@@ -121,11 +121,12 @@ static int __proc_dobitmasks(void *data, int write,
         int           rc;
         unsigned int *mask = data;
         int           is_subsys = (mask == &libcfs_subsystem_debug) ? 1 : 0;
+        int           is_printk = (mask == &libcfs_printk) ? 1 : 0;
 
         rc = trace_allocate_string_buffer(&tmpstr, tmpstrlen);
         if (rc < 0)
                 return rc;
-        
+
         if (!write) {
                 libcfs_debug_mask2str(tmpstr, tmpstrlen, *mask, is_subsys);
                 rc = strlen(tmpstr);
@@ -140,8 +141,11 @@ static int __proc_dobitmasks(void *data, int write,
                 rc = trace_copyin_string(tmpstr, tmpstrlen, buffer, nob);
                 if (rc < 0)
                         return rc;
-                
+
                 rc = libcfs_debug_str2mask(mask, tmpstr, is_subsys);
+                /* Always print LBUG/LASSERT to console, so keep this mask */
+                if (is_printk)
+                        *mask |= D_EMERG;
         }
 
         trace_free_string_buffer(tmpstr, tmpstrlen);