All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] radi1: Relace raise_barrier/lower_barrrier with freeze_array/unfreeze_array for reconfigure the array.
@ 2013-08-28 11:40 majianpeng
  0 siblings, 0 replies; only message in thread
From: majianpeng @ 2013-08-28 11:40 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

We used raise_barrier to suspend nornal IO while we reconfigure the
array.Now we replace it with freeze_array.
Raise_barrier only suspend nornal IO.But freeze_array not only susend
nornal io,but it can suspend resync io. For the place where call
raise_barrier for reconfigure, it don't has a problem.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 drivers/md/raid1.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 92a6d29..b29ad72 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2869,8 +2869,8 @@ static int stop(struct mddev *mddev)
 			   atomic_read(&bitmap->behind_writes) == 0);
 	}
 
-	raise_barrier(conf);
-	lower_barrier(conf);
+	freeze_array(conf, 0);
+	unfreeze_array(conf);
 
 	md_unregister_thread(&mddev->thread);
 	if (conf->r1bio_pool)
@@ -3029,10 +3029,10 @@ static void raid1_quiesce(struct mddev *mddev, int state)
 		wake_up(&conf->wait_barrier);
 		break;
 	case 1:
-		raise_barrier(conf);
+		freeze_array(conf, 0);
 		break;
 	case 0:
-		lower_barrier(conf);
+		unfreeze_array(conf);
 		break;
 	}
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-28 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 11:40 [PATCH 2/4] radi1: Relace raise_barrier/lower_barrrier with freeze_array/unfreeze_array for reconfigure the array majianpeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.