diff options
author | NeilBrown <neilb@suse.de> | 2008-03-04 17:29:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:18 -0500 |
commit | 25156198235325805cd7295ed694509fd6e3a29e (patch) | |
tree | 0f1b8ae0f6e4da99afa2ab5e59c866becb1dc136 /drivers/md | |
parent | d0fae18f1b53a1d39135a968792be034bdf7ff26 (diff) |
md: make sure a reshape is started when device switches to read-write
A resync/reshape/recovery thread will refuse to progress when the array is
marked read-only. So whenever it mark it not read-only, it is important to
wake up thread resync thread. There is one place we didn't do this.
The problem manifests if the start_ro module parameters is set, and a raid5
array that is in the middle of a reshape (restripe) is started. The array
will initially be semi-read-only (meaning it acts like it is readonly until
the first write). So the reshape will not proceed.
On the first write, the array will become read-write, but the reshape will not
be started, and there is no event which will ever restart that thread.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index a71241c5ae72..a986845ea0c3 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5356,6 +5356,7 @@ void md_write_start(mddev_t *mddev, struct bio *bi) | |||
5356 | mddev->ro = 0; | 5356 | mddev->ro = 0; |
5357 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 5357 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
5358 | md_wakeup_thread(mddev->thread); | 5358 | md_wakeup_thread(mddev->thread); |
5359 | md_wakeup_thread(mddev->sync_thread); | ||
5359 | } | 5360 | } |
5360 | atomic_inc(&mddev->writes_pending); | 5361 | atomic_inc(&mddev->writes_pending); |
5361 | if (mddev->in_sync) { | 5362 | if (mddev->in_sync) { |