diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 58e0b02a74c2..384e4f0904c8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3306,7 +3306,9 @@ static ssize_t | |||
3306 | action_show(mddev_t *mddev, char *page) | 3306 | action_show(mddev_t *mddev, char *page) |
3307 | { | 3307 | { |
3308 | char *type = "idle"; | 3308 | char *type = "idle"; |
3309 | if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || | 3309 | if (test_bit(MD_RECOVERY_FROZEN, &mddev->recovery)) |
3310 | type = "frozen"; | ||
3311 | else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || | ||
3310 | (!mddev->ro && test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))) { | 3312 | (!mddev->ro && test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))) { |
3311 | if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) | 3313 | if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) |
3312 | type = "reshape"; | 3314 | type = "reshape"; |
@@ -3329,7 +3331,12 @@ action_store(mddev_t *mddev, const char *page, size_t len) | |||
3329 | if (!mddev->pers || !mddev->pers->sync_request) | 3331 | if (!mddev->pers || !mddev->pers->sync_request) |
3330 | return -EINVAL; | 3332 | return -EINVAL; |
3331 | 3333 | ||
3332 | if (cmd_match(page, "idle")) { | 3334 | if (cmd_match(page, "frozen")) |
3335 | set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); | ||
3336 | else | ||
3337 | clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); | ||
3338 | |||
3339 | if (cmd_match(page, "idle") || cmd_match(page, "frozen")) { | ||
3333 | if (mddev->sync_thread) { | 3340 | if (mddev->sync_thread) { |
3334 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | 3341 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
3335 | md_unregister_thread(mddev->sync_thread); | 3342 | md_unregister_thread(mddev->sync_thread); |