aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c50931352b23..2be574c0a27a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2888,6 +2888,8 @@ __ATTR(chunk_size, S_IRUGO|S_IWUSR, chunk_size_show, chunk_size_store);
2888static ssize_t 2888static ssize_t
2889resync_start_show(mddev_t *mddev, char *page) 2889resync_start_show(mddev_t *mddev, char *page)
2890{ 2890{
2891 if (mddev->recovery_cp == MaxSector)
2892 return sprintf(page, "none\n");
2891 return sprintf(page, "%llu\n", (unsigned long long)mddev->recovery_cp); 2893 return sprintf(page, "%llu\n", (unsigned long long)mddev->recovery_cp);
2892} 2894}
2893 2895
@@ -3469,6 +3471,8 @@ static ssize_t
3469sync_speed_show(mddev_t *mddev, char *page) 3471sync_speed_show(mddev_t *mddev, char *page)
3470{ 3472{
3471 unsigned long resync, dt, db; 3473 unsigned long resync, dt, db;
3474 if (mddev->curr_resync == 0)
3475 return sprintf(page, "none\n");
3472 resync = mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active); 3476 resync = mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active);
3473 dt = (jiffies - mddev->resync_mark) / HZ; 3477 dt = (jiffies - mddev->resync_mark) / HZ;
3474 if (!dt) dt++; 3478 if (!dt) dt++;