Skip to contentSkip to conversation

radi1: Relace raise_barrier/lower_barrrier with freeze_array/unfreeze_array for reconfigure the array.

PATCH In review majianpeng 1 participant 1 message Aug 28, 2013 MD RAID

lore
Share & tools
lore

majianpeng

author
#0 lore raw

PATCH 2/4 radi1: 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 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.

---
 drivers/md/raid1.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/md/raid1.c +4 -4
index 92a6d29..b29ad72 100644
@@ -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;
 	}
 }
Signature · 1 line
1.8.1.2