Whamcloud - gitweb
LU-1311 Disable local irqs when locking tcds while walking them
[fs/lustre-release.git] / libcfs / libcfs / tracefile.h
index a39ed41..9250017 100644 (file)
@@ -198,7 +198,7 @@ extern union cfs_trace_data_union (*cfs_trace_data[TCD_MAX_TYPES])[CFS_NR_CPUS];
 #define cfs_tcd_for_each_type_lock(tcd, i, cpu)                           \
     for (i = 0; cfs_trace_data[i] &&                                      \
          (tcd = &(*cfs_trace_data[i])[cpu].tcd) &&                        \
-         cfs_trace_lock_tcd(tcd); cfs_trace_unlock_tcd(tcd), i++)
+         cfs_trace_lock_tcd(tcd, 1); cfs_trace_unlock_tcd(tcd, 1), i++)
 
 /* XXX nikita: this declaration is internal to tracefile.c and should probably
  * be moved there */
@@ -266,8 +266,8 @@ extern void cfs_print_to_console(struct ptldebug_header *hdr, int mask,
                                  const char *buf, int len, const char *file,
                                  const char *fn);
 
-extern int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd);
-extern void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd);
+extern int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking);
+extern void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking);
 
 /**
  * trace_buf_type_t, trace_buf_idx_get() and trace_console_buffers[][]
@@ -300,7 +300,7 @@ cfs_trace_get_tcd(void)
        struct cfs_trace_cpu_data *tcd =
                 &(*cfs_trace_data[cfs_trace_buf_idx_get()])[cfs_get_cpu()].tcd;
 
-       cfs_trace_lock_tcd(tcd);
+       cfs_trace_lock_tcd(tcd, 0);
 
        return tcd;
 }
@@ -308,7 +308,7 @@ cfs_trace_get_tcd(void)
 static inline void
 cfs_trace_put_tcd (struct cfs_trace_cpu_data *tcd)
 {
-       cfs_trace_unlock_tcd(tcd);
+       cfs_trace_unlock_tcd(tcd, 0);
 
        cfs_put_cpu();
 }