diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index ed5727c089a9..298731b8e951 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2086,6 +2086,7 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len) | |||
2086 | * -writemostly - clears write_mostly | 2086 | * -writemostly - clears write_mostly |
2087 | * blocked - sets the Blocked flag | 2087 | * blocked - sets the Blocked flag |
2088 | * -blocked - clears the Blocked flag | 2088 | * -blocked - clears the Blocked flag |
2089 | * insync - sets Insync providing device isn't active | ||
2089 | */ | 2090 | */ |
2090 | int err = -EINVAL; | 2091 | int err = -EINVAL; |
2091 | if (cmd_match(buf, "faulty") && rdev->mddev->pers) { | 2092 | if (cmd_match(buf, "faulty") && rdev->mddev->pers) { |
@@ -2118,6 +2119,9 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len) | |||
2118 | md_wakeup_thread(rdev->mddev->thread); | 2119 | md_wakeup_thread(rdev->mddev->thread); |
2119 | 2120 | ||
2120 | err = 0; | 2121 | err = 0; |
2122 | } else if (cmd_match(buf, "insync") && rdev->raid_disk == -1) { | ||
2123 | set_bit(In_sync, &rdev->flags); | ||
2124 | err = 0; | ||
2121 | } | 2125 | } |
2122 | if (!err && rdev->sysfs_state) | 2126 | if (!err && rdev->sysfs_state) |
2123 | sysfs_notify_dirent(rdev->sysfs_state); | 2127 | sysfs_notify_dirent(rdev->sysfs_state); |
@@ -2190,7 +2194,7 @@ slot_store(mdk_rdev_t *rdev, const char *buf, size_t len) | |||
2190 | } else if (rdev->mddev->pers) { | 2194 | } else if (rdev->mddev->pers) { |
2191 | mdk_rdev_t *rdev2; | 2195 | mdk_rdev_t *rdev2; |
2192 | /* Activating a spare .. or possibly reactivating | 2196 | /* Activating a spare .. or possibly reactivating |
2193 | * if we every get bitmaps working here. | 2197 | * if we ever get bitmaps working here. |
2194 | */ | 2198 | */ |
2195 | 2199 | ||
2196 | if (rdev->raid_disk != -1) | 2200 | if (rdev->raid_disk != -1) |