Whamcloud - gitweb
LU-3790 tests: test_pios_ssf failed with 24
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_lproc.c
index 773b3e7..5171863 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -63,7 +63,7 @@ void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf)
         if (unlikely(nr_pages == 0))
                 return;
 
-        blocks_per_page = CFS_PAGE_SIZE >> osd_sb(osd)->s_blocksize_bits;
+       blocks_per_page = PAGE_CACHE_SIZE >> osd_sb(osd)->s_blocksize_bits;
 
         lprocfs_oh_tally_log2(&s->hist[BRW_R_PAGES+rw], nr_pages);
 
@@ -125,12 +125,12 @@ static void display_brw_stats(struct seq_file *seq, char *name, char *units,
 
 static void brw_stats_show(struct seq_file *seq, struct brw_stats *brw_stats)
 {
-        struct timeval now;
+       struct timeval now;
 
-        /* this sampling races with updates */
-        cfs_gettimeofday(&now);
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
+       /* this sampling races with updates */
+       do_gettimeofday(&now);
+       seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
+                  now.tv_sec, now.tv_usec);
 
         display_brw_stats(seq, "pages per bulk r/w", "rpcs",
                           &brw_stats->hist[BRW_R_PAGES],
@@ -152,9 +152,9 @@ static void brw_stats_show(struct seq_file *seq, struct brw_stats *brw_stats)
                           &brw_stats->hist[BRW_R_RPC_HIST],
                           &brw_stats->hist[BRW_W_RPC_HIST], 0);
 
-        display_brw_stats(seq, "I/O time (1/1000s)", "ios",
-                          &brw_stats->hist[BRW_R_IO_TIME],
-                          &brw_stats->hist[BRW_W_IO_TIME], 1000 / CFS_HZ);
+       display_brw_stats(seq, "I/O time (1/1000s)", "ios",
+                         &brw_stats->hist[BRW_R_IO_TIME],
+                         &brw_stats->hist[BRW_W_IO_TIME], 1000 / HZ);
 
         display_brw_stats(seq, "disk I/O size", "ios",
                           &brw_stats->hist[BRW_R_DISK_IOSIZE],
@@ -515,12 +515,12 @@ int lprocfs_osd_wr_readcache(struct file *file, const char *buffer,
 }
 
 struct lprocfs_vars lprocfs_osd_obd_vars[] = {
-        { "blocksize",       lprocfs_osd_rd_blksize,     0, 0 },
-        { "kbytestotal",     lprocfs_osd_rd_kbytestotal, 0, 0 },
-        { "kbytesfree",      lprocfs_osd_rd_kbytesfree,  0, 0 },
-        { "kbytesavail",     lprocfs_osd_rd_kbytesavail, 0, 0 },
-        { "filestotal",      lprocfs_osd_rd_filestotal,  0, 0 },
-        { "filesfree",       lprocfs_osd_rd_filesfree,   0, 0 },
+       { "blocksize",          lprocfs_dt_rd_blksize,  0, 0 },
+       { "kbytestotal",        lprocfs_dt_rd_kbytestotal,      0, 0 },
+       { "kbytesfree",         lprocfs_dt_rd_kbytesfree,       0, 0 },
+       { "kbytesavail",        lprocfs_dt_rd_kbytesavail,      0, 0 },
+       { "filestotal",         lprocfs_dt_rd_filestotal,       0, 0 },
+       { "filesfree",          lprocfs_dt_rd_filesfree,        0, 0 },
         { "fstype",          lprocfs_osd_rd_fstype,      0, 0 },
         { "mntdev",          lprocfs_osd_rd_mntdev,      0, 0 },
        { "force_sync",      0, lprocfs_osd_wr_force_sync     },