]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre/libcfs: Move private tracefile structs out of header
authorOleg Drokin <green@linuxhacker.ru>
Tue, 16 Feb 2016 05:47:07 +0000 (00:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:33:11 +0000 (14:33 -0800)
the struct page_collection, struct cfs_trace_page and
struct tracefiled_ctl are only used by tracefile.c, so move them
there.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/libcfs/tracefile.h

index 450f5fdb8301987d7f4bb17308e4cc1c12e5e09c..972bebe480df1f232fc8e285cfb3605b536a2235 100644 (file)
@@ -56,6 +56,51 @@ static int thread_running;
 
 static atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
 
+struct page_collection {
+       struct list_head        pc_pages;
+       /*
+        * if this flag is set, collect_pages() will spill both
+        * ->tcd_daemon_pages and ->tcd_pages to the ->pc_pages. Otherwise,
+        * only ->tcd_pages are spilled.
+        */
+       int             pc_want_daemon_pages;
+};
+
+struct tracefiled_ctl {
+       struct completion       tctl_start;
+       struct completion       tctl_stop;
+       wait_queue_head_t               tctl_waitq;
+       pid_t                   tctl_pid;
+       atomic_t                tctl_shutdown;
+};
+
+/*
+ * small data-structure for each page owned by tracefiled.
+ */
+struct cfs_trace_page {
+       /*
+        * page itself
+        */
+       struct page       *page;
+       /*
+        * linkage into one of the lists in trace_data_union or
+        * page_collection
+        */
+       struct list_head           linkage;
+       /*
+        * number of bytes used within this page
+        */
+       unsigned int     used;
+       /*
+        * cpu that owns this page
+        */
+       unsigned short       cpu;
+       /*
+        * type(context) of this page
+        */
+       unsigned short       type;
+};
+
 static void put_pages_on_tcd_daemon_list(struct page_collection *pc,
                                         struct cfs_trace_cpu_data *tcd);
 
index 0995da164ed5484f750bfc8aa748516919b25c0e..2d4dc73d48ad9b1e17ea2858cdc330bd0b4019f7 100644 (file)
@@ -195,57 +195,6 @@ extern union cfs_trace_data_union (*cfs_trace_data[TCD_MAX_TYPES])[NR_CPUS];
             (tcd = &(*cfs_trace_data[i])[cpu].tcd) &&                  \
             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 */
-struct page_collection {
-       struct list_head        pc_pages;
-       /*
-        * if this flag is set, collect_pages() will spill both
-        * ->tcd_daemon_pages and ->tcd_pages to the ->pc_pages. Otherwise,
-        * only ->tcd_pages are spilled.
-        */
-       int             pc_want_daemon_pages;
-};
-
-/* XXX nikita: this declaration is internal to tracefile.c and should probably
- * be moved there */
-struct tracefiled_ctl {
-       struct completion       tctl_start;
-       struct completion       tctl_stop;
-       wait_queue_head_t               tctl_waitq;
-       pid_t                   tctl_pid;
-       atomic_t                tctl_shutdown;
-};
-
-/*
- * small data-structure for each page owned by tracefiled.
- */
-/* XXX nikita: this declaration is internal to tracefile.c and should probably
- * be moved there */
-struct cfs_trace_page {
-       /*
-        * page itself
-        */
-       struct page       *page;
-       /*
-        * linkage into one of the lists in trace_data_union or
-        * page_collection
-        */
-       struct list_head           linkage;
-       /*
-        * number of bytes used within this page
-        */
-       unsigned int     used;
-       /*
-        * cpu that owns this page
-        */
-       unsigned short       cpu;
-       /*
-        * type(context) of this page
-        */
-       unsigned short       type;
-};
-
 void cfs_set_ptldebug_header(struct ptldebug_header *header,
                             struct libcfs_debug_msg_data *m,
                             unsigned long stack);