From f96cfe90151b5b6e01b9ae4deb38bffb8a1f98de Mon Sep 17 00:00:00 2001 From: majianpeng Date: Wed, 28 Aug 2013 19:40:33 +0800 Subject: [PATCH] raid1: Relace raise_barrier/lower_barrrier with freeze_array/unfreeze_array for reconfigure the array. We used raise_barrier to suspend nornal IO while we reconfigure the array. Now we replace it with freeze_array. Raise_barrier only suspends normal 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 Signed-off-by: NeilBrown --- 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 729db21dc829..fd9fa6f2389a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2870,8 +2870,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) @@ -3030,10 +3030,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; } } -- 2.39.5