Whamcloud - gitweb
LU-14927 scrub: create shared scrub_needs_check() function.
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_lproc.c
index 906e53a..0fbe1c0 100644 (file)
@@ -469,7 +469,8 @@ static ssize_t auto_scrub_show(struct kobject *kobj, struct attribute *attr,
        if (unlikely(!dev->od_mnt))
                return -EINPROGRESS;
 
-       return sprintf(buf, "%lld\n", dev->od_auto_scrub_interval);
+       return scnprintf(buf, PAGE_SIZE, "%lld\n",
+                        dev->od_scrub.os_scrub.os_auto_scrub_interval);
 }
 
 static ssize_t auto_scrub_store(struct kobject *kobj, struct attribute *attr,
@@ -489,7 +490,7 @@ static ssize_t auto_scrub_store(struct kobject *kobj, struct attribute *attr,
        if (rc)
                return rc;
 
-       dev->od_auto_scrub_interval = val;
+       dev->od_scrub.os_scrub.os_auto_scrub_interval = val;
        return count;
 }
 LUSTRE_RW_ATTR(auto_scrub);