From f585c90938e24bf3bdd567fd3053e842ee0af2c3 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 29 Oct 2015 18:26:43 +0300 Subject: [PATCH] LU-7355 osd: supress useless warning about many credits 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 Reviewed-on: http://review.whamcloud.com/16985 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osd-ldiskfs/osd_handler.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 633a6ee..060e16f 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -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; -- 1.8.3.1