Whamcloud - gitweb
LU-4748 test: get one single qos_threshold_rr number
[fs/lustre-release.git] / libcfs / libcfs / winnt / winnt-tracefile.c
index c6fd8a0..d93cde9 100644 (file)
@@ -46,7 +46,7 @@ static unsigned int pages_factor[CFS_TCD_TYPE_MAX] = {
         10   /* 10% pages for CFS_TCD_TYPE_DISPATCH */
 };
 
-char *cfs_trace_console_buffers[CFS_NR_CPUS][CFS_TCD_TYPE_MAX];
+char *cfs_trace_console_buffers[NR_CPUS][CFS_TCD_TYPE_MAX];
 
 struct rw_semaphore cfs_tracefile_sem;
 
@@ -63,7 +63,7 @@ int cfs_tracefile_init_arch()
        for (i = 0; i < CFS_TCD_TYPE_MAX; i++) {
                cfs_trace_data[i] =
                        kmalloc(sizeof(union cfs_trace_data_union) * \
-                                 CFS_NR_CPUS, GFP_KERNEL);
+                                 NR_CPUS, GFP_KERNEL);
                if (cfs_trace_data[i] == NULL)
                        goto out;
        }
@@ -89,7 +89,7 @@ int cfs_tracefile_init_arch()
 
 out:
        cfs_tracefile_fini_arch();
-       printk(CFS_KERN_ERR "lnet: Not enough memory\n");
+       printk(KERN_ERR "lnet: Not enough memory\n");
        return -ENOMEM;
 
 }
@@ -171,7 +171,7 @@ cfs_set_ptldebug_header(struct ptldebug_header *header, int subsys, int mask,
 {
        struct timeval tv;
 
-       cfs_gettimeofday(&tv);
+       do_gettimeofday(&tv);
 
        header->ph_subsys = subsys;
        header->ph_mask = mask;
@@ -194,16 +194,16 @@ void cfs_print_to_console(struct ptldebug_header *hdr, int mask,
 
        if ((mask & D_EMERG) != 0) {
                prefix = "LustreError";
-               ptype = CFS_KERN_EMERG;
+               ptype = KERN_EMERG;
        } else if ((mask & D_ERROR) != 0) {
                prefix = "LustreError";
-               ptype = CFS_KERN_ERR;
+               ptype = KERN_ERR;
        } else if ((mask & D_WARNING) != 0) {
                prefix = "Lustre";
-               ptype = CFS_KERN_WARNING;
+               ptype = KERN_WARNING;
        } else if ((mask & (D_CONSOLE | libcfs_printk)) != 0) {
                prefix = "Lustre";
-               ptype = CFS_KERN_INFO;
+               ptype = KERN_INFO;
        }
 
        if ((mask & D_CONSOLE) != 0) {
@@ -217,7 +217,7 @@ void cfs_print_to_console(struct ptldebug_header *hdr, int mask,
 
 int cfs_trace_max_debug_mb(void)
 {
-       int  total_mb = (num_physpages >> (20 - PAGE_CACHE_SHIFT));
-       
+       int  total_mb = (totalram_pages >> (20 - PAGE_CACHE_SHIFT));
+
        return MAX(512, (total_mb * 80)/100);
 }