Whamcloud - gitweb
LU-9859 libcfs: open code cfs_trace_max_debug_mb() into cfs_trace_set_debug_mb()
[fs/lustre-release.git] / libcfs / libcfs / tracefile.h
index 14e3311..30c5ae2 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -58,11 +58,6 @@ extern void libcfs_run_debug_log_upcall(char *file);
 int  cfs_tracefile_init_arch(void);
 void cfs_tracefile_fini_arch(void);
 
-void cfs_tracefile_read_lock(void);
-void cfs_tracefile_read_unlock(void);
-void cfs_tracefile_write_lock(void);
-void cfs_tracefile_write_unlock(void);
-
 int cfs_tracefile_dump_all_pages(char *filename);
 void cfs_trace_debug_print(void);
 void cfs_trace_flush_pages(void);
@@ -88,7 +83,6 @@ extern void libcfs_debug_dumplog_internal(void *arg);
 extern void libcfs_register_panic_notifier(void);
 extern void libcfs_unregister_panic_notifier(void);
 extern int  libcfs_panic_in_progress;
-extern int  cfs_trace_max_debug_mb(void);
 
 #define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT))
 #define TCD_STOCK_PAGES (TCD_MAX_PAGES)
@@ -114,7 +108,7 @@ union cfs_trace_data_union {
                 * Even though this structure is meant to be per-CPU, locking
                 * is needed because in some places the data may be accessed
                 * from other CPUs. This lock is directly used in trace_get_tcd
-                * and trace_put_tcd, which are called in libcfs_debug_vmsg2 and
+                * and trace_put_tcd, which are called in libcfs_debug_msg and
                 * tcd_for_each_type_lock
                 */
                spinlock_t              tcd_lock;
@@ -297,21 +291,21 @@ extern void cfs_trace_assertion_failed(const char *str,
                                        struct libcfs_debug_msg_data *m);
 
 /* ASSERTION that is safe to use within the debug system */
-#define __LASSERT(cond)                                                 \
-do {                                                                    \
-        if (unlikely(!(cond))) {                                        \
-                LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_EMERG, NULL);     \
-                cfs_trace_assertion_failed("ASSERTION("#cond") failed", \
-                                           &msgdata);                   \
-        }                                                               \
+#define __LASSERT(cond)                                                        \
+do {                                                                   \
+       if (unlikely(!(cond))) {                                        \
+               LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_EMERG, NULL);     \
+               cfs_trace_assertion_failed("ASSERTION("#cond") failed", \
+                                          &msgdata);                   \
+       }                                                               \
 } while (0)
 
-#define __LASSERT_TAGE_INVARIANT(tage)                                  \
-do {                                                                    \
-        __LASSERT(tage != NULL);                                        \
-        __LASSERT(tage->page != NULL);                                  \
-       __LASSERT(tage->used <= PAGE_SIZE);                         \
-       __LASSERT(page_count(tage->page) > 0);                      \
+#define __LASSERT_TAGE_INVARIANT(tage)                                 \
+do {                                                                   \
+       __LASSERT(tage != NULL);                                        \
+       __LASSERT(tage->page != NULL);                                  \
+       __LASSERT(tage->used <= PAGE_SIZE);                             \
+       __LASSERT(page_count(tage->page) > 0);                          \
 } while (0)
 
 #endif /* LUSTRE_TRACEFILE_PRIVATE */