Whamcloud - gitweb
LU-5648 ofd: In destroy orphan case always let MDS know last id
[fs/lustre-release.git] / libcfs / libcfs / tracefile.c
index d0b031e..2114063 100644 (file)
@@ -55,7 +55,7 @@ static struct tracefiled_ctl trace_tctl;
 struct mutex cfs_trace_thread_mutex;
 static int thread_running = 0;
 
-atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
+static atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
 
 static void put_pages_on_tcd_daemon_list(struct page_collection *pc,
                                        struct cfs_trace_cpu_data *tcd);
@@ -270,7 +270,6 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
         int                        needed = 85; /* average message length */
         int                        max_nob;
         va_list                    ap;
-        int                        depth;
         int                        i;
         int                        remain;
         int                        mask = msgdata->msg_mask;
@@ -299,8 +298,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
                 goto console;
         }
 
-        depth = __current_nesting_level();
-        known_size = strlen(file) + 1 + depth;
+       known_size = strlen(file) + 1;
         if (msgdata->msg_fn)
                 known_size += strlen(msgdata->msg_fn) + 1;
 
@@ -371,12 +369,6 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
                 debug_buf += sizeof(header);
         }
 
-        /* indent message according to the nesting level */
-        while (depth-- > 0) {
-                *(debug_buf++) = '.';
-                ++ tage->used;
-        }
-
         strcpy(debug_buf, file);
         tage->used += strlen(file) + 1;
         debug_buf += strlen(file) + 1;
@@ -713,7 +705,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
                 cfs_tage_free(tage);
         }
        MMSPACE_CLOSE;
-       rc = filp_fsync(filp, 0, LLONG_MAX);
+       rc = ll_vfs_fsync_range(filp, 0, LLONG_MAX, 1);
        if (rc)
                printk(KERN_ERR "sync returns %d\n", rc);
 close: