提交 9e6603da 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] md: raid1_quiesce is back to front, fix it.

A state of 0 mean 'not quiesced'
A state of 1 means 'is quiesced'

The original code got this wrong.
Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 15945fee
...@@ -1708,14 +1708,14 @@ void raid1_quiesce(mddev_t *mddev, int state) ...@@ -1708,14 +1708,14 @@ void raid1_quiesce(mddev_t *mddev, int state)
conf_t *conf = mddev_to_conf(mddev); conf_t *conf = mddev_to_conf(mddev);
switch(state) { switch(state) {
case 0: case 1:
spin_lock_irq(&conf->resync_lock); spin_lock_irq(&conf->resync_lock);
conf->barrier++; conf->barrier++;
wait_event_lock_irq(conf->wait_idle, !conf->nr_pending, wait_event_lock_irq(conf->wait_idle, !conf->nr_pending,
conf->resync_lock, raid1_unplug(mddev->queue)); conf->resync_lock, raid1_unplug(mddev->queue));
spin_unlock_irq(&conf->resync_lock); spin_unlock_irq(&conf->resync_lock);
break; break;
case 1: case 0:
spin_lock_irq(&conf->resync_lock); spin_lock_irq(&conf->resync_lock);
conf->barrier--; conf->barrier--;
spin_unlock_irq(&conf->resync_lock); spin_unlock_irq(&conf->resync_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册