Whamcloud - gitweb
LU-5791 lfsck: use bottom device to locate object
[fs/lustre-release.git] / lustre / ofd / lproc_ofd.c
index fbd0913..72f5e45 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "ofd_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /**
  * Show number of FID allocation sequences.
@@ -373,7 +373,8 @@ static int ofd_fmd_max_age_seq_show(struct seq_file *m, void *data)
        struct obd_device *obd = m->private;
        struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
 
-       return seq_printf(m, "%ld\n", ofd->ofd_fmd_max_age / HZ);
+       return seq_printf(m, "%ld\n", jiffies_to_msecs(ofd->ofd_fmd_max_age) /
+                                     MSEC_PER_SEC);
 }
 
 /**
@@ -407,7 +408,7 @@ ofd_fmd_max_age_seq_write(struct file *file, const char __user *buffer,
        if (val > 65536 || val < 1)
                return -EINVAL;
 
-       ofd->ofd_fmd_max_age = val * HZ;
+       ofd->ofd_fmd_max_age = msecs_to_jiffies(val * MSEC_PER_SEC);
        return count;
 }
 LPROC_SEQ_FOPS(ofd_fmd_max_age);
@@ -982,7 +983,7 @@ LPROC_SEQ_FOPS_RO_TYPE(ofd, target_instance);
 LPROC_SEQ_FOPS_RW_TYPE(ofd, ir_factor);
 LPROC_SEQ_FOPS_RW_TYPE(ofd, job_interval);
 
-struct lprocfs_seq_vars lprocfs_ofd_obd_vars[] = {
+struct lprocfs_vars lprocfs_ofd_obd_vars[] = {
        { .name =       "uuid",
          .fops =       &ofd_uuid_fops                  },
        { .name =       "blocksize",
@@ -1055,7 +1056,7 @@ struct lprocfs_seq_vars lprocfs_ofd_obd_vars[] = {
          .fops =       &ofd_lfsck_layout_fops          },
        { .name =       "lfsck_verify_pfid",
          .fops =       &ofd_lfsck_verify_pfid_fops     },
-       { 0 }
+       { NULL }
 };
 
 /**
@@ -1093,4 +1094,4 @@ void ofd_stats_counter_init(struct lprocfs_stats *stats)
                             0, "quotactl", "reqs");
 }
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */