Whamcloud - gitweb
b=16909 Use INFO/WARN instead of WARN/ERROR for the slow messages.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Feb 2010 21:46:32 +0000 (13:46 -0800)
committerJohann Lombardi <johann@sun.com>
Tue, 6 Apr 2010 20:44:55 +0000 (22:44 +0200)
We should use INFO/WARN instead of WARN/ERROR for the slow messages.
Not only is there no real error here but it fixes an annoying quirk
of the message formatting.  With the old levels you would see the
messages formatted differently based on the time.

  Lustre: lc1-OST0001: slow parent lock 289s due to heavy IO load
  LustreError: 0-0: lc1-OST0001: slow parent lock 324s due to heavy IO load

With the new levels things are more consistent.

  Lustre: lc1-OST0001: slow parent lock 289s due to heavy IO load
  Lustre: lc1-OST0001: slow parent lock 324s due to heavy IO load

lustre/include/linux/lustre_fsfilt.h

index 01abf1e..0fb14df 100644 (file)
@@ -182,19 +182,19 @@ static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd,
 #define FSFILT_OP_JOIN          11
 #define FSFILT_OP_NOOP          15
 
-#define __fsfilt_check_slow(obd, start, msg)                            \
-do {                                                                    \
-        if (time_before(jiffies, start + 15 * HZ))                      \
-                break;                                                  \
-        else if (time_before(jiffies, start + 30 * HZ))                 \
-                CDEBUG(D_VFSTRACE, "%s: slow %s %lus\n", obd->obd_name, \
-                       msg, (jiffies-start) / HZ);                      \
-        else if (time_before(jiffies, start + DISK_TIMEOUT * HZ))       \
-                CWARN("%s: slow %s %lus\n", obd->obd_name, msg,         \
-                      (jiffies - start) / HZ);                          \
-        else                                                            \
-                CERROR("%s: slow %s %lus\n", obd->obd_name, msg,        \
-                       (jiffies - start) / HZ);                         \
+#define __fsfilt_check_slow(obd, start, msg)                                 \
+do {                                                                         \
+        if (time_before(jiffies, start + 15 * HZ))                           \
+                break;                                                       \
+        else if (time_before(jiffies, start + 30 * HZ))                      \
+                CDEBUG(D_VFSTRACE, "%s: slow %s %lus due to heavy IO load\n",\
+                       obd->obd_name, msg, (jiffies-start) / HZ);            \
+        else if (time_before(jiffies, start + DISK_TIMEOUT * HZ))            \
+                LCONSOLE_INFO("%s: slow %s %lus due to heavy IO load\n",     \
+                              obd->obd_name, msg, (jiffies - start) / HZ);   \
+        else                                                                 \
+                LCONSOLE_WARN("%s: slow %s %lus due to heavy IO load\n",     \
+                              obd->obd_name, msg, (jiffies - start) / HZ);   \
 } while (0)
 
 #define fsfilt_check_slow(obd, start, msg)    \