From 6112a93be632f7dfe0cdfb9f3c32ad5d4eb5ccf7 Mon Sep 17 00:00:00 2001
From: alex <alex>
Date: Sat, 10 Sep 2005 23:44:32 +0000
Subject: [PATCH] - better dump a backtrace, but not too often

---
 lustre/osc/osc_create.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c
index 39f33e3d55..a112d1f84b 100644
--- a/lustre/osc/osc_create.c
+++ b/lustre/osc/osc_create.c
@@ -84,9 +84,11 @@ int osc_create(struct obd_export *exp, struct obdo *oa,
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
         if (current->journal_info != NULL) {
+                static int dump_counter = 0;
                 CDEBUG(D_ERROR, "calling osc_create() with an "
                        "open transaction isn't a good idea\n");
-                portals_debug_dumplog();
+                if (dump_counter++ % 100 == 0)
+                        portals_debug_dumpstack(NULL);
         }
 #endif
 
-- 
GitLab