X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Flibcfs%2Ftracefile.h;h=14e33118df0a1e0ae7890099de824a29144ad7eb;hb=refs%2Fchanges%2F88%2F24688%2F28;hp=d1892957d2d3ff6e40da342c65847ac38782a4fa;hpb=7e95d67f81f1a1a2613809541f30ad4e06618df5;p=fs%2Flustre-release.git diff --git a/libcfs/libcfs/tracefile.h b/libcfs/libcfs/tracefile.h index d189295..14e3311 100644 --- a/libcfs/libcfs/tracefile.h +++ b/libcfs/libcfs/tracefile.h @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -39,12 +35,12 @@ #include -typedef enum { +enum cfs_trace_buf_type { CFS_TCD_TYPE_PROC = 0, CFS_TCD_TYPE_SOFTIRQ, CFS_TCD_TYPE_IRQ, CFS_TCD_TYPE_MAX -} cfs_trace_buf_type_t; +}; /* trace file lock routines */ @@ -52,7 +48,6 @@ typedef enum { extern char cfs_tracefile[TRACEFILE_NAME_SIZE]; extern long long cfs_tracefile_size; -extern char lnet_upcall[1024]; /** * The path of debug log dump upcall script. */ @@ -83,12 +78,10 @@ int cfs_trace_copyin_string(char *knl_buffer, int knl_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); -void cfs_trace_free_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_set_debug_mb_usrstr(void __user *usr_str, int usr_str_nob); int cfs_trace_get_debug_mb(void); extern void libcfs_debug_dumplog_internal(void *arg); @@ -97,7 +90,7 @@ 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_CACHE_SHIFT)) +#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) #define TCD_STOCK_PAGES (TCD_MAX_PAGES) #define CFS_TRACEFILE_SIZE (500 << 20) @@ -106,7 +99,7 @@ extern int cfs_trace_max_debug_mb(void); /* * Private declare for tracefile */ -#define TCD_MAX_PAGES (5 << (20 - PAGE_CACHE_SHIFT)) +#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT)) #define TCD_STOCK_PAGES (TCD_MAX_PAGES) #define CFS_TRACEFILE_SIZE (500 << 20) @@ -267,7 +260,7 @@ 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); extern char *cfs_trace_console_buffers[NR_CPUS][CFS_TCD_TYPE_MAX]; -extern cfs_trace_buf_type_t cfs_trace_buf_idx_get(void); +extern enum cfs_trace_buf_type cfs_trace_buf_idx_get(void); static inline char *cfs_trace_get_console_buffer(void) { @@ -277,12 +270,6 @@ static inline char *cfs_trace_get_console_buffer(void) return cfs_trace_console_buffers[i][j]; } -static inline void -cfs_trace_put_console_buffer(char *buffer) -{ - put_cpu(); -} - static inline struct cfs_trace_cpu_data *cfs_trace_get_tcd(void) { struct cfs_trace_cpu_data *tcd = @@ -323,7 +310,7 @@ do { \ do { \ __LASSERT(tage != NULL); \ __LASSERT(tage->page != NULL); \ - __LASSERT(tage->used <= PAGE_CACHE_SIZE); \ + __LASSERT(tage->used <= PAGE_SIZE); \ __LASSERT(page_count(tage->page) > 0); \ } while (0)