Whamcloud - gitweb
LU-10171 headers: define pct(a,b) once
[fs/lustre-release.git] / lustre / mdd / mdd_lproc.c
index f04a2cb..78366e3 100644 (file)
@@ -273,8 +273,11 @@ mdd_changelog_max_idle_time_seq_write(struct file *file,
        if (rc)
                return rc;
 
-       /* XXX may need to limit with reasonable elapsed/idle times */
-       if (val < 1)
+       /* as it sounds reasonable, do not allow a user to be idle since
+        * more than about 68 years, this will allow to use 32bits
+        * timestamps for comparison
+        */
+       if (val < 1 || val > INT_MAX)
                return -ERANGE;
 
        mdd->mdd_changelog_max_idle_time = val;
@@ -456,7 +459,7 @@ static int mdd_lfsck_speed_limit_seq_show(struct seq_file *m, void *data)
        struct mdd_device *mdd = m->private;
 
        LASSERT(mdd != NULL);
-       return lfsck_get_speed(m, mdd->mdd_bottom);
+       return lfsck_get_speed(m, NULL, mdd->mdd_bottom);
 }
 
 static ssize_t