-extern char tracefile[TRACEFILE_NAME_SIZE];
-extern long long tracefile_size;
-
-int tracefile_init_arch(void);
-void tracefile_fini_arch(void);
-
-void tracefile_read_lock(void);
-void tracefile_read_unlock(void);
-void tracefile_write_lock(void);
-void tracefile_write_unlock(void);
-
-int tracefile_dump_all_pages(char *filename);
-void trace_debug_print(void);
-void trace_flush_pages(void);
-int trace_start_thread(void);
-void trace_stop_thread(void);
-int tracefile_init(int max_pages);
-void tracefile_exit(void);
-
-
-
-int trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
- const char *usr_buffer, int usr_buffer_nob);
-int trace_copyout_string(char *usr_buffer, int usr_buffer_nob,
- const char *knl_str, char *append);
-int trace_allocate_string_buffer(char **str, int nob);
-void trace_free_string_buffer(char *str, int nob);
-int trace_dump_debug_buffer_usrstr(void *usr_str, int usr_str_nob);
-int trace_daemon_command(char *str);
-int trace_daemon_command_usrstr(void *usr_str, int usr_str_nob);
-int trace_set_debug_mb(int mb);
-int trace_set_debug_mb_usrstr(void *usr_str, int usr_str_nob);
-int trace_get_debug_mb(void);
+extern char cfs_tracefile[TRACEFILE_NAME_SIZE];
+extern long long cfs_tracefile_size;
+
+/**
+ * The path of debug log dump upcall script.
+ */
+extern char lnet_debug_log_upcall[1024];
+
+extern void libcfs_run_debug_log_upcall(char *file);
+
+int cfs_tracefile_dump_all_pages(char *filename);
+void cfs_trace_debug_print(void);
+void cfs_trace_flush_pages(void);
+int cfs_trace_start_thread(void);
+void cfs_trace_stop_thread(void);
+int cfs_tracefile_init(int max_pages);
+void cfs_tracefile_exit(void);
+
+
+
+int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
+ const char __user *usr_buffer, int usr_buffer_nob);
+int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
+ const char *knl_str, char *append);
+int cfs_trace_allocate_string_buffer(char **str, int nob);
+int cfs_trace_dump_debug_buffer_usrstr(void __user *usr_str, int usr_str_nob);
+int cfs_trace_daemon_command(char *str);
+int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob);
+int cfs_trace_set_debug_mb(int mb);
+int cfs_trace_get_debug_mb(void);