X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_lproc.c;h=5a3c703048f5b51bfbe78ce5360a46c34b5b5e14;hb=refs%2Fchanges%2F50%2F26650%2F5;hp=48a86246fa851ae484dee51412e9e1a1e03f6959;hpb=2104ed0f0da3651f0cb4ab0c78a1037891d7cb4f;p=fs%2Flustre-release.git diff --git a/lustre/osd-ldiskfs/osd_lproc.c b/lustre/osd-ldiskfs/osd_lproc.c index 48a8624..5a3c703 100644 --- a/lustre/osd-ldiskfs/osd_lproc.c +++ b/lustre/osd-ldiskfs/osd_lproc.c @@ -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 */ @@ -41,7 +37,6 @@ #define DEBUG_SUBSYSTEM S_OSD #include -#include #include "osd_internal.h" @@ -125,12 +120,13 @@ 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 timespec64 now; /* this sampling races with updates */ - do_gettimeofday(&now); - seq_printf(seq, "snapshot_time: %lu.%lu (secs.usecs)\n", - now.tv_sec, now.tv_usec); + ktime_get_real_ts64(&now); + + seq_printf(seq, "snapshot_time: %lld.%09ld (secs.nsecs)\n", + (s64)now.tv_sec, now.tv_nsec); display_brw_stats(seq, "pages per bulk r/w", "rpcs", &brw_stats->hist[BRW_R_PAGES], @@ -354,7 +350,7 @@ lprocfs_osd_force_sync_seq_write(struct file *file, const char __user *buffer, return rc == 0 ? count : rc; } -LPROC_SEQ_FOPS_WO_TYPE(ldiskfs, osd_force_sync); +LPROC_SEQ_FOPS_WR_ONLY(ldiskfs, osd_force_sync); static int ldiskfs_osd_pdo_seq_show(struct seq_file *m, void *data) { @@ -422,7 +418,7 @@ static int ldiskfs_osd_full_scrub_ratio_seq_show(struct seq_file *m, void *data) if (unlikely(dev->od_mnt == NULL)) return -EINPROGRESS; - seq_printf(m, LPU64"\n", dev->od_full_scrub_ratio); + seq_printf(m, "%llu\n", dev->od_full_scrub_ratio); return 0; } @@ -462,7 +458,7 @@ static int ldiskfs_osd_full_scrub_threshold_rate_seq_show(struct seq_file *m, if (unlikely(dev->od_mnt == NULL)) return -EINPROGRESS; - seq_printf(m, LPU64" (bad OI mappings/minute)\n", + seq_printf(m, "%llu (bad OI mappings/minute)\n", dev->od_full_scrub_threshold_rate); return 0; } @@ -539,7 +535,7 @@ static int ldiskfs_osd_readcache_seq_show(struct seq_file *m, void *data) if (unlikely(osd->od_mnt == NULL)) return -EINPROGRESS; - seq_printf(m, LPU64"\n", osd->od_readcache_max_filesize); + seq_printf(m, "%llu\n", osd->od_readcache_max_filesize); return 0; }