diff options
-rw-r--r-- | drivers/md/bitmap.c | 3 | ||||
-rw-r--r-- | drivers/md/md.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 1742435ce3ae..4518994712c7 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1526,7 +1526,8 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector) | |||
1526 | atomic_read(&bitmap->mddev->recovery_active) == 0); | 1526 | atomic_read(&bitmap->mddev->recovery_active) == 0); |
1527 | 1527 | ||
1528 | bitmap->mddev->curr_resync_completed = bitmap->mddev->curr_resync; | 1528 | bitmap->mddev->curr_resync_completed = bitmap->mddev->curr_resync; |
1529 | set_bit(MD_CHANGE_CLEAN, &bitmap->mddev->flags); | 1529 | if (bitmap->mddev->persistent) |
1530 | set_bit(MD_CHANGE_CLEAN, &bitmap->mddev->flags); | ||
1530 | sector &= ~((1ULL << CHUNK_BLOCK_SHIFT(bitmap)) - 1); | 1531 | sector &= ~((1ULL << CHUNK_BLOCK_SHIFT(bitmap)) - 1); |
1531 | s = 0; | 1532 | s = 0; |
1532 | while (s < sector && s < bitmap->mddev->resync_max_sectors) { | 1533 | while (s < sector && s < bitmap->mddev->resync_max_sectors) { |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9007651ce175..d636b0a40fac 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6753,7 +6753,8 @@ void md_do_sync(mddev_t *mddev) | |||
6753 | atomic_read(&mddev->recovery_active) == 0); | 6753 | atomic_read(&mddev->recovery_active) == 0); |
6754 | mddev->curr_resync_completed = | 6754 | mddev->curr_resync_completed = |
6755 | mddev->curr_resync; | 6755 | mddev->curr_resync; |
6756 | set_bit(MD_CHANGE_CLEAN, &mddev->flags); | 6756 | if (mddev->persistent) |
6757 | set_bit(MD_CHANGE_CLEAN, &mddev->flags); | ||
6757 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); | 6758 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); |
6758 | } | 6759 | } |
6759 | 6760 | ||