Whamcloud - gitweb
LU-7355 osd: supress useless warning about many credits 85/16985/14
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Thu, 29 Oct 2015 15:26:43 +0000 (18:26 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 7 Apr 2016 15:35:52 +0000 (15:35 +0000)
on tiny systems (like we used to debug Lustre) journals are
tiny as max.transaction too. it doesn't help to warn about
this. we've got another precise mechanism to catch credits
misuse so it should be OK to suppress these messages.

Change-Id: I9599ae856bedb0a08a8dac01821e2c9a72377cac
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/16985
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_handler.c

index 633a6ee..060e16f 100644 (file)
@@ -1325,16 +1325,13 @@ static int osd_trans_start(const struct lu_env *env, struct dt_device *d,
                static unsigned long last_printed;
                static int last_credits;
 
-               CWARN("%.16s: too many transaction credits (%d > %d)\n",
-                     LDISKFS_SB(osd_sb(dev))->s_es->s_volume_name,
-                     oh->ot_credits,
-                     osd_journal(dev)->j_max_transaction_buffers);
-
-               osd_trans_dump_creds(env, th);
-
+               /* don't make noise on a tiny testing systems
+                * actual credits misuse will be caught anyway */
                if (last_credits != oh->ot_credits &&
                    time_after(jiffies, last_printed +
-                              msecs_to_jiffies(60 * MSEC_PER_SEC))) {
+                              msecs_to_jiffies(60 * MSEC_PER_SEC)) &&
+                   osd_transaction_size(dev) > 512) {
+                       osd_trans_dump_creds(env, th);
                        libcfs_debug_dumpstack(NULL);
                        last_credits = oh->ot_credits;
                        last_printed = jiffies;