Whamcloud - gitweb
LU-9859 libcfs: open code cfs_trace_max_debug_mb() into cfs_trace_set_debug_mb()
[fs/lustre-release.git] / libcfs / libcfs / linux-tracefile.c
index 0cc9c39..5e6b18b 100644 (file)
@@ -48,8 +48,6 @@ static unsigned int pages_factor[CFS_TCD_TYPE_MAX] = {
 
 char *cfs_trace_console_buffers[NR_CPUS][CFS_TCD_TYPE_MAX];
 
-static DECLARE_RWSEM(cfs_tracefile_sem);
-
 int cfs_tracefile_init_arch(void)
 {
        int i;
@@ -110,26 +108,6 @@ void cfs_tracefile_fini_arch(void)
        }
 }
 
-void cfs_tracefile_read_lock(void)
-{
-       down_read(&cfs_tracefile_sem);
-}
-
-void cfs_tracefile_read_unlock(void)
-{
-       up_read(&cfs_tracefile_sem);
-}
-
-void cfs_tracefile_write_lock(void)
-{
-       down_write(&cfs_tracefile_sem);
-}
-
-void cfs_tracefile_write_unlock(void)
-{
-       up_write(&cfs_tracefile_sem);
-}
-
 enum cfs_trace_buf_type cfs_trace_buf_idx_get(void)
 {
        if (in_irq())
@@ -281,10 +259,3 @@ void cfs_print_to_console(struct ptldebug_header *hdr, int mask,
        if (mask & D_TTY)
                cfs_tty_write_message(prefix, mask, buf);
 }
-
-int cfs_trace_max_debug_mb(void)
-{
-       int total_mb = (cfs_totalram_pages() >> (20 - PAGE_SHIFT));
-
-       return max(512, (total_mb * 80) / 100);
-}